SnapshotFunction-class {ShortRead} | R Documentation

## Class "SnapshotFunction"

### Description

A class to store custom reader and viewer functions for the `Snapshot` class.

### Usage

    SnapshotFunction(reader, viewer, limits, ...)
    reader(x, ...)
    viewer(x, ...)
    limits(x, ...)

### Arguments

`reader` | A function for reading data. The function must take a single argument (a `Snapshot` instance) and return a `data.frame` summarizing the file.
`viewer` | A function for visualizing the data. The function must accept the `data.frame` created by `reader`, and return an `SpTrellis` object representing the view.
`limits` | An integer(2) indicating the minimum and maximum number of nucleotides the `SnapshotFunction` is intended to visualize. For instance, a ‘fine-scale’ viewer displaying a pileup might be appropriate at between 1000 and 50000 nucleotides.
`x` | An instance of `SnapshotFunction`
`...` | Additional arguments, currently unused.

### Fields

`reader`:

  Object of class `function` for reading data from BAM files and returning a `data.frame`.

`viewer`:

  Object of class `function` for visualization that returns an `SpTrellis` object.

`limits`:

  Object of class `integer` for the limits of ranges to be visualized.

### Author(s)

Martin Morgan and Chao-Jen Wong

### See Also

`Snapshot`

### Examples

    ## internally defined function
    reader(ShortRead:::.fine_coverage)
    viewer(ShortRead:::.fine_coverage)
    limits(ShortRead:::.fine_coverage)

[Package ShortRead version 1.50.0 Index]