| Cacoa | R Documentation | 
The class encompasses etc etc
n.coresNumber of cores (default=1)
verboseboolean Whether to provide verbose output with diagnostic messages (default=FALSE)
test.resultslist Results of the estimations, ready to use (default=list())
cachelist Intermediate results of the estimations, which can be used during some other computations (default=list())
data.objectlist The main object storing data (Conos or Seurat) (default=list())
sample.groups2-factor vector with annotation of groups/condition per sample (default=NULL)
cell.groupsNamed factor with cell names with cluster per cell (default=NULL)
embedding2D embedding to visualize the cells in (default=NULL)
sample.per.cellNamed factor with cell names (default=NULL)
ref.levelReference level for sample.group vector (default=NULL)
target.levelTarget/disease level for sample.group vector
sample.groups.paletteColor palette for the sample.groups (default=NULL)
cell.groups.paletteColor palette for the cell.groups (default=NULL)
plot.themeggplot2 theme for all plots (default=NULL)
plot.paramslist with parameters, forwarded to all plotEmbedding calls (default=NULL)
new()Initialize Cacoa class
Cacoa$new( data.object, sample.groups = NULL, cell.groups = NULL, sample.per.cell = NULL, ref.level = NULL, target.level = NULL, sample.groups.palette = NULL, cell.groups.palette = NULL, embedding = NULL, graph.name = NULL, assay.name = "RNA", n.cores = 1, verbose = TRUE, plot.theme = ggplot2::theme_bw(), plot.params = NULL )
data.objectObject used to initialize the Cacoa class. Either a raw or normalized count matrix, Conos object, or Seurat object.
sample.groupsa two-level factor on the sample names describing the conditions being compared (default: extracted from data.object)
cell.groupsvector Indicates cell groups with cell names (default: extracted from data.object)
sample.per.cellvector Sample name per cell (default: extracted from data.object)
ref.levelreference sample group level
target.leveltarget sample group level
sample.groups.paletteColor palette for the sample.groups (default=NULL)
cell.groups.paletteColor palette for the cell.groups (default=NULL)
embeddingembedding 2D embedding to visualize the cells in (default: extracted from data.object)
graph.namegraph name for Seurat object, ignored otherwise (default=NULL)
assay.nameassay name for Seurat object, ignored otherwise (default="RNA")
n.coresNumber of cores for parallelization (default=1)
verboseboolean Whether to provide verbose output with diagnostic messages (default=TRUE)
plot.themeggplot2 plot theme (default=ggplot2::theme_bw())
plot.paramslist with parameters, replacing defaults from embeddingPlot (default=NULL)
a new 'Cacoa' object
# Is it highly recommended that sample.groups and cell.groups are assigned in the initialization call. 
# Here, "con" is a Conos object.
\dontrun{
sample.groups <- c("control","control","disease","disease")
names(sample.groups) <- names(con$samples)
}
# cell.groups should be a named factor where names are cell names corresponding to cell names in the data object. 
# For Conos objects, they should overlap with rownames(con$embedding)
\dontrun{
cell.groups <- my.named.annotation.factor
cao <- Cacoa$new(data.object = con, sample.groups = sample.groups, cell.groups =  ref.level = "control", target.level = "disease")
}
estimateExpressionShiftMagnitudes()Calculate expression shift magnitudes of different clusters between conditions
Cacoa$estimateExpressionShiftMagnitudes( cell.groups = self$cell.groups, sample.per.cell = self$sample.per.cell, dist = NULL, dist.type = "shift", min.cells.per.sample = 10, min.samp.per.type = 2, min.gene.frac = 0.01, ref.level = self$ref.level, sample.groups = self$sample.groups, verbose = self$verbose, n.cores = self$n.cores, name = "expression.shifts", n.permutations = 1000, genes = NULL, n.pcs = NULL, top.n.genes = NULL, ... )
cell.groupsvector Indicates cell groups with cell IDs as names (default: stored vector)
sample.per.cellSample per cell (default=self$sample.per.cell)
distdistance metric: 'cor' - correlation distance, 'l1' - manhattan distance or 'l2' - euclidean (default=NULL, depends on dimensionality)
dist.typetype of expression distance: 'shift' (linear shift) 'var' (variance change) or 'total' (both) (default="shift")
min.cells.per.samplenumeric minimum cells per sample (default=10)
min.samp.per.typenumeric minimal number of samples per cell type for it to be included (default=2)
min.gene.fracnumeric minimal number of cells per cell type expressing a gene for it to be included (default=0.01)
ref.levelcharacter Reference level, e.g. "control" (default=self$ref.level)
sample.groupsnamed vector indicating sample groups with sample IDs as names (default: stored sample.groups)
verboseboolean Whether to show progress
n.coresinteger Number of cores for parallelization (default: stored integer)
namecharacter Test name (default="expression.shifts")
n.permutationsnumeric number of permutations for estimating normalization coefficient (default=1000)
genescharacter if provided, the expression distance is estimated only based on these genes (default=NULL)
n.pcsnumeric Number of principal components for estimating expression distance (default=NULL, no PCA)
top.n.genescharacter vector Vector of top genes to show (default=NULL)
...extra parameters to estimateExpressionChange
List including:
dist.df: a table with cluster distances (normalized if within.group.normalization=TRUE), cell type and the number of cells # TODO: update
p.dist.info: list of distance matrices per cell type
sample.groups: filtered sample groups
cell.groups: filtered cell groups
\dontrun{
cao$estimateExpressionShiftMagnitudes()
}
plotExpressionShiftMagnitudes()Plot results from cao$estimateExpressionShiftMagnitudes() (shift.type="normal") or cao$estimateCommonExpressionShiftMagnitudes() (shift.type="common")
Cacoa$plotExpressionShiftMagnitudes(
  name = "expression.shifts",
  type = "box",
  notch = TRUE,
  show.jitter = TRUE,
  jitter.alpha = 0.05,
  show.pvalues = c("adjusted", "raw", "none"),
  ylab = "normalized expression distance",
  ...
)namecharacter Results slot name (default="expression.shifts")
typecharacter type of a plot "bar" or "box" (default="bar")
notchboolean Whether to show notches in the boxplot version (default=TRUE)
show.jitterboolean Whether to show individual data points (default=FALSE)
jitter.alphanumeric Transparency value for the data points (default=0.05)
show.pvaluescharacter string Which p-values to plot. Accepted values are "none", "raw", or "adjusted". (default=c("adjusted", "raw", "none"))
ylabcharacter string Label of the y-axis (default="normalized expression distance")
...additional arguments
A ggplot2 object
\dontrun{
cao$estimateExpressionShiftMagnitudes()
cao$plotExpressionShiftMagnitudes()
}
estimatePerCellTypeDE()Alias for estimateDEPerCellType
Cacoa$estimatePerCellTypeDE(...)
...parameters fed to estimateDEPerCellType
A list of DE genes
\dontrun{
cao$estimatePerCellTypeDE() # Deprecated
}
estimateDEPerCellType()Estimate differential gene expression per cell type between conditions
Cacoa$estimateDEPerCellType( cell.groups = self$cell.groups, sample.groups = self$sample.groups, ref.level = self$ref.level, target.level = self$target.level, name = "de", test = "DESeq2.Wald", resampling.method = NULL, n.resamplings = 30, seed.resampling = 239, min.cell.frac = 0.05, covariates = NULL, common.genes = FALSE, n.cores = self$n.cores, cooks.cutoff = FALSE, independent.filtering = FALSE, min.cell.count = 10, n.cells.subsample = NULL, verbose = self$verbose, fix.n.samples = NULL, genes.to.omit = NULL, ... )
cell.groupsfactor specifying cell types (default=self$cell.groups)
sample.groups2-factor vector with annotation of groups/condition per sample (default=self$sample.groups)
ref.levelcharacter Reference level in 'sample.groups', e.g., ctrl, healthy (default=self$ref.level)
target.levelcharacter Target level in 'sample.groups', e.g., case, diseased (default=self$target.level)
namecharacter string Slot in which to save the results (default='de')
testcharacter string Which DESeq2 test to use. The available options are "LRT", "Wald". (default="DESeq2.Wald")
resampling.methodcharacter which resampling method should be used "loo" for leave-one-out or "bootstrap", (default=NULL, i.e. no resampling)
n.resamplingsnumeric Number of resamplings to perform (default=30)
seed.resamplingnumeric Seed to use for resamplings, input to set.seed() (default=239)
min.cell.fracnumeric Minimum fraction of cells to use to perform DE (default=0.05)
covariates(default=NULL)
common.genesboolean Whether to investigate common genes across cell groups (default=FALSE)
n.coresnumeric Number of cores for parallelization
cooks.cutoffboolean cooksCutoff for DESeq2 (default=FALSE)
independent.filteringboolean independentFiltering parameter for DESeq2 (default=FALSE)
min.cell.countnumeric minimum number of cells that need to be present in a given cell type in a given sample in order to be taken into account (default=10)
n.cells.subsampleinteger Number of cells to subsample (default=NULL)
verboseboolean Whether to show progress
fix.n.samplesSamples to be provided if resampling.method='fix.samples'.
genes.to.omitcharacter Genes to omit from calculations (default = NULL)
...additional parameters
A list of DE genes
\dontrun{
cao$estimateDEPerCellType()
}
estimateDEStabilityPerCellType()Estimate DE stability per cell type
Cacoa$estimateDEStabilityPerCellType( de.name = "de", name = "de.jaccards", top.n.genes = NULL, p.val.cutoff = NULL )
de.namecharacter string DE results slot name (default='de')
namecharacter string Name for storing results (default='de.jaccards')
top.n.genesnumeric Number of top DE genes to return (default=NULL)
p.val.cutoffnumeric The p-value cutoff to apply for returned DE values (default=NULL)
A ggplot2 object
\dontrun{
cao$estimateDEPerCellType()
cao$estimateDEStabilityPerCellType()
}
estimateDEStabilityPerGene()Estimate DE stability per gene
Cacoa$estimateDEStabilityPerGene( de.name = "de", top.n.genes = 500, p.adj.cutoff = NULL, visualize = FALSE )
de.namecharacter string DE results slot name (default='de')
top.n.genesnumeric Number of top DE genes to return (default=500)
p.adj.cutoffnumeric The adjusted p-value cutoff to apply for returned DE values (default=NULL)
visualizeboolean Whether to visualize results (default=FALSE)
A ggplot2 object
\dontrun{
cao$estimateDEPerCellType()
cao$estimateDEStabilityPerGene()
}
plotDEStabilityPerCellType()Plot DE stability per cell type
Cacoa$plotDEStabilityPerCellType( name = "de.jaccards", notch = FALSE, show.jitter = TRUE, jitter.alpha = 0.05, show.pairs = FALSE, sort.order = TRUE, pallete = self$cell.groups.palette, set.fill = TRUE )
namecharacter string DE stability results slot name (default='de.jaccards')
notchboolean Whether to show notches on plot (default=FALSE)
show.jitterboolean Whether to show jitter on plots (default=TRUE)
jitter.alphanumeric Parameter for jitter (default=0.05)
show.pairsboolean Whether to show pairs (default=FALSE)
sort.orderboolean Whether to show notches in the boxplot version (default=TRUE)
palleteplot palette (default=self$cell.groups.palette)
set.fill(default=TRUE)
A ggplot2 object
\dontrun{
cao$estimateDEPerCellType()
cao$estimateDEStability()
cao$plotDEStabilityPerCellType)
}
plotDEStabilityPerGene()Plot DE stability per gene
Cacoa$plotDEStabilityPerGene( name = "de", cell.type = NULL, stability.score = "stab.median.rank" )
namecharacter string DE results slot name (default='de')
cell.typecharacter If set only show stability for a specific cell type in DE results (default=NULL)
stability.scorecharacter string Any of "stab.median.rank", "stab.mean.rank", or "stab.var.rank" (default='stab.median.rank')
A ggplot2 object
\dontrun{
cao$estimateDEPerCellType()
cao$estimateDEStabilityPerGene()
cao$plotDEStabilityPerGene()
}
plotNumberOfDEGenes()Plot number of significant DE genes
Cacoa$plotNumberOfDEGenes( name = "de", p.adjust = TRUE, pvalue.cutoff = 0.05, show.resampling.results = TRUE, show.jitter = FALSE, jitter.alpha = 0.05, type = "bar", notch = TRUE, ... )
namestring Field name where the test results are stored
p.adjustboolean Whether the cutoff should be based on the adjusted P value (default=TRUE)
pvalue.cutoffnumeric P-value cutoff (default=0.05)
show.resampling.resultsboolean Whether to show uncertainty based on resampling results (default=TRUE)
show.jitterboolean Whether to apply jitter to the ggplot (default=FALSE)
jitter.alphanumeric Opacity setting (default=0.05)
typecharacter string Any of 'box', 'point', or 'bar' (default='bar')
notchboolean Whether to show notches (default=TRUE)
...additional parameters passed to plotMeanMedValuesPerCellType()
A ggplot2 object
\dontrun{
cao$estimateDEPerCellType()
cao$plotNumberOfDEGenes()
}
plotVolcano()Make volcano plots
Cacoa$plotVolcano( name = "de", cell.types = NULL, palette = NULL, build.panel = TRUE, n.col = 3, color.var = "CellFrac", ... )
namecharacter string DE results slot name (default='de')
cell.typescharacter If set will plot only for selected cell types in DE results (default=NULL)
paletteplot palette If NULL will use standard palette (default=NULL)
build.panelboolean (default=TRUE)
n.colnumeric Number of columns (default=3)
color.varcharacter string (default='CellFrac')
...additional parameters fed to plotVolcano
A ggplot2 object ## Not run: cao$estimateDEPerCellType() cao$plotVolcano() ## End(Not run)
saveDeAsJson()Save DE results as JSON files
Cacoa$saveDeAsJson( saveprefix = NULL, dir.name = "JSON", de.raw = NULL, sample.groups = self$sample.groups, de.name = "de", ref.level = self$ref.level, gene.metadata = NULL, verbose = self$verbose )
saveprefixcharacter Prefix for created files (default=NULL)
dir.namecharacter Name for directory with results (default="JSON")
de.rawList of DE results. If NULL will use stored DE results defined by "de.name" (default=NULL)
sample.groupsa two-level factor on the sample names describing the conditions being compared (default: stored vector)
de.namecharacter string DE results slot name (default='de')
ref.levelcharacter Reference level in 'sample.groups', e.g., ctrl, healthy, wt (default=NULL)
gene.metadata(default=NULL)
verboseboolean Whether to output verbose messages (default=self$verbose)
saved JSON objects
\dontrun{
cao$estimateDEPerCellType()
cao$saveDeAsJson()
}
plotEmbedding()Plot embedding
Cacoa$plotEmbedding( embedding = self$embedding, color.by = NULL, plot.theme = self$plot.theme, ... )
embeddingA cell embedding to use (two-column data frame with rownames corresponding to cells) (default: stored embedding object)
color.bycolor cells by 'cell.groups', 'condition' or 'sample'. Overrides groups and palette. (default: NULL)
plot.themeplot theme to use (default: self$plot.theme)
...other parameters passed to embeddingPlot
embedding plot as output by sccore::embeddingPlot
\dontrun{
cao$plotEmbedding()
}
estimateOntology()Estimate ontology terms based on DEs
Cacoa$estimateOntology(
  type = c("GO", "DO", "GSEA"),
  name = NULL,
  de.name = "de",
  org.db,
  n.top.genes = 500,
  p.adj = 1,
  p.adjust.method = "BH",
  readable = TRUE,
  min.gs.size = 10,
  max.gs.size = 500,
  keep.gene.sets = FALSE,
  ignore.cache = NULL,
  de.raw = NULL,
  verbose = self$verbose,
  n.cores = self$n.cores,
  ...
)typecharacter Ontology type, either GO (gene ontology) or DO (disease ontology). Please see DOSE package for more information (default="GO")
namecharacter If NULL will use type to look for ontology results (default=NULL)
de.namecharacter string DE results slot name (default='de')
org.dbOrganism database, e.g., org.Hs.eg.db::org.Hs.eg.db for human or org.Ms.eg.db::org.Ms.eg.db for mouse. Input must be of class 'OrgDb'
n.top.genesnumeric Number of top highest-expressed genes to consider (default=500)
p.adjnumeric adjust-pvalues cutoff fed to getDEEntrezIdsSplitted() (default: 1)
p.adjust.methodcharacter string Method for calculating adjusted p-values (default="BH")
readableboolean Mapping gene ID to gene name (default=TRUE)
min.gs.sizenumeric Minimal geneset size, please see clusterProfiler package for more information (default=5)
max.gs.sizenumeric Minimal geneset size, please see clusterProfiler package for more information (default=5e2)
keep.gene.setsboolean (default=FALSE)
ignore.cache(default=NULL)
de.raw(default=NULL)
verboseboolean Whether to show progress
n.coresnumeric Number of cores for parallelization
...further argument for ontology estimation. Pass nPerm with type='GSEA' to use fgseaSimple method
min.genesnumeric Minimum number of input genes overlapping with ontologies (default=0)
qvalue.cutoffnumeric Q value cutoff, please see clusterProfiler package for more information (default=0.2)
A list containing a list of terms per ontology, and a data frame with merged results
\dontrun{
cao$estimateDEPerCellType()
library(org.Hs.eg.db)
cao$estimateOntology(type = "GSEA", org.db = org.Hs.eg.db)
}
estimateOntologyFamilies()Estimate ontology families based on ontology results
Cacoa$estimateOntologyFamilies(name = "GO", p.adj = 0.05)
namecharacter Type of ontology result: "GO", "GSEA", or "DO" (default="GO")
p.adjdouble Cutoff for adjusted p (default=0.05)
List of families and ontology data per cell type
\dontrun{
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$estimateOntologyFamilies(name = "GSEA")
}
getFamiliesPerGO()Identify families containing a specific ontology term or ID
Cacoa$getFamiliesPerGO( name = "GO", go.term = NULL, go.id = NULL, common = FALSE )
namecharacter string Type of ontology result: "GO", "GSEA", or "DO" (default="GO")
go.termcharacter vector with term description(s) (default=NULL)
go.idcharacter vector with ID(s) (default=NULL)
commonboolean Only identify families with all the supplied terms or IDs (default = FALSE)
Data frame
\dontrun{
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$estimateOntologyFamilies(name = "GSEA")
cao$getFamiliesPerGO(name = "GSEA", go.term = "antigen presentation") # Either go.term og go.id has to be specified 
}
plotNumOntologyTermsPerType()Bar plot of ontology terms per cell type
Cacoa$plotNumOntologyTermsPerType( name = "GO", genes = "up", p.adj = 0.05, q.value = 0.2, min.genes = 1, families = FALSE )
namecharacter string Type of ontology result: "GO", "GSEA", or "DO" (default="GO")
genesSpecify which genes to plot, can either be 'down', 'up' or 'all' (default="up")
p.adjnumeric adjusted p-value cutoff (default=0.05)
q.valuenumeric Q value used for filtering (default=0.2)
min.genesinteger Minimum number of overlapping genes in terms (default=1)
familiesboolean Plot family terms (default=FALSE)
A ggplot2 object
\dontrun{
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$plotNumOntologyTermsPerType()
}
plotOntology()Plot a dotplot of ontology terms with adj. P values for a specific cell subgroup
Cacoa$plotOntology(
  cell.type,
  name = "GO",
  plot = "dot",
  genes = c("up", "down", "all"),
  subtype = c("BP", "CC", "MF"),
  n = 20,
  p.adj = 0.05,
  min.genes = 1,
  ...
)cell.typecharacter string Cell type to plot
namecharacter string Type of ontology result: "GO", "GSEA", or "DO" (default="GO")
plotcharacter string Type of plot to return (default="dot"). Either "dot" or "bar".
genesSpecify which genes to plot, can either be 'down', 'up' or 'all' (default="up")
subtypecharacter string Ontology type, must be either "BP", "CC", or "MF" (GO types), "GO" or "DO" (default="GO")
ninteger Number of ontology terms to show. Not applicable when order is 'unique' or 'unique-max-row' (default=10)
p.adjnumeric Adjusted P cutoff (default=0.05)
min.genesinteger Minimum overlapping genes per term (default=1)
...additional parameters passed to enrichplot::dotplot() or enrichplot::barplot()
cell.subgroupcharacter Specific cell group to plot
A ggplot2 object
\dontrun{
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$plotOntology(name = "GSEA", cell.type = "Neurons") # "cell.type" is a cell type in self$cell.groups used for calculating ontologies
}
plotOntologyHeatmap()Plot a heatmap of ontology P values per cell type
Cacoa$plotOntologyHeatmap( name = "GO", genes = "up", subtype = "BP", p.adj = 0.05, q.value = 0.2, min.genes = 1, top.n = Inf, legend.position = "left", selection = "all", cluster = TRUE, cell.subgroups = NULL, row.order = TRUE, col.order = TRUE, max.log.p = 10, only.family.children = FALSE, description.regex = NULL, description.exclude.regex = NULL, clust.naming = "medoid", readjust.p = TRUE, p.adjust.method = "BH", palette = NULL, color.range = NULL, return.info = FALSE, ... )
namestring Field name where the test results are stored
genesSpecify which genes to plot, can either be 'down' for downregulated genes, 'up' or 'all' (default="up")
subtypecharacter string (default="BP")
p.adjnumeric Cut-off for adjusted p-values (default=0.05)
q.valuenumeric (default=0.2)
min.genesinteger Minimum genes (default=1)
top.nNumber of terms to show (default=Inf)
legend.positionPosition of legend in plot. See ggplot2::theme (default="left")
selectionOrder of rows in heatmap. Can be 'unique' (only show terms that are unique for any cell type); 'common' (only show terms that are present in at least two cell types); 'all' (all ontology terms) (default="all")
clusterboolean Whether to show GO clusters or raw GOs (default=TRUE)
cell.subgroupsCell groups to plot (default=NULL). This affects only visualization, but not clustering.
row.orderboolean Whether to order rows (default=TRUE)
col.orderboolean Whether to order columns (default=TRUE)
max.log.pnumeric Maximum log P value, used for coloring (default=10)
only.family.childrenboolean Whether to only include family children (default=FALSE)
description.regex(default=NULL)
description.exclude.regex(default=NULL)
clust.namingField with the results for GO clustering. Ignored if clusters == FALSE.
readjust.pboolean Whether to re-adjust p-values (default=TRUE)
p.adjust.methodcharacter string Method used to adjust p-values (default="BH")
paletteplot palette. If NULL default will be used (default=NULL)
color.rangevector with two values for min/max values of p-values
return.infoboolean (default=FALSE)
...parameters forwarded to plotHeatmap
typeOntology, must be either "BP", "CC", or "MF" (GO types) or "DO" (default="GO")
A ggplot2 object
\dontrun{
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$plotOntologyHeatmap()
cao$estimateOntologyFamilies(name = "GSEA")
cao$plotOntologyHeatmap(name = "GSEA", only.family.children = TRUE)
}
plotOntologyHeatmapCollapsed()Plot a heatmap of ontology p-values per cell type heatmap, collapsed
Cacoa$plotOntologyHeatmapCollapsed( name = "GO", genes = "up", subtype = "BP", p.adj = 0.05, q.value = 0.2, min.genes = 1, n = 20, legend.position = "left", selection = "all", max.log.p = 10, cluster = TRUE, cell.subgroups = NULL, palette = NULL, row.order = TRUE, col.order = TRUE, only.family.children = FALSE, readjust.p = TRUE, p.adjust.method = "BH", description.regex = NULL, description.exclude.regex = NULL, distance = "manhattan", clust.method = "complete", clust.naming = "consensus", n.words = 5, exclude.words = NULL, return.info = FALSE, ... )
namecharacter string Type of ontology result: "GO", "GSEA", or "DO" (default="GO")
genescharacter Specify which genes to plot, can either be 'down' for downregulated genes, 'up' or 'all' (default="up")
subtypecharacter Ontology type, must be either "BP", "CC", or "MF" (GO types) or "DO" (default="GO")
p.adjnumeric Adj. P value cutoff (default=0.05)
q.valuenumeric Q value cutoff (default=0.2)
min.genesinteger Minimum number of overlapping genes per term (default=1)
ninteger Number of terms to plot (default=20)
legend.positioncharacter Position of legend in plot. See ggplot2::theme (default="left")
selectioncharacter Order of rows in heatmap. Can be 'unique' (only show terms that are unique for any cell type); 'common' (only show terms that are present in at least two cell types); 'all' (all ontology terms) (default="all")
max.log.pnumeric Maximum log P value, used for coloring (default=10)
clusterWhether to show GO clusters or raw GOs (default=TRUE)
cell.subgroupsCell groups to plot (default=NULL). This affects only visualization, but not clustering.
palette(default=NULL)
row.orderboolean Whether to order rows (default=TRUE)
col.orderboolean Whether to order columns (default=TRUE)
only.family.childrenboolean (default=FALSE)
readjust.pboolean Whether to re-adjust p-values (default=TRUE)
p.adjust.methodcharacter string Method for calculating adjusted p-values (default="BH")
description.regex(default=NULL)
description.exclude.regex(default=NULL)
distancecharacter string (default="manhattan")
clust.methodcharacter string (default="complete")
clust.namingField with the results for GO clustering. Ignored if clusters == FALSE.
n.wordsinteger (default=5)
exclude.words(default=NULL)
return.infoboolean Whether to return the info (default=FALSE)
...parameters forwarded to plotHeatmap
top.nNumber of terms to show (default=Inf)
color.rangevector with two values for min/max values of p-values
A ggplot2 object
\dontrun{
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$plotOntologyHeatmapCollapsed(name = "GSEA")
cao$estimateOntologyFamilies(name = "GSEA")
cao$plotOntologyHeatmapCollapsed(name = "GSEA", only.family.children = TRUE)
}
plotOntologySimilarities()Plot correlation matrix for ontology terms between cell types
Cacoa$plotOntologySimilarities(
  name = "GO",
  subtype = c("BP", "MF", "CC"),
  genes = "up",
  p.adj = 0.05,
  only.family.children = FALSE,
  q.value = 0.2,
  min.genes = 1
)namecharacter string Type of ontology result: "GO", "GSEA", or "DO" (default="GO")
subtypecharacter Type of ontology result, must be "BP", "MF", or "CC" (default="BP")
genesSpecify which genes to plot, can either be 'down', 'up' or 'all' (default="up")
p.adjnumeric Cut-off for adjusted p-values (default=0.05)
only.family.childrenboolean Plot similarities for ontology family lonely children (default=FALSE)
q.valuenumeric Q value for filtering (default=0.2)
min.genesnumeric Minimum number of overlapping genes per term (default=1)
A ggplot2 object
\dontrun{
cao$estimateDEPerCellType()
cao$estimateOntology()
cao$plotOntologySimilarities()
}
plotOntologyFamily()Plot related ontologies in one hierarchical network plot
Cacoa$plotOntologyFamily(
  name = "GO",
  cell.type,
  family = NULL,
  genes = "up",
  subtype = "BP",
  plot.type = c("complete", "dense", "minimal"),
  show.ids = FALSE,
  string.length = 14,
  legend.label.size = 1,
  legend.position = "topright",
  verbose = self$verbose,
  n.cores = self$n.cores,
  ...
)namecharacter string Type of ontology result: "GO", "GSEA", or "DO" (default="GO")
cell.typecharacter Cell subtype to plot
familynumeric Family within cell subtype to plot (default=NULL)
genescharacter string Only for GO results: Direction of genes, must be "up", "down", or "all" (default="up")
subtypecharacter Type of ontology result, must be "BP", "MF", or "CC" (default="BP")
plot.typecharacter Extend of family network Can be "complete" (entire network), "dense" (show 1 parent for each significant term), or "minimal" (only show significant terms) (default="complete")
show.idsboolean Whether to show ontology IDs instead of names (default=FALSE)
string.lengthinteger Length of strings for wrapping in order to fit text within boxes (default: 14)
legend.label.sizenumeric Size og legend labels (default: 1)
legend.positionnumeric Position of legend (default: topright)
verboseboolean Print messages (default=self$verbose)
n.coresinteger Number of cores to use for parallelization (default=self$n.cores)
...additional parameters passed to plotOntologyFamily
Rgraphviz object
\dontrun{
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$estimateOntologyFamilies(name = "GSEA")
cao$plotOntologyFamily(name = "GSEA", cell.type = "Neurons") # "cell.type" is a cell type in self$cell.groups used for calculating ontologies
}
saveOntologyAsTable()Save ontology results as a table
Cacoa$saveOntologyAsTable( file, name = "GO", subtype = NULL, genes = NULL, p.adj = 0.05, sep = "\t", ... )
filecharacter string File name passed to write.table(). Set to NULL to return the table instead of saving.
namestring Field name where the test results are stored
subtypecharacter string Only for GO results: Type of result to filter by, must be "BP", "MF", or "CC" (default: NULL)
genescharacter Direction of genes to filter by, must be "up", "down", or "all" (default: NULL)
p.adjnumeric Cut-off for adjusted p-values (default=0.05)
sepcharacter Separator (default: "\t", tab)
...additional arguments passed to write.table()
table for import into text editor
\dontrun{
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$saveOntologyAsTable(name = "GSEA", file = "Ontologies.tsv")
}
saveFamiliesAsTable()Save family results as a table
Cacoa$saveFamiliesAsTable( file, name = "GO", subtype = NULL, genes = NULL, p.adj = 0.05, sep = "\t", ... )
filecharacter string File name passed to write.table(). Set to NULL to return the table instead of saving.
namestring Field name where the test results are stored
subtypecharacter Type of result to filter by, must be "BP", "MF", or "CC" (default=NULL)
genescharacter Direction of genes to filter by, must be "up", "down", or "all" (default=NULL)
p.adjnumeric Adjusted P to filter by (default=0.05)
sepcharacter Separator (default = "\t", tab)
...additional arguments passed to write.table()
typecharacter string Type of ontology result, i.e., GO, GSEA, or DO (default='GO')
table for import into text editor
\dontrun{
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$estimateOntologyFamilies(name = "GSEA")
cao$saveFamiliesAsTable(name = "GSEA", file = "Families.tsv")
}
plotCellGroupSizes()Plot the cell group sizes or proportions per sample
Cacoa$plotCellGroupSizes( cell.groups = self$cell.groups, show.significance = FALSE, filter.empty.cell.types = TRUE, proportions = TRUE, palette = self$sample.groups.palette, ... )
cell.groupsfactor Cell annotations with cell IDs as names (default=self$cell.groups)
show.significanceboolean show statistical significance between sample groups. wilcox.test was used; (* < 0.05; ** < 0.01; *** < 0.001) (default=FALSE)
filter.empty.cell.typesboolean Remove cell types without cells (default=TRUE)
proportionsboolean Plot proportions or absolute numbers (default=TRUE)
palettecolor palette to use for conditions (default: stored $sample.groups.palette)
...additional plot parameters, forwarded to plotCountBoxplotsPerType
A ggplot2 object
\dontrun{
cao$plotCellGroupSizes()
}
plotCellGroupAbundanceVariation()Plot the cell group sizes or proportions per sample
Cacoa$plotCellGroupAbundanceVariation( cell.groups = self$cell.groups, type = "mad", rotate.xticks = TRUE, min.rel.abundance = 0.05 )
cell.groupscharacter Cell annotations with cell IDs as names(default=self$cell.groups)
typecharacter string Must be "mad", "sd", "sample.num", or "sample.frac" (default='mad')
rotate.xticksboolean Turn x labels 90 degrees (default=TRUE)
min.rel.abundancenumeric Minimum relative abundance to plot (default=0.05)
ggplot2 object
\dontrun{
cao$plotCellGroupAbundanceVariation()
}
plotCodaSpace()Plot compositions in CoDA space (PCA or CDA)
Cacoa$plotCodaSpace( space = "CDA", cell.groups = self$cell.groups, font.size = 3, cells.to.remain = NULL, cells.to.remove = NULL, samples.to.remove = NULL, palette = self$sample.groups.palette )
spacecharacter either 'PCA' or 'CDA' (default="CDA")
cell.groupsvector Indicates cell groups with cell IDs as names (default: stored vector)
font.sizenumeric Font size (default=3)
cells.to.remaincharacter Specific cell types to keep (default=NULL)
cells.to.removecharacter Specific cell types to remove (default=NULL)
samples.to.removecharacter Specific samples to remove (default=NULL)
paletteplot palette (default=self$sample.groups.palette)
A ggplot2 object
\dontrun{
cao$estimateCellLoadings()
cao$plotCodaSpace()
}
plotContrastTree()Plot contrast tree
Cacoa$plotContrastTree(
  cell.groups = self$cell.groups,
  palette = self$sample.groups.palette,
  name = "coda",
  cells.to.remain = NULL,
  cells.to.remove = NULL,
  filter.empty.cell.types = TRUE,
  adjust.pvalues = TRUE,
  h.method = c("both", "up", "down"),
  reorder.tree = TRUE,
  ...
)cell.groupscharacter Cell annotations with cell IDs as name (default=self$cell.groups)
paletteplot palette (default=self$sample.groups.palette)
namecharacter Results name slot (default='coda')
cells.to.remaincharacter Specific cell types to keep (default=NULL)
cells.to.removecharacter Specific cell types to remove (default=NULL)
filter.empty.cell.typesboolean Remove cell types without cells (default=TRUE)
adjust.pvaluesboolean Adjust P values or not (default=TRUE)
h.methodcharacter Must be one of 'both', 'up', 'down' (default='both')
reorder.treeboolean Reorder tree or not (default=TRUE)
...additional parameters
A ggplot2 object
\dontrun{
cao$estimateCellLoadings()
cao$plotContratsTree()
}
plotCompositionSimilarity()Plot composition similarity
Cacoa$plotCompositionSimilarity(
  cell.groups = self$cell.groups,
  cells.to.remain = NULL,
  cells.to.remove = NULL,
  palette = brewerPalette("YlOrRd", rev = FALSE),
  ...
)cell.groupscharacter Cell annotations with cell IDs as name (default=self$cell.groups)
cells.to.remaincharacter Specific cell types to keep (default=NULL)
cells.to.removecharacter Specific cell types to remove (default=NULL)
paletteplot palette (default=brewerPalette("YlOrRd", rev=FALSE))
...parameters passed to plotHeatmap()
A ggplot2 object
\dontrun{
cao$estimateCellLoadings()
cao$plotCompositionSimilarity()
}
estimateCellLoadings()Estimate cell loadings
Cacoa$estimateCellLoadings( n.boot = 1000, ref.cell.type = NULL, name = "coda", n.seed = 239, cells.to.remove = NULL, cells.to.remain = NULL, samples.to.remove = NULL, filter.empty.cell.types = TRUE, n.cores = self$n.cores, verbose = self$verbose, method = "lda" )
n.bootnumeric Number of boot straps (default=1000)
ref.cell.typecharacter Reference cell type (default=NULL)
namecharacter Results name slot (default='coda')
n.seednumeric Seed number for reproducibility (default=239)
cells.to.removecharacter Specific cell types to keep (default=NULL)
cells.to.remaincharacter Specific cell types to remove (default=NULL)
samples.to.removecharacter Specific samples to remove (default=NULL)
filter.empty.cell.typesboolean Remove cell types without cells (default=TRUE)
n.coresinteger Number of cores to use for parallelization (default=self$n.cores)
verboseboolean Print messages (default=self$verbose)
methodcharacter One of 'lda', svm', 'cda', or 'cda.std' (default=lda)
resulting cell loadings
\dontrun{
cao$estimateCellLoadings()
}
plotCellLoadings()Plot Loadings
Cacoa$plotCellLoadings( alpha = 0.01, palette = self$cell.groups.palette, font.size = NULL, name = "coda", ordering = "pvalue", show.pvals = TRUE, ... )
alphanumeric Transparency (default=0.01)
paletteplot palette specification for cell types (default: stored $cell.groups.palette)
font.sizenumeric Font size (default=NULL)
namecharacter Results slot name (default='coda')
orderingcharacter Must be one of "pvalue", "loadings" (default='pvalue')
show.pvalsboolean Show P values (default=TRUE)
...additional parameters plotCellLoadings()
A ggplot2 object
\dontrun{
cao$estimateCellLoadings()
cao$plotCellLoadings()
}
estimateCellDensity()Estimate cell density in giving embedding
Cacoa$estimateCellDensity( bins = 400, method = "kde", name = "cell.density", beta = 30, estimate.variation = TRUE, sample.groups = self$sample.groups, verbose = self$verbose, n.cores = self$n.cores, bandwidth = 0.05, ... )
binsnumeric Number of bins for density estimation (default=400)
methodcharacter string Density estimation method, graph: graph smooth based density estimation. kde: embedding grid based density estimation. (default: 'kde')
namestring Field name where the test results are stored
betanumeric Smoothing strength parameter of the heatFilter for graph based cell density (default=30)
estimate.variationboolean Estimate variation (default=TRUE)
sample.groups2-factor vector with annotation of groups/condition per sample (default=self$sample.groups)
verboseboolean Print messages (default=self$verbose)
n.coresinteger Number of cores to use for parallelization (default=self$n.cores)
bandwidthnumeric KDE bandwidth multiplier (default=0.5). The full bandwidth is estimated by multiplying this value on the difference between 90% and 10% of the corresponding embedding dimension. Set it to NULL to use bandwidth.nrd estimator. (default=0.05)
...additional arguments
estimated cell densities
\dontrun{
cao$estimateCellDensity()
}
plotCellDensity()Plot cell density depending on the method that was used for estimating cao$test.resulst[[name]]
Cacoa$plotCellDensity( show.grid = TRUE, add.points = TRUE, size = 0.1, show.legend = FALSE, palette = NULL, point.col = "#313695", contours = NULL, contour.color = "black", contour.conf = "10%", name = "cell.density", show.cell.groups = TRUE, cell.groups = self$cell.groups, font.size = c(2, 4), color.range = c(0, "99%"), ... )
show.gridboolean Whether to show grid (default=TRUE)
add.pointsboolean Add points to cell density figure (default=TRUE)
sizenumeric Point size (default=0.1)
show.legendboolean Show legend (default=FALSE)
paletteplot palette (default=NULL)
point.colcharacter Point color (default='#313695')
contourscharacter Specify cell types for contour, multiple cell types are also supported (default=NULL)
contour.colorcharacter Color for contour line (default='black')
contour.confcharacter Confidence interval of contour (default='10%')
namecharacter Slot in which to saved results from estimateCellDensity (default='cell.density')
show.cell.groupsboolean Plot cell group names (default=TRUE)
cell.groupscharacter Cell annotations with cell IDs as name (default=self$cell.groups)
font.sizenumeric Font size (default=c(2, 4))
color.rangecharacter Color range (default=c(0, "99%"))
...plot style parameters forwarded to sccore::styleEmbeddingPlot.
A ggplot2 object
\dontrun{
cao$estimateCellDensity()
cao$plotCellDensity()
}
plotCellDensityVariation()Plot cell density variation
Cacoa$plotCellDensityVariation(
  type = "mad",
  plot.type = "embedding",
  name = "cell.density",
  cutoff = NULL,
  condition = c("both", "ref", "target"),
  ...
)typecharacter Must be one of "mad", "sd", "sample.frac" (default='mad')
plot.typecharacter Must be one of "hist", "embedding" (default='embedding')
namecharacter Results slot name (default='cell.density')
cutoffnumeric Score cutoff (default=NULL)
conditioncharacter Must be one of 'both', 'ref', 'target' (default="both")
...additional arguments
ggplot2 object
\dontrun{
cao$estimateCellDensity(estimate.variation=TRUE)
cao$plotCellDensityVariation()
}
estimateDiffCellDensity()Estimate differential cell density
Cacoa$estimateDiffCellDensity( type = "permutation", adjust.pvalues = NULL, name = "cell.density", n.permutations = 400, smooth = TRUE, verbose = self$verbose, n.cores = self$n.cores, ... )
typecharacter method to calculate differential cell density; permutation, t.test, wilcox or subtract (target subtract ref density);
adjust.pvaluesboolean Whether to adjust Z-scores for multiple comparison using BH method (default: FALSE for type='subtract', TRUE for everything else)
namecharacter Slot with results from estimateCellDensity. New results will be appended there. (Default: 'cell.density')
n.permutationsnumeric Number of permutations (default=400)
smoothboolean Smooth results (default=TRUE)
verboseboolean Print messages (default=self$verbose)
n.coresinteger Number of cores to use for parallelization (default=self$n.cores)
...additional arguments to the function
estimated differential cell densities
\dontrun{
cao$estimateCellDensity()
cao$estimateDiffCellDensity()
}
plotDiffCellDensity()Estimate differential cell density
Cacoa$plotDiffCellDensity( type = NULL, name = "cell.density", size = 0.2, palette = NULL, adjust.pvalues = NULL, contours = NULL, contour.color = "black", contour.conf = "10%", plot.na = FALSE, color.range = NULL, mid.color = "gray95", scale.z.palette = adjust.pvalues, min.z = qnorm(0.9), ... )
typecharacter method to calculate differential cell density; t.test, wilcox or subtract (target subtract ref density);
namecharacter Slot with results from estimateCellDensity. New results will be appended there. (Default: 'cell.density')
sizenumeric (default=0.2)
palettecolor palette, default is c('blue','white','red')
adjust.pvaluesboolean Adjust P values (default=NULL)
contourscharacter Specify cell types for contour, multiple cell types are also supported (default: NULL)
contour.colorcharacter color for contour line (default: 'black')
contour.confcharacter confidence interval of contour (default: '10%')
plot.naboolean Plot NAs (default=FALSE)
color.rangenumeric, e.g. c(0,90) (default=NULL)
mid.colorcharacter Color code for medium value in color range (default='gray95')
scale.z.paletteboolean Scale plot palette for Z scores (default=adjust.pvalues)
min.znumeric Minimum Z score to plot (default=qnorm(0.9))
...additional parameters
ggplot2 object
\dontrun{
cao$estimateCellDensity()
cao$estimateDiffCellDensity()
cao$plotDiffCellDensity()
}
plotExpressionDistance()Plot inter-sample expression distance. The inputs to this function are the results from cao$estimateExpressionShiftMagnitudes()
Cacoa$plotExpressionDistance( name = "expression.shifts", joint = FALSE, palette = self$sample.groups.palette, show.significance = FALSE, ... )
namecharacter Test results to plot (default=expression.shifts)
jointboolean Whether to show joint boxplot with the expression distance weighed by the sizes of cell types (default: TRUE), or show distances for each individual cell type
paletteplot palette (default=self$sample.groups.palette)
show.significanceboolean Whether to show statistical significance between sample groups. wilcox.test was used; (* < 0.05; ** < 0.01; *** < 0.001)
...other plot parameters, forwarded to plotCountBoxplotsPerType
A ggplot2 object
\dontrun{
cao$estimateExpressionShiftMagnitudes()
cao$plotExpressionDistance()
}
getSampleDistanceMatrix()Plot inter-sample expression distance. The inputs to this function are the results from cao$estimateExpressionShiftMagnitudes()
Cacoa$getSampleDistanceMatrix(
  space = c("expression.shifts", "coda", "pseudo.bulk"),
  cell.type = NULL,
  dist = NULL,
  name = NULL,
  verbose = self$verbose,
  sample.subset = NULL,
  ...
)spacecharacter One of 'expression.shifts', 'coda', 'pseudo.bulk' (default="expression.shifts")
cell.typecharacter Cell type reference for distancing (default=NULL)
distcharacter Must be one of "cor", "l1" (manhattan), "l2" (euclidian) (default=NULL)
namecharacter Results slot name (default=NULL)
verboseboolean Print messages (default=self$verbose)
sample.subsetsubset data for analysis only to the given samples
...additional arguments
sample distance matrix
\dontrun{
cao$getSampleDistanceMatrix()
}
plotSampleDistances()Project samples to 2D space with MDS. Plots results from cao$estimateExpressionShiftMagnitudes() or cao$estimateCellLoadings()
Cacoa$plotSampleDistances( space = "expression.shifts", method = "MDS", dist = NULL, name = NULL, cell.type = NULL, palette = NULL, show.sample.size = FALSE, sample.colors = NULL, color.title = NULL, title = NULL, n.permutations = 2000, show.pvalues = FALSE, sample.subset = NULL, n.cores = self$n.cores, ... )
spacecharacter string "expression.shifts" Results from cao$estimateExpressionShiftMagnitudes(); CDA- cell composition shifts result from cao$estimateCellLoadings(); sudo.bulk- expression distance of sudo bulk
methodcharacter string "MDS"
dist'cor' - correlation distance, 'l1' - manhattan distance or 'l2' - euclidean (default correlation distance)
namestring Field name where the test results are stored
cell.typeIf a name of a cell type is specified, the sample distances will be assessed based on this cell type alone. Otherwise (cell.type=NULL, default), sample distances will be estimated as an average distance across all cell types (weighted by the minimum number of cells of that cell type between any two samples being compared)
palettea set of colors to use for conditions (default: stored $sample.groups.palette)
show.sample.sizemake point size proportional to the log10 of the number of cells per sample (default: FALSE)
sample.colors(default=NULL)
color.title(default=NULL)
title(default=NULL)
n.permutationsnumeric (default=2000)
show.pvaluesboolean (default=FALSE)
sample.subsetsubset data for analysis only to the given samples
n.coresnumeric Number of cores for parallelization
...additional parameters passed to plotSampleDistanceMatrix()
A ggplot2 object
\dontrun{
cao$estimateExpressionShiftMagnitudes()
cao$plotSampleDistances()
}
estimateMetadataSeparation()Estimate metadata separation using variance on the sample distance graph
Cacoa$estimateMetadataSeparation( sample.meta, space = "expression.shifts", dist = NULL, space.name = NULL, sample.subset = NULL, name = "metadata.separation", n.permutations = 5000, trim = 0.05, k = 20, show.warning = TRUE, verbose = self$verbose, n.cores = self$n.cores, adjust.pvalues = TRUE, p.adjust.method = "BH", pvalue.cutoff = 0.05 )
sample.metasample metadata is a list or data.frame with metadata per sample
space(default="expression shifts")
dist(default=NULL)
space.name(default=NULL)
sample.subsetsubset data for analysis only to the given samples
namestring Field name where the test results are stored
n.permutationsnumber permutations for the test (default=5000)
trimtrim distance matrix above the given quantile (default=0.05)
kif this parameter is supplied, k-NN graph is used for variance estimation, otherwise the function uses a fully-connected graph (default=20)
show.warningboolean (default=TRUE)
verboseboolean Print messages (default=self$verbose)
n.coresinteger Number of cores to use for parallelization (default=self$n.cores)
adjust.pvaluesboolean (default=TRUE)
p.adjust.methodcharacter string Method for calculating adjusted p-values (default="BH")
pvalue.cutoffnumeric (default=0.05)
results
\dontrun{
cao$estimateExpressionShiftMagnitudes() # or estimateCellLoadings()
cao$estimateMetadataSeparation(sample.meta = meta.data) # meta.data is a list or data.frame with metadata per sample
}
plotMetadataSeparation()Plot metadata separation
Cacoa$plotMetadataSeparation( name = "metadata.separation", pvalue.y = 0.93, ... )
namecharacter Name for storage in test.results (default="metadata.separation")
pvalue.ynumeric (default=0.93)
...additional parameters forwarded to plotMeanMedValuesPerCellType
\dontrun{
cao$estimateExpressionShiftMagnitudes() # or estimateCellLoadings()
cao$estimateMetadataSeparation(sample.meta = meta.data)
cao$plotMetadataSeparation()
}
estimateClusterFreeDE()Estimate differential expression Z-scores between two conditions per individual cell
Cacoa$estimateClusterFreeDE( n.top.genes = Inf, genes = NULL, max.z = 20, min.expr.frac = 0.01, min.n.samp.per.cond = 2, min.n.obs.per.samp = 2, robust = FALSE, norm.both = TRUE, adjust.pvalues = FALSE, smooth = TRUE, wins = 0.01, n.permutations = 200, lfc.pseudocount = 1e-05, min.edge.weight = 0.6, verbose = self$verbose, n.cores = self$n.cores, name = "cluster.free.de" )
n.top.genes(default=Inf)
genes(default=NULL)
max.zz-score value to winsorize the estimates for reducing impact of outliers. Default: 20.
min.expr.fracminimal fraction of cell expressing a gene for estimating z-scores for it. Default: 0.001.
min.n.samp.per.condminimal number of samples per condition for estimating z-scores (default: 2)
min.n.obs.per.sampminimal number of cells per samples for estimating z-scores (default: 2)
robustwhether to use median estimates instead of mean. Using median is more robust, but greatly increase the number of zeros in the data, leading to bias towards highly-express genes. (Default: FALSE)
norm.bothboolean (default=TRUE)
adjust.pvaluesboolean (default=FALSE)
smoothboolean Whether to apply smoothing (default=TRUE)
winsnumeric (default=0.01)
n.permutationsnumeric (default=200)
lfc.pseudocountpseudocount value for estimation of log2(fold-change)
min.edge.weightnumeric (default=0.6)
verboseboolean Print messages (default=self$verbose)
n.coresinteger Number of cores to use for parallelization (default=self$n.cores)
namecharacter string (default='cluster.free.de')
smooothboolean (default=TRUE)
list with sparce matrices containing various DE metrics with genes as columns and cells as rows:
z: DE Z-scores
reference mean or median expression in reference samples
target mean or median expression in target samples
lfc: log2(fold-change) of expression
Cells that have only one condition in their expression neighborhood have NA Z-scores for all genes.
Results are also stored in the cluster.free.de field.
\dontrun{
cao$estimateClusterFreeDE()
}
getMostChangedGenes()Get most changed genes
Cacoa$getMostChangedGenes(
  n,
  method = c("z", "z.adj", "lfc"),
  min.z = 0.5,
  min.lfc = 1,
  max.score = 20,
  cell.subset = NULL,
  excluded.genes = NULL,
  included.genes = NULL,
  name = "cluster.free.de"
)nnumeric Number of genes to retrieve
methodcharacter Must be one of "z", "z.adj", "lfc" (default="z")
min.znumeric Minimum Z score (default=0.5)
min.lfcnumeric Minimum log fold change (default=1)
max.scorenumeric Maximum Z score (default=20)
cell.subsetcharacter Cells to subset (default=NULL)
excluded.genescharacter Genes to exclude (default=NULL)
included.genescharacter Genes to include (default=NULL)
namecharacter Results slot name (default="cluster.free.de")
named numeric with scores and gene symbols as names
\dontrun{
cao$estimateClusterFreeDE()
cao$getMostChangedGenes(n = 10) # n can be any number of genes to extract
}
estimateClusterFreeExpressionShifts()Estimate Cluster-free Expression Shift
Cacoa$estimateClusterFreeExpressionShifts( n.top.genes = 3000, gene.selection = "z", name = "cluster.free.expr.shifts", min.n.between = 2, min.n.within = max(min.n.between, 1), min.expr.frac = 0, min.n.obs.per.samp = 3, normalize.both = FALSE, dist = "cor", log.vectors = (dist != "js"), wins = 0.025, genes = NULL, n.permutations = 500, verbose = self$verbose, n.cores = self$n.cores, min.edge.weight = 0, ... )
n.top.genesnumber of top genes for the distance estimation (default: 3000)
gene.selectioncharacter string Method to select top genes, "z" selects genes by cluster-free Z-score change, "lfc" uses log2(fold-change) instead, "expression" picks the most expressed genes and "od" picks overdispersed genes. Default: "z".
namestring Field name where the test results are stored
min.n.betweenminimal number of pairs between condition for distance estimation (default: 2)
min.n.withinminimal number of pairs within one condition for distance estimation (default: min.n.between)
min.expr.fracnumeric (default=0.0)
min.n.obs.per.sampminimal number of cells per sample for using it in distance estimation (default: 3)
normalize.bothwhether to normalize results relative to distances within both conditions (TRUE) or only to the control (FALSE)
distdistance measure. Options: "cor" (correlation), "cosine" or "js" (Jensen–Shannon)
log.vectorswhether to use log10 on the normalized expression before estimating the distance.
In most cases, must be TRUE for "cosine" and "cor" distances and always must be FALSE for "js". (default: dist != 'js')
winsnumeric (default=0.025)
genescharacter vector Genes to include (default=NULL)
n.permutationsnumeric Number of permutations (default=500)
verboseboolean Print messages (default=self$verbose)
n.coresinteger Number of cores to use for parallelization (default=self$n.cores)
min.edge.weightnumeric Minimum edge weight (default=0.0)
...additional parameters passed to estimateClusterFreeExpressionShiftsC()
Vector of cluster-free expression shifts per cell. Values above 1 correspond to difference between conditions.
Results are also stored in the cluster.free.expr.shifts field.
\dontrun{
cao$estimateClusterFreeDE()
cao$estimateClusterFreeExpressionShifts()
}
smoothClusterFreeZScores()Performs graph smoothing of the cluster-free DE Z-scores
Cacoa$smoothClusterFreeZScores( n.top.genes = 1000, smoothing = 20, filter = NULL, z.adj = FALSE, gene.selection = ifelse(z.adj, "z.adj", "z"), excluded.genes = NULL, n.cores = self$n.cores, verbose = self$verbose, name = "cluster.free.de", ... )
n.top.genesnumeric Number of top ranked genes to include (default=1000)
smoothingbeta parameter of the heatFilter. (default=20)
filtergraph filter function. (default=NULL)
z.adjboolean Adjust Z scores (default=FALSE)
gene.selectioncharacter Must be one of "z.adj" or "z", default is based on the "z.adj" parameter (default=ifelse(z.adj, "z.adj", "z"))
excluded.genesList of genes to exclude during estimation. For example, a list of mitochondrial genes.
n.coresinteger Number of cores to use for parallelization (default=self$n.cores)
verboseboolean Print messages (default=self$verbose)
namecharacter Results slot name (default='cluster.free.de')
...parameters forwarded to smoothSignalOnGraph
exluded.genescharacter Genes to exclude (default=NULL)
Sparse matrix of smoothed Z-scores. Results are also stored in the cluster.free.de$z.smoothed field.
\dontrun{
cao$estimateClusterFreeDE()
cao$smoothClusterFreeZScores()
}
estimateGenePrograms()Estimate Gene Programs based on cluster-free Z-scores
Cacoa$estimateGenePrograms(
  method = c("pam", "leiden", "fabia"),
  n.top.genes = Inf,
  genes = NULL,
  n.programs = 15,
  z.adj = FALSE,
  gene.selection = ifelse(z.adj, "z.adj", "z"),
  smooth = TRUE,
  abs.scores = FALSE,
  name = "gene.programs",
  cell.subset = NULL,
  n.cores = self$n.cores,
  verbose = self$verbose,
  max.z = 5,
  min.z = 0.5,
  min.change.frac = 0.01,
  de.name = "cluster.free.de",
  ...
)methodcharacter String Method to use (default=c("pam", "leiden", "fabia"))
n.top.genes(default=Inf)
genes(default=NULL)
n.programsmaximal number of gene programs to find (parameter p for fabia). (default=15)
z.adjboolean (default=FALSE)
gene.selectioncharacter string Method to select top genes, "z" selects genes by cluster-free Z-score change, "lfc" uses log2(fold-change) instead, "expression" picks the most expressed genes and "od" picks overdispersed genes. Default: "z".
smoothboolean (default=TRUE)
abs.scoresboolean (default=FALSE)
namestring Field name where the test results are stored
cell.subset(default=NULL)
n.coresinteger Number of cores to use for parallelization (default=self$n.cores)
verboseboolean Print messages (default=self$verbose)
max.znumeric (default=5)
min.znumeric (default=0.5)
min.change.fracnumeric (default=0.01)
de.namecharacter string (default="cluster.free.de")
...keyword arguments forwarded to estimateGenePrograms
a list includes:
fabia: fabia::Factorization object, result of the
fabia::fabia call
sample.ids: ids of the subsampled cells used for fabia estimates
scores.exact: vector of fabia estimates of gene program scores per cell. Estimated only for the
subsampled cells.
scores.approx: vector of approximate gene program scores, estimated for all cells in the dataset
loadings: matrix with fabia gene loadings per program
gene.scores: list of vectors of gene scores per program. Contains only genes, selected for
the program using fabia biclustering.
bi.clusts fabia biclustering information, result of the fabia::extractBic call
\dontrun{
cao$estimateClusterFreeDE()
cao$estimateGenePrograms()
}
plotGeneProgramScores()Plot gene program scores
Cacoa$plotGeneProgramScores(
  name = "gene.programs",
  prog.ids = NULL,
  build.panel = TRUE,
  nrow = NULL,
  adj.list = NULL,
  legend.title = "Score",
  palette = NULL,
  min.genes.per.prog = 10,
  color.range = c("0.5%", "99.5%"),
  ...
)namestring Field name where the test results are stored
prog.ids(default=NULL)
build.panelboolean (default=TRUE)
nrow(default=NULL)
adj.list(default=NULL)
legend.titlecharacter string (default="Score")
palette(default=NULL)
min.genes.per.prognumeric (default=10)
color.range(default=c("0.5%", "99.5%"))
...additional parameters
gene program scores
\dontrun{
cao$estimateClusterFreeDE()
cao$estimateGenePrograms()
cao$plotGeneProgramScores()
}
plotGeneProgramGenes()Plot gene program genes
Cacoa$plotGeneProgramGenes(
  program.id,
  name = "gene.programs",
  ordering = c("similarity", "loading"),
  max.genes = 9,
  build.panel = TRUE,
  ncol = 3,
  plots = "z.adj",
  ...
)program.idprogram id
namestring Field name where the test results are stored
orderingcharacter vector (default=c("similarity", "loading"))
max.genesinteger (default=9)
build.panelboolean Plot in a grid (default=TRUE)
ncolnumeric Number of columns for build.panel (default=3)
plotscharacter string (default="z.adj")
...additional parameters passed to plotGeneExpressionComparison()
plotGeneExpressionComparison
\dontrun{
cao$estimateClusterFreeDE()
cao$estimateGenePrograms()
cao$plotGeneProgramGenes(program.id = 1) # program.id is any gene program ID in 1:cao$test.results$gene.programs$n.progs
}
plotClusterFreeExpressionShifts()Plot cluster-free expression shift z-scores
Cacoa$plotClusterFreeExpressionShifts(
  cell.groups = self$cell.groups,
  smooth = TRUE,
  plot.na = FALSE,
  name = "cluster.free.expr.shifts",
  scale.z.palette = TRUE,
  min.z = qnorm(0.9),
  color.range = c("0", "97.5%"),
  alpha = 0.2,
  font.size = c(3, 5),
  adj.list = NULL,
  palette = brewerPalette("YlOrRd", rev = FALSE),
  build.panel = TRUE,
  ...
)cell.groupsIndicates cell groups with cell names. Set to NULL if it shouldn't be shown. (default: stored vector)
smoothboolean (default=TRUE)
plot.naboolean (default=FALSE)
namestring Field name where the test results are stored
scale.z.paletteboolean (default=TRUE)
min.z(default=qnorm(0.9))
color.range(default=c("0", "97.5%"))
alphanumeric (default=0.2)
font.sizesize range for cell type labels
adj.list(default=NULL)
palette(default=brewerPalette("YlOrRd", rev=FALSE))
build.panelboolean (default=TRUE)
...parameters forwarded to embeddingPlot
\dontrun{
cao$estimateClusterFreeDE()
cao$estimateClusterFreeExpressionShifts()
cao$plotClusterFreeExpressionShifts()
}
plotMostChangedGenes()Plot most changed genes
Cacoa$plotMostChangedGenes( n.top.genes, method = "z", min.z = 0.5, min.lfc = 1, max.score = 20, cell.subset = NULL, excluded.genes = NULL, build.panel = TRUE, ncol = 1, ... )
n.top.genesnumeric
methodcharacter string (default='z')
min.znumeric (default=0.5)
min.lfcnumeric (default=1)
max.scorenumeric (default=20)
cell.subset(default=NULL)
excluded.genes(default=NULL)
build.panelboolean Plot in grid (default=TRUE)
ncolnumeric Number of columns for build.panel (default=1)
...additional parameters input to self$plotGeneExpressionComparison()
plot of the most changed genes via plotGeneExpressionComparison()
\dontrun{
cao$estimateClusterFreeDE()
cao$plotMostChangedGenes(n.top.genes = 10) # n.top.genes is any number of genes to plot
}
plotGeneExpressionComparison()Plot gene expression comparison
Cacoa$plotGeneExpressionComparison(
  genes = NULL,
  scores = NULL,
  max.expr = "97.5%",
  plots = c("z.adj", "z", "expression"),
  min.z = qnorm(0.9),
  max.z = 4,
  max.z.adj = NULL,
  max.lfc = 3,
  smoothed = FALSE,
  gene.palette = dark.red.palette,
  z.palette = NULL,
  z.adj.palette = z.palette,
  lfc.palette = NULL,
  scale.z.palette = TRUE,
  plot.na = -1,
  adj.list = NULL,
  build.panel = TRUE,
  nrow = 1,
  ncol = 1,
  cell.subset = NULL,
  groups = NULL,
  subgroups = NULL,
  keep.limits = NULL,
  name = "cluster.free.de",
  ...
)genes(default=NULL)
scores(default=NULL)
max.exprcharacter string (default="97.5%")
plots(default=c("z.adj", "z", "expression"))
min.z(default=qname(0.9))
max.znumeric (default=4)
max.z.adj(default=NULL)
max.lfcnumeric (default=3)
smoothedboolean (default=FALSE)
gene.palette(default=dark.red.palette)
z.palette(default=NULL)
z.adj.palette(default=z.palette)
lfc.palette(default=NULL)
scale.z.paletteboolean (default=TRUE)
plot.na(default=-1)
adj.list(default=NULL)
build.panelboolean (default=TRUE)
nrownumeric Number of rows for build.panel (default=1)
ncolnumeric Number of columns for build.panel (default = 1)
cell.subset(default=NULL)
groups(default=NULL)
subgroups(default=NULL)
keep.limits(default=NULL)
namestring Field name where the test results are stored
...additional parameters
list
\dontrun{
cao$estimateClusterFreeDE()
cao$plotGeneExpressionComparison()
}
getConditionPerCell()Get condition per cell
Cacoa$getConditionPerCell()
conditions per cell
\dontrun{
cao$getConditionPerCell()
}
getJointCountMatrix()Get joint count matrix
Cacoa$getJointCountMatrix(force = FALSE, raw = TRUE)
forceboolean, if TRUE the joint count matrix will be recalculated even though it already exists in self$cache (default=FALSE)
rawboolean, return raw counts (default=TRUE)
joint count matrix
\dontrun{
cao$getJointCountMatrix()
}
getGOEnvironment()Get GO environment
Cacoa$getGOEnvironment(org.db, verbose = FALSE, ignore.cache = NULL)
org.dbobject of class OrgDB from Bioconductor (e.g. org.Hs.eg.db::org.Hs.eg.db)
verboseboolean, print progress (default=FALSE)
ignore.cacheignore GO environments already in self$cache (default=NULL)
GO environment
\dontrun{
cao$getGOEnvironment(org.db = org.Hs.eg.db::org.Hs.eg.db)
}
clone()The objects of this class are cloneable with this method.
Cacoa$clone(deep = FALSE)
deepWhether to make a deep clone.
## ------------------------------------------------
## Method `Cacoa$new`
## ------------------------------------------------
# Is it highly recommended that sample.groups and cell.groups are assigned in the initialization call. 
# Here, "con" is a Conos object.
## Not run: 
sample.groups <- c("control","control","disease","disease")
names(sample.groups) <- names(con$samples)
## End(Not run)
# cell.groups should be a named factor where names are cell names corresponding to cell names in the data object. 
# For Conos objects, they should overlap with rownames(con$embedding)
## Not run: 
cell.groups <- my.named.annotation.factor
cao <- Cacoa$new(data.object = con, sample.groups = sample.groups, cell.groups =  ref.level = "control", target.level = "disease")
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateExpressionShiftMagnitudes`
## ------------------------------------------------
## Not run: 
cao$estimateExpressionShiftMagnitudes()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotExpressionShiftMagnitudes`
## ------------------------------------------------
## Not run: 
cao$estimateExpressionShiftMagnitudes()
cao$plotExpressionShiftMagnitudes()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimatePerCellTypeDE`
## ------------------------------------------------
## Not run: 
cao$estimatePerCellTypeDE() # Deprecated
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateDEPerCellType`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateDEStabilityPerCellType`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateDEStabilityPerCellType()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateDEStabilityPerGene`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateDEStabilityPerGene()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotDEStabilityPerCellType`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateDEStability()
cao$plotDEStabilityPerCellType)
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotDEStabilityPerGene`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateDEStabilityPerGene()
cao$plotDEStabilityPerGene()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotNumberOfDEGenes`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$plotNumberOfDEGenes()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$saveDeAsJson`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$saveDeAsJson()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotEmbedding`
## ------------------------------------------------
## Not run: 
cao$plotEmbedding()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateOntology`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
library(org.Hs.eg.db)
cao$estimateOntology(type = "GSEA", org.db = org.Hs.eg.db)
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateOntologyFamilies`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$estimateOntologyFamilies(name = "GSEA")
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$getFamiliesPerGO`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$estimateOntologyFamilies(name = "GSEA")
cao$getFamiliesPerGO(name = "GSEA", go.term = "antigen presentation") # Either go.term og go.id has to be specified 
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotNumOntologyTermsPerType`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$plotNumOntologyTermsPerType()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotOntology`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$plotOntology(name = "GSEA", cell.type = "Neurons") # "cell.type" is a cell type in self$cell.groups used for calculating ontologies
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotOntologyHeatmap`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$plotOntologyHeatmap()
cao$estimateOntologyFamilies(name = "GSEA")
cao$plotOntologyHeatmap(name = "GSEA", only.family.children = TRUE)
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotOntologyHeatmapCollapsed`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$plotOntologyHeatmapCollapsed(name = "GSEA")
cao$estimateOntologyFamilies(name = "GSEA")
cao$plotOntologyHeatmapCollapsed(name = "GSEA", only.family.children = TRUE)
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotOntologySimilarities`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateOntology()
cao$plotOntologySimilarities()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotOntologyFamily`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$estimateOntologyFamilies(name = "GSEA")
cao$plotOntologyFamily(name = "GSEA", cell.type = "Neurons") # "cell.type" is a cell type in self$cell.groups used for calculating ontologies
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$saveOntologyAsTable`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$saveOntologyAsTable(name = "GSEA", file = "Ontologies.tsv")
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$saveFamiliesAsTable`
## ------------------------------------------------
## Not run: 
cao$estimateDEPerCellType()
cao$estimateOntology(name = "GSEA")
cao$estimateOntologyFamilies(name = "GSEA")
cao$saveFamiliesAsTable(name = "GSEA", file = "Families.tsv")
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotCellGroupSizes`
## ------------------------------------------------
## Not run: 
cao$plotCellGroupSizes()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotCellGroupAbundanceVariation`
## ------------------------------------------------
## Not run: 
cao$plotCellGroupAbundanceVariation()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotCodaSpace`
## ------------------------------------------------
## Not run: 
cao$estimateCellLoadings()
cao$plotCodaSpace()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotContrastTree`
## ------------------------------------------------
## Not run: 
cao$estimateCellLoadings()
cao$plotContratsTree()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotCompositionSimilarity`
## ------------------------------------------------
## Not run: 
cao$estimateCellLoadings()
cao$plotCompositionSimilarity()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateCellLoadings`
## ------------------------------------------------
## Not run: 
cao$estimateCellLoadings()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotCellLoadings`
## ------------------------------------------------
## Not run: 
cao$estimateCellLoadings()
cao$plotCellLoadings()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateCellDensity`
## ------------------------------------------------
## Not run: 
cao$estimateCellDensity()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotCellDensity`
## ------------------------------------------------
## Not run: 
cao$estimateCellDensity()
cao$plotCellDensity()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotCellDensityVariation`
## ------------------------------------------------
## Not run: 
cao$estimateCellDensity(estimate.variation=TRUE)
cao$plotCellDensityVariation()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateDiffCellDensity`
## ------------------------------------------------
## Not run: 
cao$estimateCellDensity()
cao$estimateDiffCellDensity()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotDiffCellDensity`
## ------------------------------------------------
## Not run: 
cao$estimateCellDensity()
cao$estimateDiffCellDensity()
cao$plotDiffCellDensity()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotExpressionDistance`
## ------------------------------------------------
## Not run: 
cao$estimateExpressionShiftMagnitudes()
cao$plotExpressionDistance()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$getSampleDistanceMatrix`
## ------------------------------------------------
## Not run: 
cao$getSampleDistanceMatrix()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotSampleDistances`
## ------------------------------------------------
## Not run: 
cao$estimateExpressionShiftMagnitudes()
cao$plotSampleDistances()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateMetadataSeparation`
## ------------------------------------------------
## Not run: 
cao$estimateExpressionShiftMagnitudes() # or estimateCellLoadings()
cao$estimateMetadataSeparation(sample.meta = meta.data) # meta.data is a list or data.frame with metadata per sample
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotMetadataSeparation`
## ------------------------------------------------
## Not run: 
cao$estimateExpressionShiftMagnitudes() # or estimateCellLoadings()
cao$estimateMetadataSeparation(sample.meta = meta.data)
cao$plotMetadataSeparation()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateClusterFreeDE`
## ------------------------------------------------
## Not run: 
cao$estimateClusterFreeDE()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$getMostChangedGenes`
## ------------------------------------------------
## Not run: 
cao$estimateClusterFreeDE()
cao$getMostChangedGenes(n = 10) # n can be any number of genes to extract
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateClusterFreeExpressionShifts`
## ------------------------------------------------
## Not run: 
cao$estimateClusterFreeDE()
cao$estimateClusterFreeExpressionShifts()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$smoothClusterFreeZScores`
## ------------------------------------------------
## Not run: 
cao$estimateClusterFreeDE()
cao$smoothClusterFreeZScores()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$estimateGenePrograms`
## ------------------------------------------------
## Not run: 
cao$estimateClusterFreeDE()
cao$estimateGenePrograms()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotGeneProgramScores`
## ------------------------------------------------
## Not run: 
cao$estimateClusterFreeDE()
cao$estimateGenePrograms()
cao$plotGeneProgramScores()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotGeneProgramGenes`
## ------------------------------------------------
## Not run: 
cao$estimateClusterFreeDE()
cao$estimateGenePrograms()
cao$plotGeneProgramGenes(program.id = 1) # program.id is any gene program ID in 1:cao$test.results$gene.programs$n.progs
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotClusterFreeExpressionShifts`
## ------------------------------------------------
## Not run: 
cao$estimateClusterFreeDE()
cao$estimateClusterFreeExpressionShifts()
cao$plotClusterFreeExpressionShifts()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotMostChangedGenes`
## ------------------------------------------------
## Not run: 
cao$estimateClusterFreeDE()
cao$plotMostChangedGenes(n.top.genes = 10) # n.top.genes is any number of genes to plot
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$plotGeneExpressionComparison`
## ------------------------------------------------
## Not run: 
cao$estimateClusterFreeDE()
cao$plotGeneExpressionComparison()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$getConditionPerCell`
## ------------------------------------------------
## Not run: 
cao$getConditionPerCell()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$getJointCountMatrix`
## ------------------------------------------------
## Not run: 
cao$getJointCountMatrix()
## End(Not run)
## ------------------------------------------------
## Method `Cacoa$getGOEnvironment`
## ------------------------------------------------
## Not run: 
cao$getGOEnvironment(org.db = org.Hs.eg.db::org.Hs.eg.db)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.