View source: R/supportingfunctions.R
pop.ct.prop.scRNA | R Documentation |
Calculate population-level cell type proportions from single-cell data.
pop.ct.prop.scRNA(scRNA,cluster="cluster",sample="sample",cell_type_unique)
scRNA |
The 'ExpressionSet' object for single-cell data. |
cluster |
The character string specifying the variable name for cell types. The default is "cluster". |
sample |
The character string specifying the variable name for subject/samples. The default is "sample". |
cell_type_unique |
A vector of cell types. It should match the order in list.marker. |
The population-level cell type proportions ('pop.ct.prop') and corresponding standard deviations ('pop.ct.sd').
##read data library(InteRD) readRDSFromWeb<-function(ref) {readRDS(gzcon(url(ref)))} urlremote<-"https://github.com/chencxxy28/Data/raw/main/data_InteRD/" seger<-readRDSFromWeb(paste0(urlremote,"segerstolpe.rds")) cell_type_unique<-c("alpha","beta","delta","gamma") ave_est<-pop.ct.prop.scRNA(scRNA=seger[["sc.eset.qc"]], cell_type_unique=cell_type_unique)$pop.ct.prop ave_est
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.