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.
Files changed (53) hide show
  1. bam2tensor-2.1/.gitattributes +1 -0
  2. {bam2tensor-2.0 → bam2tensor-2.1}/CLAUDE.md +3 -4
  3. {bam2tensor-2.0 → bam2tensor-2.1}/CONTRIBUTING.md +1 -1
  4. {bam2tensor-2.0 → bam2tensor-2.1}/PKG-INFO +19 -9
  5. {bam2tensor-2.0 → bam2tensor-2.1}/README.md +18 -8
  6. {bam2tensor-2.0 → bam2tensor-2.1}/docs/conf.py +2 -2
  7. {bam2tensor-2.0 → bam2tensor-2.1}/docs/reference.md +18 -2
  8. {bam2tensor-2.0 → bam2tensor-2.1}/pyproject.toml +1 -1
  9. {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/__init__.py +1 -1
  10. {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/__main__.py +1 -0
  11. {bam2tensor-2.0 → bam2tensor-2.1}/uv.lock +1 -1
  12. bam2tensor-2.0/.gitattributes +0 -3
  13. bam2tensor-2.0/.prettierignore +0 -4
  14. bam2tensor-2.0/sonar-project.properties +0 -11
  15. {bam2tensor-2.0 → bam2tensor-2.1}/.darglint +0 -0
  16. {bam2tensor-2.0 → bam2tensor-2.1}/.editorconfig +0 -0
  17. {bam2tensor-2.0 → bam2tensor-2.1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  18. {bam2tensor-2.0 → bam2tensor-2.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  19. {bam2tensor-2.0 → bam2tensor-2.1}/.github/actions/setup-env/action.yml +0 -0
  20. {bam2tensor-2.0 → bam2tensor-2.1}/.github/dependabot.yml +0 -0
  21. {bam2tensor-2.0 → bam2tensor-2.1}/.github/labels.yml +0 -0
  22. {bam2tensor-2.0 → bam2tensor-2.1}/.github/release-drafter.yml +0 -0
  23. {bam2tensor-2.0 → bam2tensor-2.1}/.github/workflows/constraints.txt +0 -0
  24. {bam2tensor-2.0 → bam2tensor-2.1}/.github/workflows/docs.yml +0 -0
  25. {bam2tensor-2.0 → bam2tensor-2.1}/.github/workflows/labeler.yml +0 -0
  26. {bam2tensor-2.0 → bam2tensor-2.1}/.github/workflows/release.yml +0 -0
  27. {bam2tensor-2.0 → bam2tensor-2.1}/.github/workflows/tests.yml +0 -0
  28. {bam2tensor-2.0 → bam2tensor-2.1}/.gitignore +0 -0
  29. {bam2tensor-2.0 → bam2tensor-2.1}/.pre-commit-config.yaml +0 -0
  30. {bam2tensor-2.0 → bam2tensor-2.1}/LICENSE +0 -0
  31. {bam2tensor-2.0 → bam2tensor-2.1}/SECURITY.md +0 -0
  32. {bam2tensor-2.0 → bam2tensor-2.1}/docs/Makefile +0 -0
  33. {bam2tensor-2.0 → bam2tensor-2.1}/docs/contributing.md +0 -0
  34. {bam2tensor-2.0 → bam2tensor-2.1}/docs/index.md +0 -0
  35. {bam2tensor-2.0 → bam2tensor-2.1}/docs/license.md +0 -0
  36. {bam2tensor-2.0 → bam2tensor-2.1}/docs/logo/604669_dna turning into math, computer _xl-1024-v1-0.png +0 -0
  37. {bam2tensor-2.0 → bam2tensor-2.1}/docs/logo/bam2tensor-logo.afdesign +0 -0
  38. {bam2tensor-2.0 → bam2tensor-2.1}/docs/logo/bam2tensor-logo.png +0 -0
  39. {bam2tensor-2.0 → bam2tensor-2.1}/docs/make.bat +0 -0
  40. {bam2tensor-2.0 → bam2tensor-2.1}/docs/nano-banana-overview-shrunk.png +0 -0
  41. {bam2tensor-2.0 → bam2tensor-2.1}/docs/templates/package.rst_t +0 -0
  42. {bam2tensor-2.0 → bam2tensor-2.1}/noxfile.py +0 -0
  43. {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/embedding.py +0 -0
  44. {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/functions.py +0 -0
  45. {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/py.typed +0 -0
  46. {bam2tensor-2.0 → bam2tensor-2.1}/src/bam2tensor/reference.py +0 -0
  47. {bam2tensor-2.0 → bam2tensor-2.1}/tests/__init__.py +0 -0
  48. {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_duplication.py +0 -0
  49. {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_embedding.py +0 -0
  50. {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_fasta.fa +0 -0
  51. {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_functions.py +0 -0
  52. {bam2tensor-2.0 → bam2tensor-2.1}/tests/test_main.py +0 -0
  53. {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
- uv run pytest --cov
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.0)
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. This project maintains 100% code coverage.
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.0
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](https://img.shields.io/pypi/v/bam2tensor.svg)][pypi status]
25
27
  [![Status](https://img.shields.io/pypi/status/bam2tensor.svg)][pypi status]
26
28
  [![Python Version](https://img.shields.io/pypi/pyversions/bam2tensor)][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 .bam file and export
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
- hg38-no-alt, etc.). [required]
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 (chr1-chr22, chrX, chrY).
237
- --reference-fasta PATH Reference genome FASTA file (critical to
238
- determine CpG sites). [required]
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
- This project is developed and maintained by [Nick Semenkovich (@semenko)], as part of the Medical College of Wisconsin's [Data Science Institute].
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](https://img.shields.io/pypi/v/bam2tensor.svg)][pypi status]
4
6
  [![Status](https://img.shields.io/pypi/status/bam2tensor.svg)][pypi status]
5
7
  [![Python Version](https://img.shields.io/pypi/pyversions/bam2tensor)][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 .bam file and export
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
- hg38-no-alt, etc.). [required]
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 (chr1-chr22, chrX, chrY).
216
- --reference-fasta PATH Reference genome FASTA file (critical to
217
- determine CpG sites). [required]
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
- This project is developed and maintained by [Nick Semenkovich (@semenko)], as part of the Medical College of Wisconsin's [Data Science Institute].
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.0"
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"
@@ -50,4 +50,4 @@ See Also:
50
50
  - https://mcwdsi.github.io/bam2tensor for full documentation
51
51
  """
52
52
 
53
- __version__ = "2.0"
53
+ __version__ = "2.1"
@@ -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 ───────────────────────────────────────────────────
@@ -62,7 +62,7 @@ wheels = [
62
62
 
63
63
  [[package]]
64
64
  name = "bam2tensor"
65
- version = "1.5"
65
+ version = "2.0"
66
66
  source = { editable = "." }
67
67
  dependencies = [
68
68
  { name = "biopython" },
@@ -1,3 +0,0 @@
1
- * text=auto eol=lf
2
- *.ipynb filter=nbstripout
3
- *.ipynb diff=ipynb
@@ -1,4 +0,0 @@
1
- # Ignore this files since they are reindented with json.dump() and that does not
2
- # match the prettier format.
3
- .cookiecutter.json
4
- .cruft.json
@@ -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