bpnet-lite
bpnet-lite is a re-implementation of the BPNet and ChromBPNet models developed by the Kundaje Lab in PyTorch, along with useful functionality for using these models in practice. It has been developed with a focus on making the usage of these models as simple as possible and minimize the barrier to entry. Accordingly, care has been taken to support loading models trained using the official repositories, it is integrated with other packages in this ecosystem (bam2bw, TF-MoDISco, and tangermeme), and has command-line tools supporting the training and downstream usage of these models. The training of BPNet models is supported, both in the Python and command-line interface, but the training of ChromBPNet models should be done using the official TensorFlow repository to ensure consistent performance.
In this documentation, you will find a narrative introduction to the models supported here, practical guides for “how-to” use this code to apply Chrom/BPNet models in your setting, and tutorials on how to use the command-line API to go completely end-to-end from raw data to analysis results. Additionally, we have included a notebook confirming that the predictions made when loading the models into PyTorch exactly match those made from the official repositories.
Likely, the fastest way to get started with BPNet models is to use the command-line tool with the pipeline argument. This handles the preprocessing of your data, training and evaluation of a BPNet model, calculation of attributions using DeepLIFT/SHAP, seqlet calling+annotation, running of TF-MoDISCo, and running of in silico marginalizations. Ultimately, you end up with an evaluated model and multiple results hinting at the types of cis-regulatory features it has learned.
Installation is as simple as pip install bpnet-lite.