DesignSemantics | R Documentation |
This is used to add additional columns to the Coldata
table by giving additional semantics to existing columns.
DesignSemantics(...)
... |
named parameter list of functions (see details) |
DesignSemantics returns a list of functions that is supposed to be used as semantics
parameter when calling MakeColdata
.
For each design vector element matching a name of this list the corresponding function is called by MakeColdata to add additional columns.
Each function takes two parameters, the first being the original column in the Coldata
table column, the second being its name.
Semantics.time is such a predefined function: Contents such as 3h or 30min are converted into a numerical value (in hours), and no4sU is converted into 0.
Semantics.concentration is such a predefined function: Contents such as 200uM or 1mM are converted into a numerical value (in uM), and no4sU is converted into 0.
By default, Semantics.time is used for the names duration.4sU and Experimental.time, and Semantics.concentration is used for concentration.4sU
a named list; the names should correspond to column names in the Coldata table, and the values are functions to add semantics to this table
MakeColdata
Semantics.time(c("5h","30min","no4sU"),"Test")
myfun <- function(s,name) {
r<-Semantics.time(s,name)
cbind(r,data.frame(hpi=paste0(r$duration.4sU+3,"h")))
}
sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
design=function(names)
MakeColdata(names,c("Cell",Design$dur.4sU,Design$Replicate),
semantics=DesignSemantics(duration.4sU=myfun)),
verbose=TRUE)
Coldata(sars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.