View source: R/assignCellComp.R
assignCellComp | R Documentation |
Cluster cells to components based on their proximities to the distributions
assignCellComp(iso.pair.names, dmix.list, nq.list, isoformLevel.data,
geneLevel.data = NULL)
iso.pair.names |
A vector of names of isoform pairs in the format: gene.isoform1.isoform2 |
dmix.list |
A list of mixture models obtained from doMixtureModelMatrix function |
nq.list |
A list of number of components of detected models |
isoformLevel.data |
A data matrix of isoform expression |
geneLevel.data |
A data matrix of gene expression |
Two lists of matrices cellCompMat.conf and cellCompMat.prob indicating confidence scores and probabilities of cells assigned to components
library("TxDb.Hsapiens.UCSC.hg19.knownGene")
library("AnnotationDbi")
txdb=TxDb.Hsapiens.UCSC.hg19.knownGene
#The txdb also can be imported from a gtf file by using package GenomicFeatures
data(isoformDataSample)
#preprocessing
isoformDataSample=ifelse(isoformDataSample <= 3,0,isoformDataSample)
isoformDataSample=isoformDataSample[which(rowSums(isoformDataSample)>0),]
#tranform read count dataset to log scale
isoformDataSample=ifelse(isoformDataSample==0,0,log2(isoformDataSample))
#now data is ready
tbreak=round(sqrt(ncol(isoformDataSample)))
model.res=doMixtureModelMatrix(isoformLevel.data=isoformDataSample,txdb=txdb,tbreak=tbreak)
iso.pair.names=names(model.res$nq.list)
res=assignCellComp(iso.pair.names,model.res$dmix.list,
model.res$nq.list, isoformLevel.data=isoformDataSample)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.