Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ReferenceTrack-class

ReferenceTrack class and methods


Description

A class allow for on-demand streaming of data off the file system.

Usage

availableDefaultMapping(file, trackType)

Arguments

file

A character scalar with a file name or just a file extension.

trackType

A character scalar with one of the available track types in the package.

Details

The availableDefaultMappings function can be used to find out whether the package defines a mapping scheme between one of the many supported input file types and the metadata columns of the tracks's GRanges objects.

Value

Constructor functions of AnnotationTrack, DataTrack, SequenceTrack and AlignmentsTrack can create a special object of coresponding Reference*Track subclass with pointer to the referenced file.

Objects from the class

A virtual class: No objects may be created from it.

Slots

stream:

Object of class function. The import function to stream data of the file system. Needs to be able to handle the two mandatory arguments file (a character containing a valid file path) and selection (a GRanges object with the genomic region to plot).

reference:

Object of class "character", the path to the file containing the data.

mapping:

Object of class "list", a default mapping between the metadata columns of the returned GRanges object from the import function and the elemenMetadata columns that make up the final track object.

args:

Object of class "list", the passed in constructor arguments during object instantiation. Those will be needed when fetching the data in order to fill all necessary slots.

defaults:

Object of class "list", the relevant default values to be used when neither mapping nor args provides the necessary information.

Methods

Internal methods:

initialize

signature(.Object="ReferenceTrack"): initialize the object.

Author(s)

Florian Hahne

See Also

Examples

# This is a reference class, below example from AlignmentsTrack

afrom <- 2960000
ato <- 3160000
alTrack <- AlignmentsTrack(system.file(package="Gviz", "extdata",
"gapped.bam"), isPaired=TRUE)
plotTracks(alTrack, from=afrom, to=ato, chromosome="chr12")

Gviz

Plotting data and annotation information along genomic coordinates

v1.34.1
Artistic-2.0
Authors
Florian Hahne [aut], Steffen Durinck [aut], Robert Ivanek [aut, cre] (<https://orcid.org/0000-0002-8403-056X>), Arne Mueller [aut], Steve Lianoglou [aut], Ge Tan [aut], Lance Parsons [aut], Shraddha Pai [aut], Thomas McCarthy [ctb], Felix Ernst [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.