{"id":19669923,"url":"https://github.com/dohlee/bpnet-pytorch","last_synced_at":"2025-07-21T07:32:49.758Z","repository":{"id":74891091,"uuid":"604202188","full_name":"dohlee/bpnet-pytorch","owner":"dohlee","description":"Implementation of BPNet, a base-resolution convolutional neural network for transcription-factor binding prediction, in PyTorch.","archived":false,"fork":false,"pushed_at":"2023-05-07T11:32:38.000Z","size":85,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-06T12:42:09.706Z","etag":null,"topics":["bioinformatics","biology","computational-biology","deep-learning","reproduction","reproduction-code","transcription-factor-binding"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dohlee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-20T14:52:13.000Z","updated_at":"2024-12-08T02:18:49.000Z","dependencies_parsed_at":"2023-07-11T07:46:02.666Z","dependency_job_id":null,"html_url":"https://github.com/dohlee/bpnet-pytorch","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"6c9591f24565c77e45b4c82cc3bc0068a333cc42"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dohlee/bpnet-pytorch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohlee%2Fbpnet-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohlee%2Fbpnet-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohlee%2Fbpnet-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohlee%2Fbpnet-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dohlee","download_url":"https://codeload.github.com/dohlee/bpnet-pytorch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohlee%2Fbpnet-pytorch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266261189,"owners_count":23901287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","biology","computational-biology","deep-learning","reproduction","reproduction-code","transcription-factor-binding"],"created_at":"2024-11-11T17:03:10.392Z","updated_at":"2025-07-21T07:32:49.738Z","avatar_url":"https://github.com/dohlee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bpnet-pytorch (wip)\n\n![model](img/banner.png)\n\nImplementation of BPNet, a base-resolution deep neural network for functional genomics tasks. The offical implementation of BPNet can be found [here](https://github.com/kundajelab/bpnet).\n\n## Installation\n\n```shell\n$ pip install bpnet-pytorch\n```\n\n## Usage\n```Python\nfrom bpnet_pytorch import BPNet\n\nmodel = BPNet()\n\nx = torch.randn(1, 4, 1000)\nout = model(x)\n# out['x'] contains the output of the convolution layers.\n# May not be useful, but left for debugging purpose for now.\n### shape: (1, 64, 1000)\n\n# out['profile'] contains the output of profile head.\n### shape: (1, 1000, 2), 2 for +/- strands.\n\n# out['total_count'] contains the output of total count head.\n### shape: (1, 2), 2 for +/- strands.\n```\n\n## Training\n\n### Data\nTraining data used to train the original BPNet model can be found [here](https://zenodo.org/record/3371216) (30.8GB).\n\n## TODO\n\n- [x] Confirm that the receptive field is +-1034bp.\n\n![receptive-field-check](img/receptive_field_check.png)\n\n- [x] Implement early stopping.\n\n- [x] Implement multinomial negative log-likelihood loss.\n\n- [ ] Modify heads for multi-task (multi-TF) prediction.\n\n- [ ] Prepare training data.\n\n- [ ] Train the model and reproduce the performance.\n\n## Citation\n```bibtex\n@article{avsec2021base,\n  title={Base-resolution models of transcription-factor binding reveal soft motif syntax},\n  author={Avsec, {\\v{Z}}iga and Weilert, Melanie and Shrikumar, \n    Avanti and Krueger, Sabrina and Alexandari, Amr and Dalal, Khyati and Fropf,\n    Robin and McAnany, Charles and Gagneur, Julien and Kundaje, Anshul and others},\n  journal={Nature Genetics},\n  volume={53},\n  number={3},\n  pages={354--366},\n  year={2021},\n  publisher={Nature Publishing Group US New York}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdohlee%2Fbpnet-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdohlee%2Fbpnet-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdohlee%2Fbpnet-pytorch/lists"}