deg.acrossclusters: Differential expression testing for clusters in a single...

Description Usage Arguments Value Examples

View source: R/basicpipeline.R

Description

A function to run differentially expressed gene (DEG) testing and save to disk the output in a format compatible with gseapipeline.clusters() function. This function takes a while. To help deal with the risk of interruptions, this function is written in a way that tries to pick up where previously left off if stopped part-way through.

Usage

1
2
3
4
5
6
7
deg.acrossclusters(
  sobj,
  idents = NULL,
  test = NULL,
  latent.vars = NULL,
  outdir = NULL
)

Arguments

sobj

A seurat object, usually one on which Seurat::FindClusters() has been run.

idents

A string referring to a categorical column of the seurat metadata, such as the output of Seurat::FindClusters(). Defaults to 'seurat_project'.

test

A string connoting which DEG test to perform. See ?Seurat::FindMarkers() for details on options. Defaults to "MAST".

latent.vars

A string or character vector referring to which columns to use a "latent variables", which some of the tests will attempt to regress out the effect of. Some tests (such as MAST) can only perform this for quantitative variables (rather than categorical). Defaults to ('nFeature_RNA', 'nCount_RNA', 'percent.mito').

outdir

a string connoting which directory to save results in. Will create directory if it does not exist. Will not overwrite. Defaults to the following: "ClusterDEG_(Seurat object project name)_(date)_(test)"

Value

Saves output files to outdir. Output is a directory containing .rds files which store dataframes containing the output of Seurat::FindMarkers(). Will not return anything else besides printing progress reports to the standard out.

Examples

1
2
3
4
5
6
## Not run: 
pdf('qcplots.pdf')
deg.acrossclusters(sobj = sobj)
dev.off()

## End(Not run)

apf2139/tamlabscpipeline documentation built on July 23, 2021, 11 a.m.