Skip to content

Implementation of BPNet, a base-resolution convolutional neural network for transcription-factor binding prediction, in PyTorch.

Notifications You must be signed in to change notification settings

dohlee/bpnet-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bpnet-pytorch (wip)

model

Implementation of BPNet, a base-resolution deep neural network for functional genomics tasks. The offical implementation of BPNet can be found here.

Installation

$ pip install bpnet-pytorch

Usage

from bpnet_pytorch import BPNet

model = BPNet()

x = torch.randn(1, 4, 1000)
out = model(x)
# out['x'] contains the output of the convolution layers.
# May not be useful, but left for debugging purpose for now.
### shape: (1, 64, 1000)

# out['profile'] contains the output of profile head.
### shape: (1, 1000, 2), 2 for +/- strands.

# out['total_count'] contains the output of total count head.
### shape: (1, 2), 2 for +/- strands.

Training

Data

Training data used to train the original BPNet model can be found here (30.8GB).

TODO

  • Confirm that the receptive field is +-1034bp.

receptive-field-check

  • Implement early stopping.

  • Implement multinomial negative log-likelihood loss.

  • Modify heads for multi-task (multi-TF) prediction.

  • Prepare training data.

  • Train the model and reproduce the performance.

Citation

@article{avsec2021base,
  title={Base-resolution models of transcription-factor binding reveal soft motif syntax},
  author={Avsec, {\v{Z}}iga and Weilert, Melanie and Shrikumar, 
    Avanti and Krueger, Sabrina and Alexandari, Amr and Dalal, Khyati and Fropf,
    Robin and McAnany, Charles and Gagneur, Julien and Kundaje, Anshul and others},
  journal={Nature Genetics},
  volume={53},
  number={3},
  pages={354--366},
  year={2021},
  publisher={Nature Publishing Group US New York}
}

About

Implementation of BPNet, a base-resolution convolutional neural network for transcription-factor binding prediction, in PyTorch.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages