wRPC | R Documentation |
This function takes as input a number of genome-wide DNAm profiles from purified or complex bulk tissue samples and estimates the proportions of the main cell-types in the samples.
wRPC(data, ref.m, useW = TRUE, wth=0.4, maxit = 100)
data |
A DNAm data matrix with columns labeling samples and rows labeling genes (using Entrez gene identifier). This assumes that DNAm has been summarized at the gene level, for instance by averaging DNAm values over CpGs or probes that map to 200bp upstream of the gene's TSS. data can also be a vector if there is only one sample. |
ref.m |
The DNAm reference matrix to be used with rows labeling genes (using Entrez gene identifier) and columns labeling the main cell-types, with last column labeling the weight. Weights need to be between 0 and 1. |
useW |
A logical. If 'TRUE' weights are used in the regression, otherwise not. |
wth |
A threshold on the weights to select most informative
genes. Only used if |
maxit |
The maximum number of iterations in the robust linear regression. |
A list containing the following elements:
estF |
A matrix of estimated cell-type fractions, with rows labeling samples and columns labeling the cell-types in the reference matrix. |
ref |
The reference matrix used, i.e for the genes overlapping with those in the data matrix. |
Teschendorff AE, Zhu T, Breeze CE, Beck S. Cell-type deconvolution of bulk tissue DNA methylomes from single-cell RNA-Seq data Genome Biol.2020
Teschendorff AE, Breeze CE, Zheng SC, Beck S. A comparison of reference-based algorithms for correcting cell-type heterogeneity in Epigenome-Wide Association Studies. BMC Bioinformatics (2017) 18: 105. doi: 10.1186/s12859-017-1511-5.
data(lungSS2mca1) out.l <- ConstExpRef(lungSS2mca1.m,celltypeSS2.idx,celltypeSS2.v,markspecTH.v=rep(3,4)); refDNAm1.m <- ImputeDNAmRef(out.l$ref$med,db="SCM2",geneID="SYMBOL"); refDNAm2.m <- ImputeDNAmRef(out.l$ref$med,db="RMAP",geneID="SYMBOL"); refDNAm.m <- ConstMergedDNAmRef(refDNAm1.m,refDNAm2.m); data(testDNAm); avDNAm.m <- constAvBetaTSS(testDNAm.m,type="450k"); wRPC.o <- wRPC(avDNAm.m,refDNAm.m,useW=TRUE,wth=0.4,maxit=200); print(head(wRPC.o$est));
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.