View source: R/detectPatternType.R
detectPatternType | R Documentation |
Detect a type of pattern for each pair
detectPatternType(dmix.list, side.nqs = NULL, nq.list, isoformLevel.data,
geneLevel.data = NULL)
dmix.list |
A list of detected models |
side.nqs |
A list of type of sides of models |
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 |
A list consisting of types of patterns and merged types of patterns
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)
res=detectPatternType(dmix.list=model.res$dmix.list,
nq.list=model.res$nq.list,isoformLevel.data=isoformDataSample)
pie(table(res$pattern.type),col=colors()[c(12,11,132,131,137,136)])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.