detectPatternType: Detect a type of pattern for each pair

View source: R/detectPatternType.R

detectPatternTypeR Documentation

Detect a type of pattern for each pair

Description

Detect a type of pattern for each pair

Usage

detectPatternType(dmix.list, side.nqs = NULL, nq.list, isoformLevel.data,
  geneLevel.data = NULL)

Arguments

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

Value

A list consisting of types of patterns and merged types of patterns

Examples

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)])

nghiavtr/ISOP documentation built on April 21, 2023, 3:57 p.m.