Custom sequence prediction - kundajelab/chrombpnet GitHub Wiki

Here are two options you can use:

Option 1: I’ve created some example notebooks to demonstrate how this can be done here You’re welcome to adapt them to your use case. The notebooks accept custom sequences in FASTA format — I've included an example.fa file as an input example.

Option 2: Tangermeme already supports this functionality. You can use bpnet-lite to load models trained from this repository. Once the models are loaded into PyTorch, you can use Tangermeme directly.

Loading chrombpnet_nobias.h5 model with bpnet-lite repo -

from bpnetlite import BPNet
accessibility_model=/path/to/chrombpnet_nobias.h5
acc = BPNet.from_chrombpnet(accessibility_model)

Loading chrombpnet.h5 model with bpnet-lite repo -

from bpnetlite import ChromBPNet
bias_model=/path/to/bias_model_scaled.h5
accessibility_model=/path/to/chrombpnet_nobias.h5
chrombpnet = ChromBPNet.from_chrombpnet(bias_model, accessibility_model)

you can then proceed to use these models with tangermeme.

If you have any questions about using this approach, feel free to open a new GitHub issue at Tangermeme's issue tracker.