Learn R Programming

InteRD (version 0.1.1)

pop.ct.prop.scRNA: Calculate the population-level cell type proportions from a single-cell data.

Description

Calculate population-level cell type proportions from single-cell data.

Usage

pop.ct.prop.scRNA(scRNA,cluster="cluster",sample="sample",cell_type_unique)

Value

The population-level cell type proportions (`pop.ct.prop`) and corresponding standard deviations (`pop.ct.sd`).

Arguments

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.

Examples

Run this code
##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

Run the code above in your browser using DataLab