Skip to contents

This is the main function to access analysis results. For slot data, use GetTable (as a large matrix) or GetData (as tidy table).

Usage

GetAnalysisTable(
  data,
  analyses = NULL,
  regex = TRUE,
  columns = NULL,
  genes = Genes(data),
  by.rows = FALSE,
  gene.info = TRUE,
  name.by = "Symbol",
  prefix.by.analysis = TRUE
)

Arguments

data

A grandR object

analyses

One or several regex to be matched against analysis names (Analyses); all analysis tables if NULL

regex

Use regex for analyses (TRUE) or don't (FALSE, i.e. must specify the exact name)

columns

Regular expressions to select columns from the analysis table (all have to match!); all columns if NULL

genes

Restrict the output table to the given genes

by.rows

if TRUE, add rows if there are multiple analyses; otherwise, additional columns are appended; TRUE also sets prefix.by.analysis to FALSE!

gene.info

Should the table contain the GeneInfo values as well (at the beginning)?

name.by

A column name of Coldata(data). This is used as the rownames of the output table

prefix.by.analysis

Should the column names in the output prefixed by the analysis name?

Value

A data frame containing the analysis results

Details

The names for the output table are <Analysis name>.<columns name>

Examples

sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
                  design=c("Condition",Design$dur.4sU,Design$Replicate))
#> Warning: Duplicate gene symbols (n=1, e.g. MATR3) present, making unique!
sars<-LFC(sars,contrasts=GetContrasts(sars,group = "duration.4sU"))
head(GetAnalysisTable(sars,columns="LFC"))
#>                    Gene  Symbol Length     Type total.Mock vs SARS.1.LFC
#> UHMK1   ENSG00000152332   UHMK1   8478 Cellular               0.37014686
#> ATF3    ENSG00000162772    ATF3   2103 Cellular              -1.24995147
#> PABPC4  ENSG00000090621  PABPC4   3592 Cellular               0.08373593
#> ROR1    ENSG00000185483    ROR1   5832 Cellular               0.07724080
#> ZC3H11A ENSG00000058673 ZC3H11A  11825 Cellular              -0.56924380
#> ZBED6   ENSG00000257315   ZBED6  12481 Cellular              -0.55395950
#>         total.Mock vs SARS.2.LFC total.Mock vs SARS.3.LFC
#> UHMK1                  0.4395433               0.63126971
#> ATF3                  -2.4486712              -3.29885218
#> PABPC4                 0.1344397               0.16166905
#> ROR1                   0.1936823               0.01171992
#> ZC3H11A               -0.7000287              -0.71129270
#> ZBED6                 -0.6889175              -0.73232660
#>         total.Mock vs SARS.4.LFC
#> UHMK1                  0.3021589
#> ATF3                  -3.7827628
#> PABPC4                 0.2463332
#> ROR1                  -0.5008342
#> ZC3H11A               -0.8675652
#> ZBED6                 -0.8845711