bam2tensor 2.0__tar.gz → 2.1__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.
- bam2tensor-2.1/.gitattributes +1 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/CLAUDE.md +3 -4
- {bam2tensor-2.0 → bam2tensor-2.1}/CONTRIBUTING.md +1 -1
- {bam2tensor-2.0 → bam2tensor-2.1}/PKG-INFO +19 -9
- {bam2tensor-2.0 → bam2tensor-2.1}/README.md +18 -8
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/conf.py +2 -2
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/reference.md +18 -2
- {bam2tensor-2.0 → bam2tensor-2.1}/pyproject.toml +1 -1
- {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/__init__.py +1 -1
- {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/__main__.py +1 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/uv.lock +1 -1
- bam2tensor-2.0/.gitattributes +0 -3
- bam2tensor-2.0/.prettierignore +0 -4
- bam2tensor-2.0/sonar-project.properties +0 -11
- {bam2tensor-2.0 → bam2tensor-2.1}/.darglint +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.editorconfig +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/actions/setup-env/action.yml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/dependabot.yml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/labels.yml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/release-drafter.yml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/workflows/constraints.txt +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/workflows/docs.yml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/workflows/labeler.yml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/workflows/release.yml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.github/workflows/tests.yml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.gitignore +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/.pre-commit-config.yaml +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/LICENSE +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/SECURITY.md +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/Makefile +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/contributing.md +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/index.md +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/license.md +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/logo/604669_dna turning into math, computer _xl-1024-v1-0.png +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/logo/bam2tensor-logo.afdesign +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/logo/bam2tensor-logo.png +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/make.bat +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/nano-banana-overview-shrunk.png +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/docs/templates/package.rst_t +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/noxfile.py +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/embedding.py +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/functions.py +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/py.typed +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/reference.py +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/tests/__init__.py +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_duplication.py +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_embedding.py +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_fasta.fa +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_functions.py +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_main.py +0 -0
- {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_reference.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
|
@@ -23,8 +23,8 @@ nox --session=pre-commit
|
|
|
23
23
|
# Run tests directly
|
|
24
24
|
uv run pytest
|
|
25
25
|
|
|
26
|
-
# Run tests with coverage
|
|
27
|
-
|
|
26
|
+
# Run tests with coverage (via nox)
|
|
27
|
+
nox --session=tests
|
|
28
28
|
|
|
29
29
|
# Format code
|
|
30
30
|
uv run black src tests
|
|
@@ -40,7 +40,7 @@ uv run mypy src
|
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
src/bam2tensor/
|
|
43
|
-
__init__.py # Package version (2.
|
|
43
|
+
__init__.py # Package version (2.1)
|
|
44
44
|
__main__.py # Click CLI entry point
|
|
45
45
|
embedding.py # GenomeMethylationEmbedding class (FASTA parsing, CpG indexing)
|
|
46
46
|
functions.py # Core extraction: extract_methylation_data_from_bam()
|
|
@@ -129,7 +129,6 @@ xdoctest validates code examples in docstrings. Important rules:
|
|
|
129
129
|
## CI/CD
|
|
130
130
|
|
|
131
131
|
- GitHub Actions runs tests on Ubuntu and macOS with Python 3.12
|
|
132
|
-
- SonarCloud integration for quality metrics
|
|
133
132
|
- Automated docs deployment to GitHub Pages
|
|
134
133
|
|
|
135
134
|
## Common Tasks
|
|
@@ -99,7 +99,7 @@ Open a [pull request] to submit changes to this project.
|
|
|
99
99
|
Your pull request needs to meet the following guidelines for acceptance:
|
|
100
100
|
|
|
101
101
|
- The Nox test suite must pass without errors and warnings.
|
|
102
|
-
- Include unit tests.
|
|
102
|
+
- Include unit tests.
|
|
103
103
|
- If your changes add functionality, update the documentation accordingly.
|
|
104
104
|
|
|
105
105
|
Feel free to submit early, though—we can always iterate on this.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bam2tensor
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1
|
|
4
4
|
Summary: Convert bisulfite-seq and EM-seq BAM files to sparse tensor representations of DNA methylation
|
|
5
5
|
Project-URL: Homepage, https://github.com/mcwdsi/bam2tensor
|
|
6
6
|
Project-URL: Repository, https://github.com/mcwdsi/bam2tensor
|
|
@@ -21,6 +21,8 @@ Description-Content-Type: text/markdown
|
|
|
21
21
|
|
|
22
22
|
# bam2tensor
|
|
23
23
|
|
|
24
|
+
**Author:** [Nick Semenkovich](https://nick.semenkovich.com/) (semenko@alum.mit.edu)
|
|
25
|
+
|
|
24
26
|
[][pypi status]
|
|
25
27
|
[][pypi status]
|
|
26
28
|
[][pypi status]
|
|
@@ -221,8 +223,8 @@ bam2tensor \
|
|
|
221
223
|
```
|
|
222
224
|
Usage: bam2tensor [OPTIONS]
|
|
223
225
|
|
|
224
|
-
Extract read-level methylation data from an aligned
|
|
225
|
-
the data as a SciPy sparse matrix.
|
|
226
|
+
Extract read-level methylation data from an aligned bisulfite-seq or EM-seq
|
|
227
|
+
.bam file and export the data as a SciPy sparse matrix.
|
|
226
228
|
|
|
227
229
|
Options:
|
|
228
230
|
--version Show the version and exit.
|
|
@@ -230,19 +232,27 @@ Options:
|
|
|
230
232
|
process. [required]
|
|
231
233
|
--genome-name TEXT A custom string referring to your genome
|
|
232
234
|
name, used to save a cache file (e.g. hg38,
|
|
233
|
-
|
|
235
|
+
hg39-no-alt, etc.).
|
|
234
236
|
--expected-chromosomes TEXT A comma-separated list of chromosomes to
|
|
235
237
|
expect in the .fa genome. Defaults to hg38
|
|
236
|
-
chromosomes
|
|
237
|
-
--reference-fasta
|
|
238
|
-
determine CpG sites).
|
|
238
|
+
chromosomes.
|
|
239
|
+
--reference-fasta FILE Reference genome fasta file (critical to
|
|
240
|
+
determine CpG sites).
|
|
239
241
|
--quality-limit INTEGER Quality filter for aligned reads (default =
|
|
240
|
-
20)
|
|
242
|
+
20)
|
|
241
243
|
--verbose Verbose output.
|
|
242
244
|
--skip-cache De-novo generate CpG sites (slow).
|
|
243
245
|
--debug Debug mode (extensive validity checking +
|
|
244
246
|
debug messages).
|
|
245
247
|
--overwrite Overwrite output file if it exists.
|
|
248
|
+
--output-dir DIRECTORY Output directory for .methylation.npz files.
|
|
249
|
+
Defaults to same directory as the input BAM.
|
|
250
|
+
--download-reference [t2t-chm13|hg19|hg38|mm10]
|
|
251
|
+
Download and cache a known reference genome
|
|
252
|
+
(e.g. hg38, hg19, mm10, T2T-CHM13). Use
|
|
253
|
+
--list-genomes to see options.
|
|
254
|
+
--list-genomes List available reference genomes for
|
|
255
|
+
download and exit.
|
|
246
256
|
--help Show this message and exit.
|
|
247
257
|
```
|
|
248
258
|
|
|
@@ -523,7 +533,7 @@ If you encounter any problems, please [file an issue] with:
|
|
|
523
533
|
|
|
524
534
|
## Credits
|
|
525
535
|
|
|
526
|
-
|
|
536
|
+
**Created and maintained by [Nick Semenkovich](https://nick.semenkovich.com/) ([@semenko](https://github.com/semenko))**, as part of the Medical College of Wisconsin's [Data Science Institute].
|
|
527
537
|
|
|
528
538
|
This project was generated from [Statistics Norway]'s [SSB PyPI Template].
|
|
529
539
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# bam2tensor
|
|
2
2
|
|
|
3
|
+
**Author:** [Nick Semenkovich](https://nick.semenkovich.com/) (semenko@alum.mit.edu)
|
|
4
|
+
|
|
3
5
|
[][pypi status]
|
|
4
6
|
[][pypi status]
|
|
5
7
|
[][pypi status]
|
|
@@ -200,8 +202,8 @@ bam2tensor \
|
|
|
200
202
|
```
|
|
201
203
|
Usage: bam2tensor [OPTIONS]
|
|
202
204
|
|
|
203
|
-
Extract read-level methylation data from an aligned
|
|
204
|
-
the data as a SciPy sparse matrix.
|
|
205
|
+
Extract read-level methylation data from an aligned bisulfite-seq or EM-seq
|
|
206
|
+
.bam file and export the data as a SciPy sparse matrix.
|
|
205
207
|
|
|
206
208
|
Options:
|
|
207
209
|
--version Show the version and exit.
|
|
@@ -209,19 +211,27 @@ Options:
|
|
|
209
211
|
process. [required]
|
|
210
212
|
--genome-name TEXT A custom string referring to your genome
|
|
211
213
|
name, used to save a cache file (e.g. hg38,
|
|
212
|
-
|
|
214
|
+
hg39-no-alt, etc.).
|
|
213
215
|
--expected-chromosomes TEXT A comma-separated list of chromosomes to
|
|
214
216
|
expect in the .fa genome. Defaults to hg38
|
|
215
|
-
chromosomes
|
|
216
|
-
--reference-fasta
|
|
217
|
-
determine CpG sites).
|
|
217
|
+
chromosomes.
|
|
218
|
+
--reference-fasta FILE Reference genome fasta file (critical to
|
|
219
|
+
determine CpG sites).
|
|
218
220
|
--quality-limit INTEGER Quality filter for aligned reads (default =
|
|
219
|
-
20)
|
|
221
|
+
20)
|
|
220
222
|
--verbose Verbose output.
|
|
221
223
|
--skip-cache De-novo generate CpG sites (slow).
|
|
222
224
|
--debug Debug mode (extensive validity checking +
|
|
223
225
|
debug messages).
|
|
224
226
|
--overwrite Overwrite output file if it exists.
|
|
227
|
+
--output-dir DIRECTORY Output directory for .methylation.npz files.
|
|
228
|
+
Defaults to same directory as the input BAM.
|
|
229
|
+
--download-reference [t2t-chm13|hg19|hg38|mm10]
|
|
230
|
+
Download and cache a known reference genome
|
|
231
|
+
(e.g. hg38, hg19, mm10, T2T-CHM13). Use
|
|
232
|
+
--list-genomes to see options.
|
|
233
|
+
--list-genomes List available reference genomes for
|
|
234
|
+
download and exit.
|
|
225
235
|
--help Show this message and exit.
|
|
226
236
|
```
|
|
227
237
|
|
|
@@ -502,7 +512,7 @@ If you encounter any problems, please [file an issue] with:
|
|
|
502
512
|
|
|
503
513
|
## Credits
|
|
504
514
|
|
|
505
|
-
|
|
515
|
+
**Created and maintained by [Nick Semenkovich](https://nick.semenkovich.com/) ([@semenko](https://github.com/semenko))**, as part of the Medical College of Wisconsin's [Data Science Institute].
|
|
506
516
|
|
|
507
517
|
This project was generated from [Statistics Norway]'s [SSB PyPI Template].
|
|
508
518
|
|
|
@@ -20,8 +20,8 @@ sys.path.insert(0, os.path.abspath("../src"))
|
|
|
20
20
|
# -- Project information -----------------------------------------------------
|
|
21
21
|
|
|
22
22
|
project = "Bam2Tensor"
|
|
23
|
-
copyright = "2023-2026, Nick Semenkovich"
|
|
24
|
-
author = "Nick Semenkovich"
|
|
23
|
+
copyright = "2023-2026, Nick Semenkovich (https://nick.semenkovich.com/)"
|
|
24
|
+
author = "Nick Semenkovich (https://nick.semenkovich.com/)"
|
|
25
25
|
|
|
26
26
|
# -- General configuration ---------------------------------------------------
|
|
27
27
|
|
|
@@ -13,14 +13,30 @@ delete the .rst file afterwards.
|
|
|
13
13
|
|
|
14
14
|
```{eval-rst}
|
|
15
15
|
bam2tensor package
|
|
16
|
-
|
|
16
|
+
==================
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
bam2tensor.embedding module
|
|
20
|
+
---------------------------
|
|
21
|
+
|
|
22
|
+
.. automodule:: bam2tensor.embedding
|
|
23
|
+
:members:
|
|
24
|
+
:show-inheritance:
|
|
25
|
+
:undoc-members:
|
|
26
|
+
|
|
19
27
|
bam2tensor.functions module
|
|
20
|
-
|
|
28
|
+
---------------------------
|
|
21
29
|
|
|
22
30
|
.. automodule:: bam2tensor.functions
|
|
23
31
|
:members:
|
|
32
|
+
:show-inheritance:
|
|
24
33
|
:undoc-members:
|
|
34
|
+
|
|
35
|
+
bam2tensor.reference module
|
|
36
|
+
---------------------------
|
|
37
|
+
|
|
38
|
+
.. automodule:: bam2tensor.reference
|
|
39
|
+
:members:
|
|
25
40
|
:show-inheritance:
|
|
41
|
+
:undoc-members:
|
|
26
42
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "bam2tensor"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.1"
|
|
4
4
|
description = "Convert bisulfite-seq and EM-seq BAM files to sparse tensor representations of DNA methylation"
|
|
5
5
|
authors = [{ name = "Nick Semenkovich", email = "semenko@alum.mit.edu" }]
|
|
6
6
|
license = "MIT"
|
|
@@ -360,6 +360,7 @@ def main(
|
|
|
360
360
|
|
|
361
361
|
# ── Header ──────────────────────────────────────────────────────────
|
|
362
362
|
print(f"bam2tensor v{__version__}")
|
|
363
|
+
print("By Nick Semenkovich <semenko@alum.mit.edu>.")
|
|
363
364
|
print("=" * 72)
|
|
364
365
|
|
|
365
366
|
# ── Configuration ───────────────────────────────────────────────────
|
bam2tensor-2.0/.gitattributes
DELETED
bam2tensor-2.0/.prettierignore
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
sonar.projectKey=mcwdsi_bam2tensor
|
|
2
|
-
sonar.organization=mcwdsi
|
|
3
|
-
sonar.host.url=https://sonarcloud.io
|
|
4
|
-
|
|
5
|
-
sonar.sources=src/bam2tensor
|
|
6
|
-
sonar.tests=tests
|
|
7
|
-
|
|
8
|
-
sonar.python.version=3.10
|
|
9
|
-
sonar.python.coverage.reportPaths=coverage.xml
|
|
10
|
-
|
|
11
|
-
sonar.sourceEncoding=UTF-8
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bam2tensor-2.0 → bam2tensor-2.1}/docs/logo/604669_dna turning into math, computer _xl-1024-v1-0.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|