View source: R/add_subtype_pheno.R
add_subtype_pheno | R Documentation |
Use a hierarchical clustering of the input labels, to generate finer subtype labels. The basic steps are: 1. use the get_hclust function to hierarchically cluster the data within the cell types. (or use the provided hclust.obj) 2. cluster the data multiple times, with different depth (as indicated by 'avg.profiles.per.subcluster.vec') 3. provide the clustering labels as columns in sc.pheno, and return it.
add_subtype_pheno( sc.counts, sc.pheno, cell.type.column = "cell_type", sample.name.column = "sample.name", new.subtype.column = "subtype", hclust.obj = NA, n.clusters = c(1, 2, 4, 8), verbose = TRUE, ... )
sc.counts |
count matrix, features as rows, scRNA-Seq profiles as columns |
sc.pheno |
data.frame. scRNA-Seq profiles as rows. Must have 'cell.type.column' and 'sample.name.column' |
cell.type.column |
string, column of 'sc.pheno' holding the input cell type labels. Within these entries, the clustering is done. |
sample.name.column |
string, column of the 'colnames(sc.counts)' |
new.subtype.column |
string, pattern of the new column, where the subtype information is stored |
hclust.obj |
'hclust' object, or NA. If you already calculated a hclust, object pass it here. Alternatively, we call the get_hclust function. |
n.clusters |
integer vector of clustering depths (number of subclusters created for each cell type), default c(1, 2, 4, 8). This means that in the finest clustering, each celltype will be split in 8 subtypes, in the next step each will be split in 4 subtypes, ... |
verbose |
logical, should information about the process be printed. |
... |
arguments that are passed to get_hclust |
data.frame sc.pheno, with added subtype column
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.