View source: R/doMixtureModelMatrix.R
doMixtureModelMatrix | R Documentation |
Run mixture models for a data matrix of isoform expression
doMixtureModelMatrix(isoformLevel.data, txdb = NULL, usePlot = FALSE,
useMixModel = TRUE, zero.thres = 0.05, nq.num = 3, fn.out = NULL,
tbreak = NULL, group.label = NULL)
isoformLevel.data |
A data matrix of isoform expression |
txdb |
A txdb of annotation reference |
usePlot |
A boolean value to allow plotting data and results, usePlot=FALSE (default) |
useMixModel |
A boolean value to allow implementing the mixture model, useMixModel=TRUE (default) |
zero.thres |
The threshold to separate components from null component p0. See |
nq.num |
The maximum components of the mixture model. See |
fn.out |
File name of RData to export results |
tbreak |
The number of breaks to create bins. See |
group.label |
The group label of cells used for pair plotting |
Lists of detected mixture models, AIC scores, number of components and state of models
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)))
res=doMixtureModelMatrix(isoformLevel.data=isoformDataSample,txdb=txdb,tbreak=tbreak)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.