cormotiffitall: All Studies Correlation Motif Fit

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Cormotif.R

Description

This function assumes that a gene is either differentially expressed in all studies or is not differentially expressed in any study. It gives the fitted values for the probability distribution of motif (0,0,...0) and motif (1,1,...,1), and the posterior probability for each gene to be differentially expressed in all studies.

Usage

1
cormotiffitall(exprs,groupid,compid, tol=1e-3, max.iter=100)

Arguments

exprs

a matrix, the expression data after normalization that is on log2 scale, each row of the matrix corresponds to a gene and each column of the matrix corresponds to a sample array.

groupid

the group label for each sample array, two arrays in the same study with same experinment condition(e.g. control) have the same groupid.

compid

the study design and comparison matrix, each row of the matrix corresponds to one study with the first column being the first experinment condition and the second column being the second experinment condition

tol

the relative tolerance level of error.

max.iter

maximun number of iterations.

Details

The difference between cormotiffitall and cormotif(...,K=2,...) is that cormotiffitall forces the motif to be one of the two patterns but cormotiffit allows motif patterns other than (0,...,0) and (1,..,1).

Value

p.post

the posterior probability for each gene to be differentially expressed

motif.prior

fitted values of the probability distribution of motif (0,0,...0) and motif (1,1,...,1)

loglike

log-likelihood of the fitted model

Author(s)

Hongkai Ji, Yingying Wei

References

Ji, H., Wei, Y.,(2011) Correlation Motif. Unpublished

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(simudata2)
n<-nrow(simudata2)
m<-ncol(simudata2)
#the expression data is from the second column to m
exprs.simu2<-as.matrix(simudata2[,2:m])

#prepare the group label for each sample array
data(simu2_groupid)

#prepare the design matrix for each group of samples
data(simu2_compgroup)

#fit the two motifs (0,0,...0) and (1,1,...,1) to the data
motif.fitted.all<-cormotiffitall(exprs.simu2, simu2_groupid,simu2_compgroup)

Cormotif documentation built on Nov. 8, 2020, 6:53 p.m.