Skip to contents

Retrieve the size of the GFF3Track

Usage

# S4 method for GFF3Track
trackSize(obj)

Arguments

obj

An object of class UCSCBedAnnotationTrack

Value

The number of elements

Examples

base.loc <- 88883100
tbl <- data.frame(chrom=rep("chr5", 3),
                  start=c(base.loc, base.loc+100, base.loc + 250),
                  end=c(base.loc + 50, base.loc+120, base.loc+290),
                  name=c("a", "b", "c"),
                  score=runif(3),
                  strand=rep("*", 3),
                  stringsAsFactors=FALSE)

colors <- list("antisense"="blueviolet",
               "protein_coding"= "blue",
               "retained_intron"= "rgb(0, 150, 150)",
               "processed_transcript"= "purple",
               "processed_pseudogene"= "#7fff00",
               "unprocessed_pseudogene"= "#d2691e",
               "default"= "black")

track <- GFF3Track("dataframe gff3", tbl,
                   colorByAttribute="biotype", colorTable=colors,
                   url=NA_character_, indexURL=NA_character_,
                   displayMode="EXPANDED", trackHeight=200, visibilityWindow=100000)

trackSize(track)
#> [1] 3