View source: R/ExponentialFitFunctions.R
SetupDatForGene.UpOrDown | R Documentation |
Check if gene is up- or down-regulated
SetupDatForGene.UpOrDown(
dat.impute.lst,
dat.meta.long,
jgene,
jmark1 = "H3K4me1",
jmark2 = "H3K36me3",
refmark = "H3K36me3",
returnlst = TRUE,
offset.zero = TRUE,
frac.cells.filter = 0.01,
MaxOrMin = max
)
dat.impute.lst |
list of matrices (rows are genes, columns are cells). Each matrix is a different histone mark |
dat.meta.long |
data frame of metadata for individual cells. Column names include cell, mark, and ptime.expnorm (pseudotime) |
jgene |
name of gene (row name) found in the matrix |
jmark1 |
name of mark1. In paper it is H3K4me1 |
jmark2 |
name of mark2. In paper it is H3K36me3 |
refmark |
name of refmark. In paper it is H3K36me3 |
returnlst |
return list split by mark |
offset.zero |
set min(signal) to be zero if upregulated, set max(signal) to be zero if downregulated |
frac.cells.filter |
deprecated input, ignore it |
MaxOrMin |
"max" or "min". Set "max" if gene is downregulated, set "min" if upregulated. |
dat.exprs.long.annot: Wrangled data frame for a gene, annotated with pseudotime across cells and marks. Ready for fitting exponentials.
upordown <- IsUpOrDown(dat.impute.lst, refmark = jmark2, jgene = jgene, dat.meta.long = dat.meta.long)
offset.fn <- ifelse(upordown == "up", min, max)
asymp.init.fn <- ifelse(upordown == "up", max, min)
dat.exprs.long.gene.lst <- SetupDatForGene.UpOrDown(dat.impute.lst, dat.meta.long, jgene, jmark1 = jmark1, jmark2 = jmark2, returnlst = TRUE, offset.zero = TRUE, MaxOrMin = offset.fn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.