onestep_clust: One round of clustering in the iteractive clustering pipeline

Description Usage Arguments Value

View source: R/cluster.R

Description

One round of clustering in the iteractive clustering pipeline

Usage

1
2
3
4
5
6
onestep_clust(norm.dat, select.cells = colnames(norm.dat), counts = NULL,
  method = c("louvain", "ward.D", "kmeans"), vg.padj.th = 0.5,
  dim.method = c("pca", "WGCNA"), max.dim = 20, rm.eigen = NULL,
  rm.th = 0.7, de.param = de_param(), min.genes = 5,
  type = c("undirectional", "directional"), maxGenes = 3000,
  sampleSize = 4000, max.cl.size = 300, prefix = NULL, verbose = FALSE)

Arguments

norm.dat

normalized expression data matrix in log transform, using genes as rows, and cells and columns. Users can use log2(FPKM+1) or log2(CPM+1).

select.cells

The cells to be clustered. Default: columns of norm.dat

counts

Raw gene counts. Default NULL, inferred from norm.dat.

method

Clustering method. It can be "louvain", "hclust" and "kmeans". Default "louvain"

vg.padj.th

High variance gene adjusted pvalue cut off. Default 0.5.

dim.method

Dimension reduction techniques. Current options include "pca" and "WGCNA". Default "pca"

max.dim

The number of top dimensions retained. Default 20. Since clustering is performed iteratively, not all relevant dimensions need to be captured in one iterations.

rm.eigen

The reduced dimensions that need to be masked and removed. Default NULL.

rm.th

The cutoff for correlation between reduced dimensions and rm.eigen. Reduced dimensions with correlatin with any rm.eigen vectors are not used for clustering. Default 0.7

de.param

The differential gene expression threshold. See de_param() function for details.

min.genes

The minimal number of high variance and differentially expressed genes genes. Default 5.

type

Can either be "undirectional" or "directional". If "undirectional", the differential gene threshold de.param is applied to combined up-regulated and down-regulated genes, if "directional", then the differential gene threshold is applied to both up-regulated and down-regulated genes.

maxGenes

Only used when dim.method=="WGCNA". The maximum number of genes to calculate gene modules.

sampleSize

The number of sampled cells to compute reduced dimensions.

max.cl.size

Sampled cluster size. This is to speed up limma DE gene calculation. Instead of using all cells, we randomly sampled max.cl.size number of cells for testing DE genes.

prefix

Used to keep track of intermediate results in "verbose" mode. Default NULL.

verbose

Default FALSE

Value

Clustering result is returned as a list with two elements: cl: cluster membership for each cell markers: top markers that seperate clusters


AllenInstitute/scrattch.hicat documentation built on May 5, 2019, 1:32 a.m.