CTdcv: Cell-type level deconvolution

Description Usage Arguments Value Examples

View source: R/MLM_Estimate.R

Description

Cell-type level deconvolution

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
CTdcv(
  bulk,
  sce,
  gene = NULL,
  data_type,
  select.ct = NULL,
  RanSplit = NULL,
  ct.cell.size = NULL,
  BatchCorrect = F,
  Filter = T,
  SF = 1000,
  ncpu = NULL,
  iter_max = 1000
)

Arguments

bulk

A matrix containing bulk RNA-Seq data. Each row corresponds to a certain gene and each column to a certain sample.

sce

A 'Seurat' object containing the single-cell RNA-Seq data. Meta data of the 'Seurat' object must includes 'cellType' and 'sampleID'.

gene

A character vector of the gene names to use as signature for the deconvolution. We summarized signature genes for the 64 human cell-types. please see 'sg'.

data_type

A character of the type of the single-cell RNA-Seq data, including 'count', 'tpm', 'rpkm','fpkm', and 'cpm'.

select.ct

A character vector of the names of the target cell-types. The default value is NULL. With default value, all cell-types in the single-cell data will be used.

RanSplit

A character (or character vector) to split the random components. The default value is NULL. With default value, all cells, excepting those in target the cell-type, will be fitted as one random component.

ct.cell.size

A character vector of the cell-size (total mRNA amount) of the selected cell-types. The default value is NULL.

BatchCorrect

A Boolean variable to determine whether to run 'ComBat' to correct batch effects between single-cell RNA-Seq and bulk RNA-Seq or not. The default value is FALSE.

Filter

A Boolean variable to determine whether to filter the outlier in single-cell data or not. The default value is FALSE.

SF

Scaling factor. The default value is 1e+3.

ncpu

The number of CPU cores to be used.

iter_max

The maximum iterations of REML.

Value

A list with elements: *ct.pro: matrix of cell-type proportions estimated by mixed linear model (sample x cell-type); *ct.pro.p: matrix of p value (χ²(df=1)) for the cell-type proportions estimated by the mixed linear model (sample x cell-type); *cellSize: vector of cell sizes with labeled cell-type names.

Examples

1
2
library(MLM)
ct.es = CTdcv(bulk = example.bulk,sce = example.sce,gene = example.gene,data_type = 'count')

LeonSong1995/mthodtest documentation built on Jan. 1, 2021, 1:56 p.m.