Skip to contents

Get analysis names and add or remove analyses


Analyses(data, description = FALSE)

AddAnalysis(data, name, table, by = NULL, warn.present = TRUE)

DropAnalysis(data, pattern = NULL)



A grandR object


if TRUE, also return the column names of each analysis table (i.e. a list named according to the analyses)


The user-defined analysis name


The analysis table to add


Specify a column that contains gene names or symbols (see details)


Warn if an analysis with the same name is already present (and then overwrite)


A regular expression that is matched to analysis names


Either the analysis names or a grandR data with added/removed slots or the metatable to be used with AddAnalysis


The columns in the analysis tables are defined by the analysis method (e.g. "Synthesis","Half-life" and "rmse" by FitKinetics). A call to an analysis function might produce more than one table (e.g. because kinetic modeling is done for multiple Conditions). In this case, AddAnalysisTable produces more than one analysis table.

AddAnalysis is in most cases not called directly by the user, but is used by analysis methods to add their final result to a grandR object (e.g., FitKinetics,LikelihoodRatioTest,LFC,PairwiseDESeq2).

If it is called by the user (e.g. to add analysis results from external tools or from the literature, see pulse-chase vignette), then the user must make sure that either the rownames of the given table can be recognized as genes (names or symbols), or that there is a column in the table giving genes (this must be specified as the "by" parameter). The table does neither have to be sorted the same way the grandR object is, nor does it have to be complete. AddAnalysis will take care or reordering and inserting NA for missing genes (and it will issue a warning in case of missing genes).


  • Analyses(): Obtain the analyses names

  • AddAnalysis(): Add an analysis table

  • DropAnalysis(): Remove analyses from the grandR object

See also


sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
#> Warning: Duplicate gene symbols (n=1, e.g. MATR3) present, making unique!

sars <- Normalize(sars)     # default behavior is to update the default slot; this calls AddSlot
#> [1] "count" "ntr"   "alpha" "beta"  "norm" 
#> [1] "norm"
sars <- DropSlot(sars,"norm")
sars                        # note that the default slot reverted to count
#> grandR:
#> Read from /tmp/RtmpzQAFxV/temp_libpath746d2bf75aeb/grandR/extdata/sars
#> 1045 genes, 12 samples/cells
#> Available data slots: count,ntr,alpha,beta
#> Available analyses: 
#> Available plots: 
#> Default data slot: count