Title: | Implementation of 'scSorter' Algorithm |
---|---|
Description: | Implements the algorithm described in Guo, H., and Li, J., "scSorter: assigning cells to known cell types according to known marker genes". Cluster cells to known cell types based on marker genes specified for each cell type. |
Authors: | Hongyu Guo [aut], Jun Li [aut, cre] |
Maintainer: | Jun Li <[email protected]> |
License: | GPL-3 |
Version: | 0.0.2 |
Built: | 2024-12-15 07:39:37 UTC |
Source: | CRAN |
This is the main function that implements the scSorter method.
scSorter( expr, anno, default_weight = 2, n_start = 10, alpha = 0, u = 0.05, max_iter = 100, setseed = 0 )
scSorter( expr, anno, default_weight = 2, n_start = 10, alpha = 0, u = 0.05, max_iter = 100, setseed = 0 )
expr |
A matrix of the input expression data. Each row represents a gene and each column represents a cell. Each row of this matrix should be named by the gene name it represents. |
anno |
A matrix or data frame that contains marker genes specified for cell types of interest.
It should contain three columns named "Type", "Marker", and "Weight" that records the name and weight of marker genes specified for each cell type.
"Weight" column is optional. If it is not specified, the |
default_weight |
The default weight assigned to marker genes. The default value is 2. |
n_start |
The number of possible cluster initializations. The default value is 10. |
alpha |
The parameter determines the cutoff whether the cell type of a cell should be considered as undecided during unknown cell calling. The default value is 0. |
u |
The parameter determines whether undecided cells are further processed. The default value is 0.05. |
max_iter |
The maximum number of iterations for the algorithm to update parameters. The default value is 100. |
setseed |
Random seed for cluster initialization. The default value is 0. |
A list contains the elements:
Pred_Type
: The predicted cell types.
Pred_param
: The parameter estimates of mu
and delta
.
load(system.file('extdata', 'example_data.RData', package = 'scSorter')) result = scSorter(expr, anno) misclassification_rate = 1 - mean(result$Pred_Type == true_type) table(result$Pred_Type, true_type)
load(system.file('extdata', 'example_data.RData', package = 'scSorter')) result = scSorter(expr, anno) misclassification_rate = 1 - mean(result$Pred_Type == true_type) table(result$Pred_Type, true_type)
Select Highly Variable Genes following the vst approach. Please only use this function when you do not have access to Seurat package. More details are available in the vignette of this package.
xfindvariable_genes(expr, ngenes = 2000)
xfindvariable_genes(expr, ngenes = 2000)
expr |
A matrix of input scRNA-seq data. Rows correspond to genes and columns correpond to cells. |
ngenes |
The number of most variable genes to be selected. |
A vector of top highly variable genes with the total number determined by @ngenes option.
Normalize scRNA-seq data. Please only use this function when you do not have access to Seurat package. More details are available in the vignette of this package.
xnormalize_scData(expr)
xnormalize_scData(expr)
expr |
A matrix of input scRNA-seq data. Rows correspond to genes and columns correpond to cells. |
A matrix of normalized expression data.