gReLU 1.0.4.post1.dev0__tar.gz → 1.0.6__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 (148) hide show
  1. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/.github/workflows/pypi-publish.yml +7 -0
  2. grelu-1.0.6/.gitignore +56 -0
  3. grelu-1.0.6/.pre-commit-config.yaml +53 -0
  4. grelu-1.0.6/AUTHORS.md +9 -0
  5. grelu-1.0.6/CONTRIBUTING.md +240 -0
  6. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/PKG-INFO +6 -15
  7. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/README.md +3 -13
  8. grelu-1.0.6/docs/tutorials/1_inference.ipynb +2568 -0
  9. grelu-1.0.6/docs/tutorials/2_finetune.ipynb +2733 -0
  10. grelu-1.0.6/docs/tutorials/3_train.ipynb +1309 -0
  11. grelu-1.0.6/docs/tutorials/4_design.ipynb +2684 -0
  12. grelu-1.0.6/docs/tutorials/5_variant.ipynb +2042 -0
  13. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/tutorials/6_model_zoo.ipynb +135 -41
  14. grelu-1.0.6/docs/tutorials/7_simulations.ipynb +2506 -0
  15. grelu-1.0.6/docs/tutorials/8_custom_models.ipynb +1001 -0
  16. grelu-1.0.6/docs/tutorials/lineage.jpeg +0 -0
  17. grelu-1.0.6/docs/tutorials/open-run.jpeg +0 -0
  18. grelu-1.0.6/docs/tutorials/run-page.jpeg +0 -0
  19. grelu-1.0.6/media/fork.jpg +0 -0
  20. grelu-1.0.6/media/new_issue.jpg +0 -0
  21. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/pyproject.toml +1 -1
  22. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/setup.py +5 -5
  23. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/gReLU.egg-info/PKG-INFO +6 -15
  24. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/gReLU.egg-info/SOURCES.txt +9 -6
  25. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/__init__.py +0 -1
  26. grelu-1.0.6/src/grelu/data/__init__.py +4 -0
  27. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/data/augment.py +30 -12
  28. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/data/dataset.py +279 -58
  29. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/data/preprocess.py +54 -3
  30. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/data/utils.py +32 -2
  31. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/design.py +6 -1
  32. grelu-1.0.6/src/grelu/interpret/__init__.py +3 -0
  33. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/interpret/modisco.py +144 -74
  34. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/interpret/motifs.py +50 -122
  35. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/interpret/score.py +24 -4
  36. grelu-1.0.6/src/grelu/interpret/simulate.py +259 -0
  37. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/io/__init__.py +3 -1
  38. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/io/bed.py +2 -1
  39. {grelu-1.0.4.post1.dev0/src/grelu/lightning → grelu-1.0.6/src/grelu}/io/bigwig.py +2 -1
  40. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/io/fasta.py +2 -1
  41. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/io/genome.py +2 -2
  42. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/io/motifs.py +3 -1
  43. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/lightning/__init__.py +173 -79
  44. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/lightning/losses.py +7 -1
  45. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/lightning/metrics.py +6 -2
  46. grelu-1.0.6/src/grelu/model/__init__.py +4 -0
  47. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/model/blocks.py +3 -1
  48. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/model/heads.py +5 -1
  49. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/model/layers.py +4 -1
  50. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/model/models.py +11 -1
  51. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/model/position.py +1 -1
  52. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/model/trunks/__init__.py +5 -1
  53. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/__init__.py +12 -6
  54. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/meme/H12CORE_meme_format.meme +0 -1
  55. grelu-1.0.6/src/grelu/sequence/__init__.py +3 -0
  56. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/sequence/format.py +6 -5
  57. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/sequence/metrics.py +1 -1
  58. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/sequence/mutate.py +1 -1
  59. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/sequence/utils.py +1 -1
  60. {grelu-1.0.4.post1.dev0/src/grelu/data → grelu-1.0.6/src/grelu/transforms}/__init__.py +0 -0
  61. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/transforms/label_transforms.py +4 -3
  62. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/transforms/prediction_transforms.py +5 -3
  63. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/transforms/seq_transforms.py +6 -1
  64. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/utils.py +1 -1
  65. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/variant.py +37 -30
  66. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/visualize.py +56 -0
  67. grelu-1.0.6/tests/conftest.py +10 -0
  68. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_dataset.py +111 -16
  69. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_design.py +0 -1
  70. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_interpret.py +143 -25
  71. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_lightning.py +55 -20
  72. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_preprocess.py +26 -11
  73. grelu-1.0.4.post1.dev0/.pre-commit-config.yaml +0 -68
  74. grelu-1.0.4.post1.dev0/AUTHORS.md +0 -4
  75. grelu-1.0.4.post1.dev0/CONTRIBUTING.md +0 -278
  76. grelu-1.0.4.post1.dev0/docs/tutorials/1_inference.ipynb +0 -2347
  77. grelu-1.0.4.post1.dev0/docs/tutorials/2_finetune.ipynb +0 -2015
  78. grelu-1.0.4.post1.dev0/docs/tutorials/3_train.ipynb +0 -1397
  79. grelu-1.0.4.post1.dev0/docs/tutorials/4_design.ipynb +0 -2539
  80. grelu-1.0.4.post1.dev0/docs/tutorials/5_variant.ipynb +0 -2026
  81. grelu-1.0.4.post1.dev0/src/grelu/io/bigwig.py +0 -98
  82. grelu-1.0.4.post1.dev0/src/grelu/lightning/io/__init__.py +0 -136
  83. grelu-1.0.4.post1.dev0/src/grelu/lightning/io/bed.py +0 -97
  84. grelu-1.0.4.post1.dev0/src/grelu/lightning/io/fasta.py +0 -48
  85. grelu-1.0.4.post1.dev0/src/grelu/lightning/io/genome.py +0 -93
  86. grelu-1.0.4.post1.dev0/src/grelu/lightning/io/meme.py +0 -115
  87. grelu-1.0.4.post1.dev0/src/grelu/model/__init__.py +0 -0
  88. grelu-1.0.4.post1.dev0/src/grelu/sequence/__init__.py +0 -0
  89. grelu-1.0.4.post1.dev0/src/grelu/transforms/__init__.py +0 -0
  90. grelu-1.0.4.post1.dev0/tests/__init__.py +0 -0
  91. grelu-1.0.4.post1.dev0/tests/conftest.py +0 -10
  92. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/.github/workflows/pypi-test.yml +0 -0
  93. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/CHANGELOG.md +0 -0
  94. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/Dockerfile +0 -0
  95. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/LICENSE.txt +0 -0
  96. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/MANIFEST.in +0 -0
  97. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/Makefile +0 -0
  98. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/_static/switcher.json +0 -0
  99. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/authors.rst +0 -0
  100. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/changelog.rst +0 -0
  101. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/conf.py +0 -0
  102. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/contributing.rst +0 -0
  103. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/index.md +0 -0
  104. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/license.rst +0 -0
  105. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/media/flowchart.jpg +0 -0
  106. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/readme.rst +0 -0
  107. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/docs/requirements.txt +0 -0
  108. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/media/flowchart.jpg +0 -0
  109. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/setup.cfg +0 -0
  110. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/gReLU.egg-info/dependency_links.txt +0 -0
  111. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/gReLU.egg-info/not-zip-safe +0 -0
  112. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/gReLU.egg-info/requires.txt +0 -0
  113. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/gReLU.egg-info/top_level.txt +0 -0
  114. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/model/trunks/borzoi.py +0 -0
  115. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/model/trunks/enformer.py +0 -0
  116. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/model/trunks/explainn.py +0 -0
  117. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/blacklists/encode/hg19-blacklist.v2.bed +0 -0
  118. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/blacklists/encode/hg38-blacklist.v2.bed +0 -0
  119. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/blacklists/encode/mm10-blacklist.v2.bed +0 -0
  120. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/blacklists/mito_combined/hg19.full.blacklist.bed +0 -0
  121. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/blacklists/mito_combined/hg19_mm10_c.full.blacklist.bed +0 -0
  122. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/blacklists/mito_combined/hg38.full.blacklist.bed +0 -0
  123. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/blacklists/mito_combined/mm10.full.blacklist.bed +0 -0
  124. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/blacklists/mito_combined/mm9.full.blacklist.bed +0 -0
  125. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/src/grelu/resources/meme/jaspar_2024_consensus.meme +0 -0
  126. {grelu-1.0.4.post1.dev0/src/grelu/interpret → grelu-1.0.6/tests}/__init__.py +0 -0
  127. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/files/test.bed +0 -0
  128. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/files/test.bw +0 -0
  129. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/files/test.fa.gz +0 -0
  130. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/files/test.meme +0 -0
  131. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/files/test_modisco.h5 +0 -0
  132. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/files/test_variants.txt +0 -0
  133. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/files/tomtom/neg_patterns.pattern_0.tomtom.tsv +0 -0
  134. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/files/tomtom/neg_patterns.pattern_1.tomtom.tsv +0 -0
  135. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_augment.py +0 -0
  136. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_blocks.py +0 -0
  137. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_data_utils.py +0 -0
  138. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_heads.py +0 -0
  139. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_io.py +0 -0
  140. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_layers.py +0 -0
  141. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_models.py +1 -1
  142. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_positional.py +0 -0
  143. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_resources.py +0 -0
  144. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_sequence.py +0 -0
  145. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_transforms.py +0 -0
  146. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_utils.py +0 -0
  147. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tests/test_variant.py +0 -0
  148. {grelu-1.0.4.post1.dev0 → grelu-1.0.6}/tox.ini +0 -0
