This function produces standard statistics for allelespecific events based on a single RNAseq or ChIPseq study. It first pools replicates within a given study to sum the read counts for the reference allele and the nonreference allele. Then based on the pooled read counts, it calculates naive z statistic, naive Bayes statistic and empirical Bayes statistic.
1  ASErawfit(exprs,studyid,repid,refid)

exprs 
A matrix, each row of the matrix corresponds to a heterozygotic SNP and each column of the matrix corresponds to the reads count for either the reference allele or nonreference allele in a replicate of a study. 
studyid 
The group label for each column of exprs matrix. all columns in the same study have the same studyid. 
repid 
The sample label for each column of exprs matrix. The two columns within the same sample, one for reference allele and the other for nonreference allele, have the same repid. In other words, repid discriminates the different replicates within the same study. 
refid 
The reference allele label for each column of exprs matrix. Please code 0 for reference allele columns and 1 for nonreference allele columns to make the interpretation of over expressed (or bound) to be skewing to the reference allele. Otherwise, just interpret the other way round. 
One should indicate the studyid, repid and refid for each column clearly.
z 
Naive z statistic. A matrix, each row of the matrix corresponds to a heteroygpotic SNP of the input matrix ('exprs') and each column corresponds to a study. 
b 
Naive Bayes statistic. A matrix, each row of the matrix corresponds to a heteroygpotic SNP of the input matrix ('exprs') and each column corresponds to a study. 
B 
Empirical Bayes statistic. A matrix, each row of the matrix corresponds to a heteroygpotic SNP of the input matrix ('exprs') and each column corresponds to a study. 
c0d 
α parameter for the null beta prior distribution for pooled counts for each study. A vector whose length equals to the number of studies. 
d0d 
β parameter for the null beta prior distribution for pooled counts for each study. A vector whose length equals to the number of studies. 
p0d 
Mean of the null beta prior distribution for pooled counts for each study. A vector whose length equals to the number of studies. 
p0dz 
Raw mean of the reference allele proportion. A vector whose length equals to the number of studies. 
Yingying Wei
Yingying Wei, Xia Li, Qianfei Wang, Hongkai Ji (2012) iASeq: integrating multiple ChIPseq datasets for detecting allelespecific binding.
sampleASE
1 2 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.