View source: R/doMixtureModelIsoformPair.R
doMixtureModelIsoformPair | R Documentation |
Do mixture modelling for two isoforms
doMixtureModelIsoformPair(x0, x1, nq.num = 3, tbreak = NULL,
zero.thres = 0.05, min.prop = 0.025)
x0 |
A vector of data points from isoform 1 |
x1 |
A vector of data points from isoform 2 |
nq.num |
The maximum components of the mixture model |
tbreak |
The number of breaks to create bins |
zero.thres |
The threshold to separate components from null component p0 |
min.prop |
Minimum proportion threshold for a component in the mixture model |
A list consisting of list of mixture models (dmix.list), index of the best model (AIC.min.Id), vector of AIC scores (AIC.score), ...
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)))
x0=isoformDataSample[1,]
x1=isoformDataSample[2,]
res=doMixtureModelIsoformPair(x0,x1,tbreak=tbreak)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.