Coldata {grandR}R Documentation

Get the column annotation table or add additional columns to it

Description

The columns of a grandR object are samples or cells. The column annotation table contains meta information for the columns of a grandR object. When loaded from the GRAND-SLAM output, this this constructed from the sample/cell names by MakeColdata

Usage

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

Coldata(data, column) <- value

Arguments

data

A grandR object

column

The name of the additional annotation column; can also be a data frame (then value is ignored and the data frame is added)

value

The additional annotation per sample or cell

Details

A new column can be added either by data<-Coldata(data,name,values) or by Coldata(data,name)<-values.

Several new columns can be added by data<-Coldata(data,df) where df is either a data frame or matrix.

The column named Condition has a special meaning in this table: It is used by several functions to stratify the columns during the analysis (e.g. to estimate separate kinetic parameters with FitKinetics or it is used as covariate for LFC or LikelihoodRatioTest). For that reason there are special functions to set and get this column.

Value

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

See Also

GeneInfo, MakeColdata, Condition

Examples

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)


[Package grandR version 0.2.5 Index]