@@ -31,6 +31,13 @@ jobs:
31
31
  github_token: ${{ secrets.GITHUB_TOKEN }}
32
32
  publish_dir: _build/
33
33
  force_orphan: true
34
+ - name: Install dependencies
35
+ run: |
36
+ python -m pip install --upgrade pip
37
+ pip install tox
38
+ - name: Build Project
39
+ run: |
40
+ python -m tox -e clean,build
34
41
  - name: Publish package
35
42
  uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
36
43
  with:
grelu-1.0.6/.gitignore ADDED
@@ -0,0 +1,56 @@
1
+ # Temporary and binary files
2
+ *~
3
+ *.py[cod]
4
+ *.so
5
+ *.cfg
6
+ !.isort.cfg
7
+ !setup.cfg
8
+ *.orig
9
+ *.log
10
+ *.pot
11
+ __pycache__/*
12
+ .cache/*
13
+ .*.swp
14
+ */.ipynb_checkpoints/*
15
+ .DS_Store
16
+
17
+ # Project files
18
+ .ropeproject
19
+ .project
20
+ .pydevproject
21
+ .settings
22
+ .idea
23
+ .vscode
24
+ tags
25
+
26
+ # Package files
27
+ *.egg
28
+ *.eggs/
29
+ .installed.cfg
30
+ *.egg-info
31
+
32
+ # Unittest and coverage
33
+ htmlcov/*
34
+ .coverage
35
+ .coverage.*
36
+ .tox
37
+ junit*.xml
38
+ coverage.xml
39
+ .pytest_cache/
40
+
41
+ # Build and docs folder/files
42
+ build/*
43
+ dist/*
44
+ sdist/*
45
+ docs/api/*
46
+ docs/_rst/*
47
+ docs/_build/*
48
+ cover/*
49
+ MANIFEST
50
+
51
+ # Per-project virtualenvs
52
+ .venv*/
53
+ .conda*/
54
+ .python-version
55
+
56
+ lightning_logs*
@@ -0,0 +1,53 @@
1
+ exclude: '^docs/conf.py'
2
+
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: check-added-large-files
9
+ - id: check-ast
10
+ - id: check-json
11
+ - id: check-merge-conflict
12
+ - id: check-xml
13
+ - id: check-yaml
14
+ - id: debug-statements
15
+ - id: end-of-file-fixer
16
+ - id: requirements-txt-fixer
17
+ - id: mixed-line-ending
18
+ args: ['--fix=auto'] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
19
+
20
+ # - repo: https://github.com/PyCQA/docformatter
21
+ # rev: master
22
+ # hooks:
23
+ # - id: docformatter
24
+ # additional_dependencies: [tomli]
25
+ # args: [--in-place, --wrap-descriptions=120, --wrap-summaries=120]
26
+ # # --config, ./pyproject.toml
27
+
28
+ # - repo: https://github.com/psf/black
29
+ # rev: 24.8.0
30
+ # hooks:
31
+ # - id: black
32
+ # language_version: python3
33
+
34
+ # - repo: https://github.com/astral-sh/ruff-pre-commit
35
+ # # Ruff version.
36
+ # rev: v0.8.6
37
+ # hooks:
38
+ # - id: ruff
39
+ # args: [--fix, --exit-non-zero-on-fix]
40
+ # - id: ruff-format
41
+
42
+ ## If like to embrace black styles even in the docs:
43
+ # - repo: https://github.com/asottile/blacken-docs
44
+ # rev: v1.13.0
45
+ # hooks:
46
+ # - id: blacken-docs
47
+ # additional_dependencies: [black]
48
+
49
+ ## Check for misspells in documentation files:
50
+ # - repo: https://github.com/codespell-project/codespell
51
+ # rev: v2.2.5
52
+ # hooks:
53
+ # - id: codespell
grelu-1.0.6/AUTHORS.md ADDED
@@ -0,0 +1,9 @@
1
+ # Contributors
2
+
3
+ * Avantika Lal <lal.avantika@gene.com>
4
+ * Gokcen Eraslan <eraslan.gokcen@gene.com>
5
+ * Surag Nair <nair.surag@gene.com>
6
+ * David Garfield <garfield.david@gene.com>
7
+ * Jayaram Kancherla <kancherla.jayaram@gene.com>
8
+ * Ketrin Gjoni <gjonik@external.gene.com>
9
+ * M. Hasan Celik <celik.hasan@external.gene.com>
@@ -0,0 +1,240 @@
1
+ # Contributing
2
+
3
+ Welcome to the ``gReLU`` contributor's guide.
4
+
5
+ This document focuses on getting any potential contributor familiarized with the development processes, but [other kinds of contributions](https://opensource.guide/how-to-contribute) are also appreciated.
6
+
7
+ If you are new to using git or have never collaborated in a project previously, please have a look at
8
+ [contribution-guide.org](https://www.contribution-guide.org/). Other resources are also listed in the
9
+ excellent [guide created by FreeCodeCamp](https://github.com/FreeCodeCamp/how-to-contribute).
10
+
11
+ Please notice, all users and contributors are expected to be **open, considerate, reasonable, and
12
+ respectful**. When in doubt, [Python Software Foundation's Code of Conduct](https://www.python.org/psf/conduct/) is a good reference in terms of behavior guidelines.
13
+
14
+ ## Issue Reports
15
+
16
+ If you experience bugs or general issues with ``gReLU``, please have a look at the
17
+ [issue tracker](https://github.com/Genentech/gReLU/issues). If you don't see anything useful there, please file a new issue report.
18
+
19
+ (Don't forget to include the closed issues in your search. Sometimes a solution was already reported, and the problem is considered solved.)
20
+
21
+ You can file a new issue by clicking the "New issue" button at the top right of the issue tracker.
22
+ ![New Issue](media/new_issue.jpg)
23
+
24
+ Your new issue report should include the following information:
25
+
26
+ 1. Information about your programming environment (e.g., operating system, Python version)
27
+ 2. Steps to reproduce the problem. Please try to simplify the reproduction steps to a very minimal example that still illustrates the problem you are facing. By removing other factors, you help us to identify the root cause of the issue.
28
+ 4. The full error message that you encountered, if any.
29
+ 5. Any steps that you took to diagnose or fix the issue, and their outcomes.
30
+ 6. Any suggestions for resolving the issue.
31
+
32
+
33
+ ## Making code contributions
34
+
35
+ ### Coding resources
36
+
37
+ ``gReLU`` uses pytorch and pytorch-lightning. The below tutorials are good starting points to become familiar with these frameworks:
38
+
39
+ [PyTorch tutorials](https://pytorch.org/tutorials/beginner/basics/intro.html)
40
+
41
+ [Lightning tutorials](https://lightning.ai/docs/pytorch/stable/levels/core_skills.html)
42
+
43
+ ### Understanding project structure
44
+
45
+ We welcome external contributions to ``gReLU``. Before planning changes to the code, we suggest carefully examining the current structure and organization of the package.
46
+
47
+ The [API reference](https://genentech.github.io/gReLU/autoapi/index.html) lists all the modules and submodules available in gReLU. Clicking on individual modules on this list will reveal a description of the module and what kinds of functions it is meant to contain. The descriptions also contain more detailed explanations of the expected structure of each module. This will help you find the appropriate location to make changes.
48
+
49
+ For instance, the table below lists some different types of functionality that contributors may want to add or change, and the corresponding module / submodule of ``gReLU``. Click on the name of a module for more details on its structure.
50
+
51
+ | Functionality | Module |
52
+ | ---------------- | ------- |
53
+ | Functions to read / write genomic data | [`grelu.io`](https://genentech.github.io/gReLU/autoapi/grelu/io/index.html) |
54
+ | Functions to preprocess genomic data after it is loaded | [`grelu.data.preprocess`](https://genentech.github.io/gReLU/autoapi/grelu/data/preprocess/index.html) |
55
+ | New data augmentation methods | [`grelu.data.augment`](https://genentech.github.io/gReLU/autoapi/grelu/data/augment/index.html) |
56
+ | Functions to introduce various types of in silico mutations into DNA sequences | [`grelu.sequence.mutate`](https://genentech.github.io/gReLU/autoapi/grelu/sequence/mutate/index.html) |
57
+ | Other functions to manipulate DNA sequences | [`grelu.sequence.utils`](https://genentech.github.io/gReLU/autoapi/grelu/sequence/utils/index.html) |
58
+ | Functions to score DNA sequences based on their content | [`grelu.transforms.seq_transforms`](https://genentech.github.io/gReLU/autoapi/grelu/transforms/seq_transforms/index.html) |
59
+ | Functions to transform model predictions | [`grelu.transforms.prediction_transforms`](https://genentech.github.io/gReLU/autoapi/grelu/transforms/prediction_transforms/index.html) |
60
+ | New types of model layers | [`grelu.model.layers`](https://genentech.github.io/gReLU/autoapi/grelu/model/layers/index.html) |
61
+ | New model architectures | [`grelu.model.models`](https://genentech.github.io/gReLU/autoapi/grelu/model/models/index.html) |
62
+ | New loss functions | [`grelu.lightning.losses`](https://genentech.github.io/gReLU/autoapi/grelu/lightning/losses/index.html)|
63
+ | New metrics to calculate model performance | [`grelu.lightning.metrics`](https://genentech.github.io/gReLU/autoapi/grelu/lightning/metrics/index.html) |
64
+ | New plots and visualizations | [`grelu.visualize`](https://genentech.github.io/gReLU/autoapi/grelu/visualize/index.html) |
65
+ | Unit tests for new functions | [`tests`](https://github.com/Genentech/gReLU/tree/main/tests) |
66
+
67
+ Two ex
68
+
69
+
70
+ For complex changes that may not fit clearly within the established package structure, it is important to first raise an issue (see instructions below).
71
+
72
+
73
+ ## Step-by-step instructions to contribute new code
74
+
75
+ ### Submit an issue
76
+
77
+ Before you work on any non-trivial code contribution it's best to first create an issue in the
78
+ [issue tracker](https://github.com/Genentech/gReLU/issues) to start a discussion on the subject.
79
+ This often provides additional considerations and avoids unnecessary work.
80
+
81
+ ### Create an environment
82
+
83
+ Before you start coding, we recommend creating an isolated [virtual
84
+ environment](https://realpython.com/python-virtual-environments-a-primer/) to avoid any problems with your installed Python packages. This can easily be done via either [virtualenv](https://virtualenv.pypa.io/en/stable/):
85
+ ```
86
+ virtualenv <PATH TO VENV>
87
+ source <PATH TO VENV>/bin/activate
88
+ ```
89
+ or [Miniconda](https://docs.conda.io/en/latest/miniconda.html):
90
+ ```
91
+ conda create -n grelu python=3 six virtualenv pytest pytest-cov
92
+ conda activate grelu
93
+ ```
94
+ ### Clone the repository
95
+
96
+ 1. Create an user account on [GitHub](https://github.com), if you do not already have one.
97
+ 2. Fork the [project repository](https://github.com/Genentech/gReLU/): click on the *Fork* button near the top of
98
+ the page. This creates a copy of the code under your account on [GitHub](https://github.com/).
99
+
100
+ ![Fork](media/fork.jpg)
101
+
102
+ 4. Clone this copy to your local disk::
103
+ ```
104
+ git clone git@github.com:YourLogin/grelu.git
105
+ cd grelu
106
+ ```
107
+ 4. You should run::
108
+ ```
109
+ pip install -U pip setuptools -e .
110
+ ```
111
+ to be able to import the package under development in the Python REPL.
112
+
113
+ 5. Install [pre-commit](https://pre-commit.com/):
114
+ ```
115
+ pip install pre-commit
116
+ pre-commit install
117
+ ```
118
+ ``grelu`` comes with a lot of hooks configured to automatically help the
119
+ developer to check the code being written.
120
+
121
+ ### Implement your changes
122
+
123
+ 1. Create a branch to hold your changes::
124
+ ```
125
+ git checkout -b my-feature
126
+ ```
127
+ and start making changes. Never work on the main branch!
128
+
129
+ 2. Implement your code changes on this branch.
130
+
131
+ 3. If you change or add any functions, modules and classes, don't forget to update or add docstrings to describe these changes.
132
+
133
+ 4. If your contribution adds an additional feature and is not just a bugfix, we suggest also adding unit tests in https://github.com/Genentech/gReLU/tree/main/tests.
134
+
135
+ 5. Add yourself to the list of contributors in ``AUTHORS.rst``.
136
+
137
+ 6. When you’re done editing, do::
138
+ ```p
139
+ git add <MODIFIED FILES>
140
+ git commit
141
+ ```
142
+ to record your changes in git. Moreover, writing a [descriptive commit message](https://chris.beams.io/posts/git-commit)
143
+ is highly recommended.
144
+
145
+ Please make sure to see the validation messages from [pre-commit](https://pre-commit.com/) and fix any issues.
146
+ This should automatically use [flake8](https://flake8.pycqa.org/en/stable/)/[black](https://pypi.org/project/black/)
147
+ to check/fix the code style in a way that is compatible with the project.
148
+
149
+ ### Test your changes
150
+
151
+ Please check that your changes don't break any unit tests with::
152
+ ```
153
+ tox
154
+ ```
155
+ (after having installed [tox](https://tox.wiki/en/stable/) with ``pip install tox`` or ``pipx``).
156
+ You can also use [tox](https://tox.wiki/en/stable/) to run several other pre-configured tasks in the
157
+ repository. Try ``tox -av`` to see a list of the available checks.
158
+
159
+ ### Submit your contribution
160
+
161
+ 1. If everything works fine, push your local branch to [GitHub](https://github.com/) with:
162
+ ```
163
+ git push -u origin my-feature
164
+ ```
165
+ 2. Go to the web page of your fork and click "Create pull request"
166
+ to send your changes for review.
167
+
168
+ Find more detailed information in [creating a PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). You might also want to open the PR as a draft first and mark it as ready for review
169
+ after the feedback from the continuous integration (CI) system or any required fixes.
170
+
171
+ ## Troubleshooting
172
+
173
+ The following tips can be used when facing problems to build or test the
174
+ package:
175
+
176
+ 1. Make sure to fetch all the tags from the upstream repository_.
177
+ The command ``git describe --abbrev=0 --tags`` should return the version you
178
+ are expecting. If you are trying to run CI scripts in a fork repository,
179
+ make sure to push all the tags.
180
+ You can also try to remove all the egg files or the complete egg folder, i.e.,
181
+ ``.eggs``, as well as the ``*.egg-info`` folders in the ``src`` folder or
182
+ potentially in the root of your project.
183
+
184
+ 2. Sometimes [tox](https://tox.wiki/en/stable/) misses out when new dependencies are added, especially to
185
+ ``setup.cfg`` and ``docs/requirements.txt``. If you find any problems with
186
+ missing dependencies when running a command with [tox](https://tox.wiki/en/stable/), try to recreate the
187
+ ``tox`` environment using the ``-r`` flag. For example, instead of::
188
+ ```shell
189
+ tox -e docs
190
+ ```
191
+ Try running::
192
+ ```shell
193
+ tox -r -e docs
194
+ ```
195
+ 3. Make sure to have a reliable [tox](https://tox.wiki/en/stable/) installation that uses the correct
196
+ Python version (e.g., 3.7+). When in doubt you can run::
197
+
198
+ ```shell
199
+ tox --version
200
+ # OR
201
+ which tox
202
+ ```
203
+
204
+ If you have trouble and are seeing weird errors upon running [tox](https://tox.wiki/en/stable/), you can
205
+ also try to create a dedicated [virtual environment](https://realpython.com/python-virtual-environments-a-primer/)
206
+ with a [tox](https://tox.wiki/en/stable/) binary freshly installed. For example::
207
+
208
+ virtualenv .venv
209
+ source .venv/bin/activate
210
+ .venv/bin/pip install tox
211
+ .venv/bin/tox -e all
212
+
213
+ 4. [Pytest can drop you](https://docs.pytest.org/en/stable/how-to/failures.html#using-python-library-pdb-with-pytest) in an
214
+ interactive session in the case an error occurs. In order to do that you need to pass a ``--pdb`` option (for example by
215
+ running ``tox -- -k <NAME OF THE FALLING TEST> --pdb``).
216
+ You can also setup breakpoints manually instead of using the ``--pdb`` option.
217
+
218
+ ## Maintainer tasks
219
+
220
+ ### Releases
221
+
222
+ If you are part of the group of maintainers and have correct user permissions on [PyPI](https://pypi.org/),
223
+ the following steps can be used to release a new version for ``grelu``:
224
+
225
+ 1. Make sure all unit tests are successful.
226
+ 2. Tag the current commit on the main branch with a release tag, e.g., ``v1.2.3``.
227
+ 3. Push the new tag to the upstream repository_, e.g., ``git push upstream v1.2.3``
228
+ 4. Clean up the ``dist`` and ``build`` folders with ``tox -e clean``
229
+ (or ``rm -rf dist build``)
230
+ to avoid confusion with old builds and Sphinx docs.
231
+ 5. Run ``tox -e build`` and check that the files in ``dist`` have
232
+ the correct version (no ``.dirty`` or git hash) according to the git tag.
233
+ Also check the sizes of the distributions, if they are too big (e.g., >
234
+ 500KB), unwanted clutter may have been accidentally included.
235
+ 6. Run ``tox -e publish -- --repository pypi`` and check that everything was
236
+ uploaded to PyPI_ correctly.
237
+
238
+ ## Contributing to the model zoo
239
+
240
+ gReLU's [model zoo](https://wandb.ai/grelu) is intended to host a curated set of models which are likely to be broadly useful to many users of the package. If you would like to contribute such a model, please let us know via a GitHub issue (see instructions above). Note that it is not necessary to contribute a model to the zoo in order to share it with the community, as gReLU saves checkpoint files that contain exhaustive metadata and can be easily shared and reused.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: gReLU
3
- Version: 1.0.4.post1.dev0
3
+ Version: 1.0.6
4
4
  Summary: gReLU is a python library to train, interpret, and apply deep learning models to DNA sequences
5
5
  Home-page: https://code.roche.com/gred-rb-ai-ml-regulatory-genomics/grelu
6
6
  Author: lal.avantika,eraslan.gokcen
@@ -44,6 +44,7 @@ Provides-Extra: testing
44
44
  Requires-Dist: setuptools; extra == "testing"
45
45
  Requires-Dist: pytest; extra == "testing"
46
46
  Requires-Dist: pytest-cov; extra == "testing"
47
+ Dynamic: license-file
47
48
 
48
49
  # gReLU
49
50
 
@@ -78,19 +79,7 @@ pip install gReLU
78
79
 
79
80
  ## Contributing
80
81
 
81
- This project uses [pre-commit](https://pre-commit.com/). Please make sure to install it before making any changes:
82
-
83
- ```shell
84
- pip install pre-commit
85
- cd gReLU
86
- pre-commit install
87
- ```
88
-
89
- It is a good idea to update the hooks to the latest version:
90
-
91
- ```shell
92
- pre-commit autoupdate
93
- ```
82
+ See our [contribution guide](https://genentech.github.io/gReLU/contributing.html).
94
83
 
95
84
  ## Additional requirements
96
85
 
@@ -121,6 +110,8 @@ bioconda::ucsc-gtftogenepred \
121
110
  bioconda::ucsc-gff3togenepred
122
111
  ```
123
112
 
113
+ If you want to create ATAC-seq coverage bigWig files using `grelu.data.preprocess.make_insertion_bigwig`, you will need to install bedtools. See https://bedtools.readthedocs.io/en/latest/content/installation.html for instructions.
114
+
124
115
  ## Citation
125
116
 
126
117
  Please cite our preprint: https://www.biorxiv.org/content/10.1101/2024.09.18.613778v1
@@ -31,19 +31,7 @@ pip install gReLU
31
31
 
32
32
  ## Contributing
33
33
 
34
- This project uses [pre-commit](https://pre-commit.com/). Please make sure to install it before making any changes:
35
-
36
- ```shell
37
- pip install pre-commit
38
- cd gReLU
39
- pre-commit install
40
- ```
41
-
42
- It is a good idea to update the hooks to the latest version:
43
-
44
- ```shell
45
- pre-commit autoupdate
46
- ```
34
+ See our [contribution guide](https://genentech.github.io/gReLU/contributing.html).
47
35
 
48
36
  ## Additional requirements
49
37
 
@@ -74,6 +62,8 @@ bioconda::ucsc-gtftogenepred \
74
62
  bioconda::ucsc-gff3togenepred
75
63
  ```
76
64
 
65
+ If you want to create ATAC-seq coverage bigWig files using `grelu.data.preprocess.make_insertion_bigwig`, you will need to install bedtools. See https://bedtools.readthedocs.io/en/latest/content/installation.html for instructions.
66
+
77
67
  ## Citation
78
68
 
79
69
  Please cite our preprint: https://www.biorxiv.org/content/10.1101/2024.09.18.613778v1