| sgrid_context {ssGrid} |
R Documentation |
map a pseudobulk context(the raw expression counts) onto the model state space
Description
Usage
sgrid_context(network, x,
missing = "baseline");
Arguments
network
[as SSystemNetwork]
x
the pseudobulk context data, could be a csv file path, a data.frame(the columns are gene and mean_counts), or a named numeric vector/list (the names are the gene symbols, the values are the raw counts).
missing
the value that used for the genes which is missing in the given context: baseline(default) means the minimal value of that gene in the training matrix, zero means the zero expression. [as string]
env
[as Environment]
Details
the model state is not the raw counts, but log2(max(counts,0)+pseudo) + delta, the per gene offset delta was generated in the model fitting step. So the pseudobulk context data must be transformed by this function before it can be used as the ODE initial state.
Authors
biosystem
Value
a named list of the model state space value, which can be used as the context parameter of the perturb and sgrid_simulate api.
clr value class
Examples
let ctx = sgrid_context(network, "/data/pseudobulk_context_A.csv");
let resp = perturb(network, genes, context = ctx);
[Package
ssGrid version 1.0.0.0
Index]