recipe bayesase

Bayesian analysis of allele specific expression



MIT / MIT License



Allelic imbalance (AI) indicates the presence of functional variation in cis regulatory regions. Detecting cis regulatory differences using AI is widespread, yet there is no formal statistical methodology that tests whether AI differs between conditions. The testing for AI involves several complex bioinformatics steps. BayesASE is a complete bioinformatics pipeline that incorporates state-of-the-art error reduction techniques and a flexible Bayesian approach to estimating AI and formally comparing levels of AI between conditions ( The modular structure of BayeASE has been packaged as a python package (, bioconda package (, Galaxy toolkit, made available in Nextflow and as a collection of scripts for the SLURM workload manager in the BayesASE project repository on github( The model included with the package can formally test AI within one condition for three or more replicates and can statistically compare differences in AI across conditions. This includes reciprocal crosses, test-crosses, and comparisons of GxE for the same genotype in replicated experiments. As gene expression affects power for detection of AI, and as expression may vary between conditions, the model explicitly takes coverage into account. The proposed model has low type I and II error under several scenarios, and is robust to large differences in coverage between conditions. The model included with the package reports estimates of AI for each condition, and the corresponding Bayesian evidence as well as a formal statistical evaluation of AI between conditions. The package is completely modular and the bioinformatics steps needed to map reads in a genotype specific manner can be used as input for other statistical models of AI and other methods for read counting can be used and the model described in Novelo et al. 2018 deployed. This model represents an update to the R code provided with the publication as the MCMC algorithm is now implemented in RSTAN (Stan Development Team (2020). "RStan: the R interface to Stan." R package ( and bias is allowed to vary between conditions and more than 2 conditions can be compared. This is a very general implementation.

package bayesase

(downloads) docker_bayesase


depends biopython:


depends importlib_resources:

depends numpy:


depends pandas:


depends python:


depends r-bh:

depends r-here:

depends r-rstan:



You need a conda-compatible package manager (currently either micromamba, mamba, or conda) and the Bioconda channel already activated (see set-up-channels).

While any of above package managers is fine, it is currently recommended to use either micromamba or mamba (see here for installation instructions). We will show all commands using mamba below, but the arguments are the same for the two others.

Given that you already have a conda environment in which you want to have this package, install with:

   mamba install bayesase

and update with::

   mamba update bayesase

To create a new environment, run:

mamba create --name myenvname bayesase

with myenvname being a reasonable name for the environment (see e.g. the mamba docs for details and further options).

Alternatively, use the docker container:

   docker pull<tag>

(see `bayesase/tags`_ for valid values for ``<tag>``)

Download stats