PersonalBPNet 0.7.0__tar.gz → 0.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {personalbpnet-0.7.0/src/PersonalBPNet.egg-info → personalbpnet-0.9.0}/PKG-INFO +10 -5
  2. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/README.md +7 -1
  3. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/pyproject.toml +12 -4
  4. {personalbpnet-0.7.0 → personalbpnet-0.9.0/src/PersonalBPNet.egg-info}/PKG-INFO +10 -5
  5. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/PersonalBPNet.egg-info/SOURCES.txt +2 -0
  6. personalbpnet-0.9.0/src/cli/tf.py +750 -0
  7. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/personal_bpnet/clipnet_tensorflow.py +1 -1
  8. personalbpnet-0.9.0/src/personal_bpnet/clipnet_tf_fast.py +1977 -0
  9. personalbpnet-0.9.0/tests/test_cli_common.py +187 -0
  10. personalbpnet-0.9.0/tests/test_clipnet_tf_fast.py +522 -0
  11. personalbpnet-0.7.0/src/cli/tf.py +0 -345
  12. personalbpnet-0.7.0/tests/test_cli_common.py +0 -74
  13. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/LICENSE +0 -0
  14. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/setup.cfg +0 -0
  15. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/PersonalBPNet.egg-info/dependency_links.txt +0 -0
  16. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/PersonalBPNet.egg-info/entry_points.txt +0 -0
  17. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/PersonalBPNet.egg-info/requires.txt +0 -0
  18. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/PersonalBPNet.egg-info/top_level.txt +0 -0
  19. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/cli/__init__.py +0 -0
  20. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/cli/_common.py +0 -0
  21. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/cli/clipnet.py +0 -0
  22. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/cli/pausenet.py +0 -0
  23. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/personal_bpnet/__init__.py +0 -0
  24. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/personal_bpnet/clipnet_pytorch.py +0 -0
  25. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/personal_bpnet/losses.py +0 -0
  26. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/personal_bpnet/personal_bpnet.py +0 -0
  27. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/personal_bpnet/procapnet.py +0 -0
  28. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/personal_bpnet/procapnet_orig.py +0 -0
  29. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/src/personal_bpnet/utils.py +0 -0
  30. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/tests/test_losses.py +0 -0
  31. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/tests/test_models.py +0 -0
  32. {personalbpnet-0.7.0 → personalbpnet-0.9.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PersonalBPNet
3
- Version: 0.7.0
3
+ Version: 0.9.0
4
4
  Summary: PyTorch BPNet-family models (CLIPNET, ProCapNet, PauseNet) for base-resolution genomic signal prediction, extending bpnetlite.
5
5
  Author-email: Adam He <adamyhe@gmail.com>
6
6
  License: MIT License
@@ -35,14 +35,13 @@ Classifier: Development Status :: 3 - Alpha
35
35
  Classifier: Intended Audience :: Science/Research
36
36
  Classifier: License :: OSI Approved :: MIT License
37
37
  Classifier: Programming Language :: Python :: 3
38
- Classifier: Programming Language :: Python :: 3.9
39
- Classifier: Programming Language :: Python :: 3.10
40
38
  Classifier: Programming Language :: Python :: 3.11
41
39
  Classifier: Programming Language :: Python :: 3.12
42
40
  Classifier: Programming Language :: Python :: 3.13
41
+ Classifier: Programming Language :: Python :: 3.14
43
42
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
44
43
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
45
- Requires-Python: >=3.9
44
+ Requires-Python: >=3.11
46
45
  Description-Content-Type: text/markdown
47
46
  License-File: LICENSE
48
47
  Requires-Dist: bpnet-lite>=1.0.0
@@ -55,12 +54,17 @@ Dynamic: license-file
55
54
 
56
55
  # PersonalBPNet
57
56
 
57
+ [![PyPI](https://img.shields.io/pypi/v/personalbpnet.svg)](https://pypi.org/project/personalbpnet/)
58
+ [![CI](https://github.com/adamyhe/PersonalBPNet/actions/workflows/ci.yml/badge.svg)](https://github.com/adamyhe/PersonalBPNet/actions/workflows/ci.yml)
59
+ [![PyPI Downloads](https://static.pepy.tech/personalized-badge/personalbpnet?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/personalbpnet)
60
+
58
61
  A PyTorch library of [BPNet](https://github.com/jmschrei/bpnet-lite)-family models for predicting base-resolution genomic signal (e.g., PRO-cap read coverage) from DNA sequence, plus CLI tools for prediction and attribution.
59
62
 
60
63
  - **PersonalBPNet** — `bpnetlite.bpnet.BPNet`, with a `fit()` that validates against a PyTorch `DataLoader` instead of holding the whole validation set in memory.
61
64
  - **CLIPNET** — `PersonalBPNet` plus batch normalization; PyTorch port of the original TensorFlow [CLIPNET](https://github.com/Danko-Lab/clipnet).
62
65
  - **ProCapNet** — `BPNet` with a masked profile loss, improving attributions (from the [ProCapNet paper](https://www.biorxiv.org/content/10.1101/2024.05.28.596138v2)).
63
66
  - **PauseNet** — transfer-learns a base-resolution model to predict a single scalar phenotype per locus.
67
+ - **CLIPNET_TF** — the original TensorFlow CLIPNET architecture in PyTorch, loading its published weights. It comes with fast DeepLIFT/SHAP, in silico mutagenesis, PISA and feature interaction map (DFIM) engines written for it.
64
68
 
65
69
  ## Install
66
70
 
@@ -85,10 +89,11 @@ Installing from source, for local development, is covered in [CONTRIBUTING.md](C
85
89
  | | |
86
90
  | --- | --- |
87
91
  | [docs/clipnet.md](docs/clipnet.md) | `PersonalBPNet` and `CLIPNET`, incl. pretrained weights |
88
- | [docs/clipnet-tf.md](docs/clipnet-tf.md) | Porting the original TensorFlow CLIPNET weights |
92
+ | [docs/clipnet-tf.md](docs/clipnet-tf.md) | `CLIPNET_TF`: the original TensorFlow CLIPNET weights, and fast DeepLIFT/SHAP, ISM, PISA and DFIM for them |
89
93
  | [docs/procapnet.md](docs/procapnet.md) | `ProCapNet` |
90
94
  | [docs/pausenet.md](docs/pausenet.md) | `PauseNet` |
91
95
  | [docs/cli.md](docs/cli.md) | `clipnet`, `pausenet`, and `clipnet_tf` command line tools |
96
+ | [examples/promoter_interpretation](examples/promoter_interpretation/) | Comparing attribution references for `CLIPNET_TF` at 11 promoters, and a DFIM heatmap of the IRF4 promoter |
92
97
  | [CONTRIBUTING.md](CONTRIBUTING.md) | Installing from source and local development |
93
98
 
94
99
  This package is under active development; APIs may change between releases. See [CHANGELOG.md](CHANGELOG.md).
@@ -1,11 +1,16 @@
1
1
  # PersonalBPNet
2
2
 
3
+ [![PyPI](https://img.shields.io/pypi/v/personalbpnet.svg)](https://pypi.org/project/personalbpnet/)
4
+ [![CI](https://github.com/adamyhe/PersonalBPNet/actions/workflows/ci.yml/badge.svg)](https://github.com/adamyhe/PersonalBPNet/actions/workflows/ci.yml)
5
+ [![PyPI Downloads](https://static.pepy.tech/personalized-badge/personalbpnet?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/personalbpnet)
6
+
3
7
  A PyTorch library of [BPNet](https://github.com/jmschrei/bpnet-lite)-family models for predicting base-resolution genomic signal (e.g., PRO-cap read coverage) from DNA sequence, plus CLI tools for prediction and attribution.
4
8
 
5
9
  - **PersonalBPNet** — `bpnetlite.bpnet.BPNet`, with a `fit()` that validates against a PyTorch `DataLoader` instead of holding the whole validation set in memory.
6
10
  - **CLIPNET** — `PersonalBPNet` plus batch normalization; PyTorch port of the original TensorFlow [CLIPNET](https://github.com/Danko-Lab/clipnet).
7
11
  - **ProCapNet** — `BPNet` with a masked profile loss, improving attributions (from the [ProCapNet paper](https://www.biorxiv.org/content/10.1101/2024.05.28.596138v2)).
8
12
  - **PauseNet** — transfer-learns a base-resolution model to predict a single scalar phenotype per locus.
13
+ - **CLIPNET_TF** — the original TensorFlow CLIPNET architecture in PyTorch, loading its published weights. It comes with fast DeepLIFT/SHAP, in silico mutagenesis, PISA and feature interaction map (DFIM) engines written for it.
9
14
 
10
15
  ## Install
11
16
 
@@ -30,10 +35,11 @@ Installing from source, for local development, is covered in [CONTRIBUTING.md](C
30
35
  | | |
31
36
  | --- | --- |
32
37
  | [docs/clipnet.md](docs/clipnet.md) | `PersonalBPNet` and `CLIPNET`, incl. pretrained weights |
33
- | [docs/clipnet-tf.md](docs/clipnet-tf.md) | Porting the original TensorFlow CLIPNET weights |
38
+ | [docs/clipnet-tf.md](docs/clipnet-tf.md) | `CLIPNET_TF`: the original TensorFlow CLIPNET weights, and fast DeepLIFT/SHAP, ISM, PISA and DFIM for them |
34
39
  | [docs/procapnet.md](docs/procapnet.md) | `ProCapNet` |
35
40
  | [docs/pausenet.md](docs/pausenet.md) | `PauseNet` |
36
41
  | [docs/cli.md](docs/cli.md) | `clipnet`, `pausenet`, and `clipnet_tf` command line tools |
42
+ | [examples/promoter_interpretation](examples/promoter_interpretation/) | Comparing attribution references for `CLIPNET_TF` at 11 promoters, and a DFIM heatmap of the IRF4 promoter |
37
43
  | [CONTRIBUTING.md](CONTRIBUTING.md) | Installing from source and local development |
38
44
 
39
45
  This package is under active development; APIs may change between releases. See [CHANGELOG.md](CHANGELOG.md).
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "PersonalBPNet"
7
- version = "0.7.0"
7
+ version = "0.9.0"
8
8
  description = "PyTorch BPNet-family models (CLIPNET, ProCapNet, PauseNet) for base-resolution genomic signal prediction, extending bpnetlite."
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Adam He", email = "adamyhe@gmail.com" }]
@@ -23,16 +23,15 @@ classifiers = [
23
23
  "Intended Audience :: Science/Research",
24
24
  "License :: OSI Approved :: MIT License",
25
25
  "Programming Language :: Python :: 3",
26
- "Programming Language :: Python :: 3.9",
27
- "Programming Language :: Python :: 3.10",
28
26
  "Programming Language :: Python :: 3.11",
29
27
  "Programming Language :: Python :: 3.12",
30
28
  "Programming Language :: Python :: 3.13",
29
+ "Programming Language :: Python :: 3.14",
31
30
  "Topic :: Scientific/Engineering :: Bio-Informatics",
32
31
  "Topic :: Scientific/Engineering :: Artificial Intelligence",
33
32
  ]
34
33
  urls = { Homepage = "https://github.com/adamyhe/PersonalBPNet", Repository = "https://github.com/adamyhe/PersonalBPNet", Issues = "https://github.com/adamyhe/PersonalBPNet/issues", Changelog = "https://github.com/adamyhe/PersonalBPNet/blob/main/CHANGELOG.md", Documentation = "https://github.com/adamyhe/PersonalBPNet/tree/main/docs" }
35
- requires-python = ">= 3.9"
34
+ requires-python = ">= 3.11"
36
35
  dependencies = ["bpnet-lite>=1.0.0", "tangermeme>=1.0.0", "pyfaidx", "numba"]
37
36
 
38
37
  [project.optional-dependencies]
@@ -53,3 +52,12 @@ testpaths = ["tests"]
53
52
  clipnet = "cli.clipnet:cli"
54
53
  pausenet = "cli.pausenet:cli"
55
54
  clipnet_tf = "cli.tf:cli"
55
+
56
+ [tool.uv]
57
+ # bpnet-lite declares macs3 as a dependency, but neither bpnet-lite's code nor
58
+ # ours imports it. macs3 ships no wheels, and its source build fails on some
59
+ # Python versions (e.g. 3.11, where it gets the newest Cython but an older
60
+ # numpy). Excluding it (and its own dependencies) keeps installs wheel-only.
61
+ # This applies to uv (the lockfile, development, CI); `pip install` from PyPI
62
+ # still pulls it in through bpnet-lite.
63
+ exclude-dependencies = ["macs3"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PersonalBPNet
3
- Version: 0.7.0
3
+ Version: 0.9.0
4
4
  Summary: PyTorch BPNet-family models (CLIPNET, ProCapNet, PauseNet) for base-resolution genomic signal prediction, extending bpnetlite.
5
5
  Author-email: Adam He <adamyhe@gmail.com>
6
6
  License: MIT License
@@ -35,14 +35,13 @@ Classifier: Development Status :: 3 - Alpha
35
35
  Classifier: Intended Audience :: Science/Research
36
36
  Classifier: License :: OSI Approved :: MIT License
37
37
  Classifier: Programming Language :: Python :: 3
38
- Classifier: Programming Language :: Python :: 3.9
39
- Classifier: Programming Language :: Python :: 3.10
40
38
  Classifier: Programming Language :: Python :: 3.11
41
39
  Classifier: Programming Language :: Python :: 3.12
42
40
  Classifier: Programming Language :: Python :: 3.13
41
+ Classifier: Programming Language :: Python :: 3.14
43
42
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
44
43
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
45
- Requires-Python: >=3.9
44
+ Requires-Python: >=3.11
46
45
  Description-Content-Type: text/markdown
47
46
  License-File: LICENSE
48
47
  Requires-Dist: bpnet-lite>=1.0.0
@@ -55,12 +54,17 @@ Dynamic: license-file
55
54
 
56
55
  # PersonalBPNet
57
56
 
57
+ [![PyPI](https://img.shields.io/pypi/v/personalbpnet.svg)](https://pypi.org/project/personalbpnet/)
58
+ [![CI](https://github.com/adamyhe/PersonalBPNet/actions/workflows/ci.yml/badge.svg)](https://github.com/adamyhe/PersonalBPNet/actions/workflows/ci.yml)
59
+ [![PyPI Downloads](https://static.pepy.tech/personalized-badge/personalbpnet?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/personalbpnet)
60
+
58
61
  A PyTorch library of [BPNet](https://github.com/jmschrei/bpnet-lite)-family models for predicting base-resolution genomic signal (e.g., PRO-cap read coverage) from DNA sequence, plus CLI tools for prediction and attribution.
59
62
 
60
63
  - **PersonalBPNet** — `bpnetlite.bpnet.BPNet`, with a `fit()` that validates against a PyTorch `DataLoader` instead of holding the whole validation set in memory.
61
64
  - **CLIPNET** — `PersonalBPNet` plus batch normalization; PyTorch port of the original TensorFlow [CLIPNET](https://github.com/Danko-Lab/clipnet).
62
65
  - **ProCapNet** — `BPNet` with a masked profile loss, improving attributions (from the [ProCapNet paper](https://www.biorxiv.org/content/10.1101/2024.05.28.596138v2)).
63
66
  - **PauseNet** — transfer-learns a base-resolution model to predict a single scalar phenotype per locus.
67
+ - **CLIPNET_TF** — the original TensorFlow CLIPNET architecture in PyTorch, loading its published weights. It comes with fast DeepLIFT/SHAP, in silico mutagenesis, PISA and feature interaction map (DFIM) engines written for it.
64
68
 
65
69
  ## Install
66
70
 
@@ -85,10 +89,11 @@ Installing from source, for local development, is covered in [CONTRIBUTING.md](C
85
89
  | | |
86
90
  | --- | --- |
87
91
  | [docs/clipnet.md](docs/clipnet.md) | `PersonalBPNet` and `CLIPNET`, incl. pretrained weights |
88
- | [docs/clipnet-tf.md](docs/clipnet-tf.md) | Porting the original TensorFlow CLIPNET weights |
92
+ | [docs/clipnet-tf.md](docs/clipnet-tf.md) | `CLIPNET_TF`: the original TensorFlow CLIPNET weights, and fast DeepLIFT/SHAP, ISM, PISA and DFIM for them |
89
93
  | [docs/procapnet.md](docs/procapnet.md) | `ProCapNet` |
90
94
  | [docs/pausenet.md](docs/pausenet.md) | `PauseNet` |
91
95
  | [docs/cli.md](docs/cli.md) | `clipnet`, `pausenet`, and `clipnet_tf` command line tools |
96
+ | [examples/promoter_interpretation](examples/promoter_interpretation/) | Comparing attribution references for `CLIPNET_TF` at 11 promoters, and a DFIM heatmap of the IRF4 promoter |
92
97
  | [CONTRIBUTING.md](CONTRIBUTING.md) | Installing from source and local development |
93
98
 
94
99
  This package is under active development; APIs may change between releases. See [CHANGELOG.md](CHANGELOG.md).
@@ -15,12 +15,14 @@ src/cli/tf.py
15
15
  src/personal_bpnet/__init__.py
16
16
  src/personal_bpnet/clipnet_pytorch.py
17
17
  src/personal_bpnet/clipnet_tensorflow.py
18
+ src/personal_bpnet/clipnet_tf_fast.py
18
19
  src/personal_bpnet/losses.py
19
20
  src/personal_bpnet/personal_bpnet.py
20
21
  src/personal_bpnet/procapnet.py
21
22
  src/personal_bpnet/procapnet_orig.py
22
23
  src/personal_bpnet/utils.py
23
24
  tests/test_cli_common.py
25
+ tests/test_clipnet_tf_fast.py
24
26
  tests/test_losses.py
25
27
  tests/test_models.py
26
28
  tests/test_utils.py