Skip to contents

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.

Usage

GeneInfo(data, column = NULL, value = NULL)

GeneInfo(data, column) <- value

Arguments

data

A grandR object

column

The name of the additional annotation column

value

The additional annotation per gene

Value

Either the gene annotation table or a new grandR object having an updated gene annotation table

Details

New columns can be added either by data<-GeneInfo(data,name,values) or by GeneInfo(data,name)<-values.

See also

Examples

sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
                  design=c("Cell",Design$dur.4sU,Design$Replicate))
#> Warning: Duplicate gene symbols (n=1, e.g. MATR3) present, making unique!

head(GeneInfo(sars))
#>              Gene  Symbol Length     Type
#> 1 ENSG00000152332   UHMK1   8478 Cellular
#> 2 ENSG00000162772    ATF3   2103 Cellular
#> 3 ENSG00000090621  PABPC4   3592 Cellular
#> 4 ENSG00000185483    ROR1   5832 Cellular
#> 5 ENSG00000058673 ZC3H11A  11825 Cellular
#> 6 ENSG00000257315   ZBED6  12481 Cellular
GeneInfo(sars,"LengthCategory")<-cut(GeneInfo(sars)$Length,c(0,1500,2500,Inf),
                                          labels=c("Short","Medium","Long"))
table(GeneInfo(sars)$LengthCategory)
#> 
#>  Short Medium   Long 
#>     73    160    812