FT                      Freeman-Tukey transformation functions.
MBASED                  MBASED
MBASEDMetaAnalysis      Generic function to perform standard meta
                        analysis.
MBASEDMetaAnalysisGetMeansAndSEs
                        Helper function to obtain estimate of
                        underlying mean and the standard error of the
                        estimate in meta analysis framework.
MBASEDVectorizedMetaprop
                        Vectorized wrapper around metaprop() function
                        from R package "meta" with some modifications
                        and extensions to beta-binomial count models.
MBASEDVectorizedPropDiffTest
                        Vectorized wrapper around a test for difference
                        of 2 proportions.
estimateMAF1s           Function that given observed count data returns
                        a maximum likelihood estimate of the underlying
                        haplotype frequency. Both situations where the
                        haplotype are known and unknown are handled. In
                        the latter case, likelihood is further
                        maximized over all possible assignments of
                        alleles to haplotypes.
estimateMAF2s           Function that given observed count data returns
                        a maximum likelihood estimate of the underlying
                        haplotype frequency. Both situations where the
                        haplotype are known and unknown are handled. In
                        the latter case, likelihood is further
                        maximized over all possible assignments of
                        alleles to haplotypes.
getMuRho                Functions to convert between shape parameters a
                        and b for beta distribution and parameters mu
                        (mean) and rho (dispersion).
getPFinal               Function that adjusts true underlying allele
                        frequency for pre-existing allelic bias to
                        produce actual generating probability of
                        observing allele-supporting read
getSimulationPvalue     Function to calculate simulations-based
                        p-values
logLikelihoodCalculator1s
                        Function that given observed count data along a
                        known haplotype returns a function that can
                        calculate the likelihood of observing that data
                        for a supplied underlying haplotype frequency.
logLikelihoodCalculator2s
                        Function that given observed count data along a
                        known haplotype returns a function that can
                        calculate the likelihood of observing that data
                        for a supplied underlying haplotype frequency.
maxLogLikelihoodCalculator1s
                        Function that given observed count data along a
                        known haplotype returns a maximum likelihood
                        estimate of the underlying haplotype frequency.
maxLogLikelihoodCalculator2s
                        Function that given observed count data along a
                        known haplotype returns a maximum likelihood
                        estimate of the underlying haplotype frequency.
runMBASED               Main function that implements MBASED.
runMBASED1s             Function that runs single-sample ASE calling
                        using data from individual loci (SNVs) within
                        units of ASE (genes). Vector arguments
                        'lociAllele1Counts', 'lociAllele2Counts',
                        'lociAllele1NoASEProbs', 'lociRhos', and
                        'aseIDs' should all be of the same length.
                        Letting i1, i2, .., iN denote the indices
                        corresponding to entries within aseIDs equal to
                        a given aseID, the entries at those indices in
                        the other vector arguments provide information
                        for the loci within that aseID. This
                        information is then used by runMBASED1s1aseID.
                        It is assumed that for any i, the i-th entries
                        of all vector arguments correspond to the same
                        locus. If argument 'isPhased' (see below) is
                        true, then entries corresponding to allele1 at
                        each locus must represent the same haplotype.
runMBASED1s1aseID       Function that runs single-sample ASE calling
                        using data from loci (SNVs) within a single
                        unit of ASE (gene). The i-th entry of each of
                        vector arguments 'lociAllele1Counts',
                        'lociAllele2Counts', 'lociAllele1NoASEProbs',
                        'lociRhos' should correspond to the i-th locus.
                        If argument 'isPhased' (see below) is true,
                        then entries corresponding to allele1 at each
                        locus must represent the same haplotype. Note:
                        for each locus, at least one allele should have
                        >0 supporting reads.
runMBASED2s             Function that runs between-sample
                        (differential) ASE calling using data from
                        individual loci (SNVs) within units of ASE
                        (genes). Vector arguments
                        'lociAllele1CountsSample1',
                        'lociAllele2CountsSample1',
                        'lociAllele1NoASEProbsSample1',
                        'lociRhosSample1', 'lociAllele1CountsSample2',
                        'lociAllele2CountsSample2',
                        'lociAllele1NoASEProbsSample2',
                        'lociRhosSample2', and 'aseIDs' should all be
                        of the same length. Letting i1, i2, .., iN
                        denote the indices corresponding to entries
                        within aseIDs equal to a given aseID, the
                        entries at those indices in the other vector
                        arguments provide information for the loci
                        within that aseID for the respective samples.
                        This information is then used by
                        runMBASED2s1aseID. It is assumed that for any
                        i, the i-th entries of all vector arguments
                        correspond to the same locus, and that the
                        entries corresponding to allele1 in sample1 and
                        sample2 provide information on the same allele.
                        If argument 'isPhased' (see below) is true,
                        then entries corresponding to allele1 at each
                        locus must represent the same haplotype.
runMBASED2s1aseID       Function that runs between-sample
                        (differential) ASE calling using data from loci
                        (SNVs) within a single unit of ASE (gene). The
                        i-th entry of each of vector arguments
                        'lociAllele1CountsSample1',
                        'lociAllele2CountsSample1',
                        'lociAllele1NoASEProbsSample1',
                        'lociRhosSample1', 'lociAllele1CountsSample2',
                        'lociAllele2CountsSample2',
                        'lociAllele1NoASEProbsSample2', and
                        'lociRhosSample2' should correspond to the i-th
                        locus. If argument 'isPhased' (see below) is
                        true, then entries corresponding to allele1 at
                        each locus must represent the same haplotype.
                        Note: for each locus in each sample, at least
                        one allele should have >0 supporting reads.
shiftAndAttenuateProportions
                        Helper function to adjust proportions for
                        pre-existing allelic bias and also to obtain
                        estimate of proportion variance based on
                        attenuated read counts (adding pseudocount of
                        0.5 to each allele in each sample).
testNumericDiff         Function that checks to see if the difference
                        between 2 number is small enough.
testQuantiles           Function to test quantile equality for
                        theoretical and observed distributions
vectorizedRbetabinomAB
                        Functions to generate beta-binomial random
                        variables.
