get cluster-specific quantile distribution of transcript number and per cell per molecule transcript score in the provided cell x gene expression matrix based on the reference profiles and cell cluster assignment
Arguments
- refProfiles
A matrix of cluster profiles, genes X clusters
- counts
Counts matrix, cells X genes.
- clust
Vector of cluster assignments for each cell in
counts
, default = NULL to automatically assign the cell cluster for each cell based on maximum transcript score
Value
a list
span_score, a matrix of average transcript tLLR score per molecule per cell for 22 distinct cell types in rows, percentile at (0%, 25%, 50%, 75%, 100%) in columns
span_transNum, a matrix of transcript number per cell for each distinct cell types in row, percentile at (0%, 25%, 50%, 75%, 100%) in columns
score_baseline, a named vector of 25% quantile of cluster-specific per cell transcript score, to be used as score baseline such that per cell transcript score higher than the baseline is required to call a cell type of high enough confidence
lowerCutoff_transNum, a named vector of 25% quantile of cluster-specific per molecule per cell transcript number, to be used as transcript number cutoff such that higher than the cutoff is required to keep query cell as it is
higherCutoff_transNum, a named vector of median value of cluster-specific per molecule per cell transcript number, to be used as transcript number cutoff such that lower than the cutoff is required to keep query cell as it is when there is neighbor cell of consistent cell type.
clust_used, a named vector of cluster assignments for each cell used in baseline calculation, cell_ID in
counts
as name
Details
Calculate average per molecule transcript score for each cell in counts
expression matrix based on the provided cluster profiles refProfiles
and cluster assignment for each cell clust
; then get the quantile distribution of transcript number and per molecule per cell transcript score under each cluster. The function would also recommend the cutoff for transcript score and transcript number to be used in re-segmentation pipeline based on the calculated quantile distribution.
Examples
data(example_refProfiles)
data(ori_RawExprs)
baselineData <- get_baselineCT(refProfiles = example_refProfiles,
counts = ori_RawExprs, clust = NULL)
#> Found 960 common genes among `refProfiles` and `counts`.
#> No common cell types/clusters found between `clust` and `refProfiles`.
#> Perform cluster assignment based on maximum transcript score given the provided `refProfiles`.