doMixtureModelGene: Do mixture modelling for all pairs of isoforms of the same...

View source: R/doMixtureModelGene.R

doMixtureModelGeneR Documentation

Do mixture modelling for all pairs of isoforms of the same single individual gene

Description

Do mixture modelling for all pairs of isoforms of the same single individual gene

Usage

doMixtureModelGene(isoMat, geneName = "geneName", usePlot = FALSE,
  useMixModel = TRUE, zero.thres = 0.05, nq.num = 3, tbreak = NULL,
  group.label = NULL)

Arguments

isoMat

Data matrix contains isoforms of a same individual gene. Each row indicates a isoform, while each column presents a cell

geneName

A string contains the name of gene that the isoforms are sharing

usePlot

A boolean value to allow plotting data and results. By default usePlot=FALSE

useMixModel

A boolean value to allow implementing the mixture model. By default useMixModel=TRUE

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

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 results of mixture models for isoform paires

Examples

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)))
isoMat=isoformDataSample[c(1,2),]
res=doMixtureModelGene(isoMat,geneName="118424",tbreak=tbreak)

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