Analyses {grandR} | R Documentation |
Analysis table functions
Description
Get analysis names and add or remove analyses
Usage
Analyses(data, description = FALSE)
AddAnalysis(
data,
name,
table,
by = NULL,
warn.present = TRUE,
warn.genes = TRUE
)
DropAnalysis(data, pattern = NULL)
Arguments
data |
A grandR object |
description |
if TRUE, also return the column names of each analysis table (i.e. a list named according to the analyses) |
name |
The user-defined analysis name |
table |
The analysis table to add |
by |
Specify a column that contains gene names or symbols (see details) |
warn.present |
Warn if an analysis with the same name is already present (and then overwrite) |
warn.genes |
Warn if genes are missing (and then add NA) |
pattern |
A regular expression that is matched to analysis names |
Details
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).
Value
Either the analysis names or a grandR data with added/removed slots or the metatable to be used with AddAnalysis
Functions
-
Analyses()
: Obtain the analyses names -
AddAnalysis()
: Add an analysis table -
DropAnalysis()
: Remove analyses from the grandR object
See Also
Examples
sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
design=c("Cell",Design$dur.4sU,Design$Replicate))
sars <- Normalize(sars) # default behavior is to update the default slot; this calls AddSlot
Slots(sars)
DefaultSlot(sars)
sars <- DropSlot(sars,"norm")
sars # note that the default slot reverted to count