One round of clustering in the iteractive clustering pipeline
onestep_clust(
norm.dat,
select.cells = colnames(norm.dat),
counts = NULL,
method = c("louvain", "leiden", "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(),
merge.type = c("undirectional", "directional"),
maxGenes = 3000,
sampleSize = 4000,
max.cl.size = 300,
k.nn = 15,
prefix = NULL,
verbose = FALSE,
regress.x = NULL
)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).
The cells to be clustered. Default: columns of norm.dat
Raw gene counts. Default NULL, inferred from norm.dat.
Clustering method. It can be "louvain", "hclust" and "kmeans". Default "louvain"
High variance gene adjusted pvalue cut off. Default 0.5.
Dimension reduction techniques. Current options include "pca" and "WGCNA". Default "pca"
The number of top dimensions retained. Default 20. Since clustering is performed iteratively, not all relevant dimensions need to be captured in one iterations.
The reduced dimensions that need to be masked and removed. Default NULL.
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
The differential gene expression threshold. See de_param() function for details.
Only used when dim.method=="WGCNA". The maximum number of genes to calculate gene modules.
The number of sampled cells to compute reduced dimensions.
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.
Used to keep track of intermediate results in "verbose" mode. Default NULL.
Default FALSE
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.
Clustering result is returned as a list with two elements: cl: cluster membership for each cell markers: top markers that seperate clusters