The gene annotation table contains meta information for the rows of a grandR object. When loaded from the GRAND-SLAM output, this this contains gene ids, gene symbols, the transcript length and the type.
GeneInfo(data, column = NULL, value = NULL)GeneInfo(data, column) <- value
Either the gene annotation table or a new grandR object having an updated gene annotation table
A grandR object
The name of the additional annotation column
The additional annotation per gene
New columns can be added either by data<-GeneInfo(data,name,values)
or by GeneInfo(data,name)<-values
.
Genes, Coldata, ReadGRAND
sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
design=c("Cell",Design$dur.4sU,Design$Replicate))
head(GeneInfo(sars))
GeneInfo(sars,"LengthCategory")<-cut(GeneInfo(sars)$Length,c(0,1500,2500,Inf),
labels=c("Short","Medium","Long"))
table(GeneInfo(sars)$LengthCategory)
Run the code above in your browser using DataLab