doMixtureModelMatrix: Run mixture models for a data matrix of isoform expression

View source: R/doMixtureModelMatrix.R

doMixtureModelMatrixR Documentation

Run mixture models for a data matrix of isoform expression

Description

Run mixture models for a data matrix of isoform expression

Usage

doMixtureModelMatrix(isoformLevel.data, txdb = NULL, usePlot = FALSE,
  useMixModel = TRUE, zero.thres = 0.05, nq.num = 3, fn.out = NULL,
  tbreak = NULL, group.label = NULL)

Arguments

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 doMixtureModelIsoformPair function

nq.num

The maximum components of the mixture model. See doMixtureModelIsoformPair function

fn.out

File name of RData to export results

tbreak

The number of breaks to create bins. See doMixtureModelIsoformPair function

group.label

The group label of cells used for pair plotting

Value

Lists of detected mixture models, AIC scores, number of components and state of models

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)))
res=doMixtureModelMatrix(isoformLevel.data=isoformDataSample,txdb=txdb,tbreak=tbreak)

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