Track holds the slots every igv.js track shares. It is
the parent of igvAnnotationTrack and
QuantitativeTrack; build tracks with their subclass
constructors, e.g. DataFrameAnnotationTrack, and display them
with loadTrack.
Usage
Track(
trackType = c("annotation", "quantitative", "alignment", "variant", "gwas",
"genomicAlignment", "remoteAlignment", "pairedEndAnnotation"),
sourceType = c("file", "url", "gcs", "ga4gh"),
fileFormat = c("bed", "gff", "gff3", "gtf", "wig", "bigWig", "bedGraph", "bam", "vcf",
"seg", "gwas", "cram", "bedpe"),
trackName,
onScreenOrder = NA_real_,
color = "gray",
height = 50,
autoTrackHeight = FALSE,
minTrackHeight = 50,
maxTrackHeight = 500,
visibilityWindow = 1e+05
)Arguments
- trackType
One of "annotation", "quantitative", "alignment", "variant", "gwas", "genomicAlignment", "remoteAlignment", "pairedEndAnnotation"
- sourceType
One of "file", "url", "gcs", "ga4gh"
- fileFormat
One of "bed", "gff", "gff3", "gtf", "wig", "bigWig", "bedGraph", "bam", "vcf", "seg", "gwas", "cram", "bedpe"
- trackName
A character string, used as track label by igv; we recommend unique names per track
- onScreenOrder
Numeric, for explicit placement of track within the current set
- color
A CSS color name (e.g., "red" or "#FF0000"), or "random"
- height
track height in pixels
- autoTrackHeight
If TRUE, track height is adjusted dynamically, within the bounds set by minTrackHeight and maxTrackHeight
- minTrackHeight
In pixels, minimum allowed
- maxTrackHeight
In pixels, maximum allowed
- visibilityWindow
Maximum window size in base pairs for which indexed annotations or variants are displayed
Slots
trackTypecharacter, e.g. "annotation" or "quantitative"
sourceTypecharacter, e.g. "file" or "url"
fileFormatcharacter, e.g. "bed" or "bedGraph"
trackNamecharacter, the track label
onScreenOrdernumeric, explicit placement of the track
colorcharacter, a CSS color
heightnumeric, track height in pixels
autoTrackHeightlogical; stored, not sent to igv.js yet
minTrackHeightnumeric, pixels; stored, not sent to igv.js yet
maxTrackHeightnumeric, pixels; stored, not sent to igv.js yet
visibilityWindownumeric, base pairs; sent to igv.js by the annotation and quantitative
loadTrackmethods (NA: not sent)
Examples
track <- Track(trackType = "annotation", sourceType = "file",
fileFormat = "bed", trackName = "demo", color = "red")
trackInfo(track)
#> $trackType
#> [1] "annotation"
#>
#> $fileFormat
#> [1] "bed"
#>
#> $source
#> [1] "file"
#>
#> $class
#> [1] "Track"
#>