View source: R/treecor_harmony.R
treecor_harmony | R Documentation |
This function is developed using 'Seurat v3.2.2'. It takes in a raw count gene expression matrix and a sample meta data frame and performs harmony integration.
treecor_harmony(
count,
sample_meta,
output_dir,
cell_meta = NULL,
num_PCs = 20,
num_harmony = 20,
num_features = 2000,
min_cells = 0,
min_features = 0,
pct_mito_cutoff = 20,
exclude_genes = NULL,
vars_to_regress = c("sample"),
resolution = 0.5,
verbose = T
)
count |
A raw count gene expression matrix with genes on rows and cells on columns. Note that cell barcode shall use ':' to separate sample name and barcode (i.e. "sample:barcode") |
sample_meta |
Sample metadata. Must contain a column named as 'sample'. |
output_dir |
Output directory |
cell_meta |
A data frame that contains both 'barcode' (cell barcode) and 'sample' columns (its corresponding sample). By default, the sample information is contained in cell barcode with "sample:barcode" format. If your data is not in this format, you should specify this parameter. |
num_PCs |
Number of PCs used in integration (by default: 20) |
num_harmony |
Number of harmony embedding used in integration (by default: 20) |
num_features |
Number of features used in integration (by default: 2000) |
min_cells |
Include features detected in at least this many cells (by default: 0). Same as |
min_features |
Include cells where at least this many features are detected (by default: 0). Same as |
pct_mito_cutoff |
Include cells with less than this many percent of mitochondrial percent are detected (by default: 20). Ranges from 0 to 100. Will be used as a QC metric to subset the count matrix. Genes starting with 'MT-' are defined as a set of mitochondrial genes. |
exclude_genes |
Additional genes to be excluded from integration. Will subset the count matrix. |
vars_to_regress |
Variables to be regressed out during Harmony integration (by default: 'sample'). Same as |
resolution |
A clustering resolution (by default: 0.5). A higher (lower) value indicates larger (smaller) number of cell subclusters. |
verbose |
Show progress |
A Seurat object
Boyang Zhang <bzhang34@jhu.edu>, Hongkai Ji
# default setting
treecor_harmony(count, sample_meta, output_dir)
# additionally regress out 'study' ID
treecor_harmony(count, sample_meta, output_dir,vars_to_regress = c('sample','study'))
# increase clustering resolution (with more refined cell clusters)
treecor_harmony(count, sample_meta, output_dir,resolution = 0.8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.