gretapy 0.0.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 (79) hide show
  1. gretapy-0.0.1/.codecov.yaml +17 -0
  2. gretapy-0.0.1/.editorconfig +15 -0
  3. gretapy-0.0.1/.github/ISSUE_TEMPLATE/bug_report.yml +93 -0
  4. gretapy-0.0.1/.github/ISSUE_TEMPLATE/config.yml +5 -0
  5. gretapy-0.0.1/.github/ISSUE_TEMPLATE/feature_request.yml +11 -0
  6. gretapy-0.0.1/.github/workflows/build.yaml +26 -0
  7. gretapy-0.0.1/.github/workflows/release.yaml +27 -0
  8. gretapy-0.0.1/.github/workflows/test.yaml +97 -0
  9. gretapy-0.0.1/.gitignore +21 -0
  10. gretapy-0.0.1/.pre-commit-config.yaml +38 -0
  11. gretapy-0.0.1/.readthedocs.yaml +16 -0
  12. gretapy-0.0.1/.vscode/extensions.json +18 -0
  13. gretapy-0.0.1/.vscode/launch.json +33 -0
  14. gretapy-0.0.1/.vscode/settings.json +18 -0
  15. gretapy-0.0.1/CHANGELOG.md +15 -0
  16. gretapy-0.0.1/LICENSE +21 -0
  17. gretapy-0.0.1/PKG-INFO +139 -0
  18. gretapy-0.0.1/README.md +92 -0
  19. gretapy-0.0.1/biome.jsonc +17 -0
  20. gretapy-0.0.1/docs/_static/.gitkeep +0 -0
  21. gretapy-0.0.1/docs/_static/css/custom.css +4 -0
  22. gretapy-0.0.1/docs/_static/images/gabstract.png +0 -0
  23. gretapy-0.0.1/docs/_static/images/logo.png +0 -0
  24. gretapy-0.0.1/docs/_templates/.gitkeep +0 -0
  25. gretapy-0.0.1/docs/_templates/autosummary/class.rst +61 -0
  26. gretapy-0.0.1/docs/api/ds.md +14 -0
  27. gretapy-0.0.1/docs/api/index.md +33 -0
  28. gretapy-0.0.1/docs/api/mt.md +15 -0
  29. gretapy-0.0.1/docs/api/pl.md +14 -0
  30. gretapy-0.0.1/docs/api/tl.md +26 -0
  31. gretapy-0.0.1/docs/changelog.md +3 -0
  32. gretapy-0.0.1/docs/conf.py +140 -0
  33. gretapy-0.0.1/docs/extensions/typed_returns.py +32 -0
  34. gretapy-0.0.1/docs/index.md +12 -0
  35. gretapy-0.0.1/docs/references.bib +10 -0
  36. gretapy-0.0.1/docs/references.md +5 -0
  37. gretapy-0.0.1/pyproject.toml +160 -0
  38. gretapy-0.0.1/src/gretapy/__init__.py +8 -0
  39. gretapy-0.0.1/src/gretapy/_utils.py +196 -0
  40. gretapy-0.0.1/src/gretapy/config.py +2619 -0
  41. gretapy-0.0.1/src/gretapy/ds/__init__.py +3 -0
  42. gretapy-0.0.1/src/gretapy/ds/_db.py +147 -0
  43. gretapy-0.0.1/src/gretapy/ds/_dts.py +61 -0
  44. gretapy-0.0.1/src/gretapy/ds/_toy.py +563 -0
  45. gretapy-0.0.1/src/gretapy/mt/__init__.py +3 -0
  46. gretapy-0.0.1/src/gretapy/mt/_correlation.py +124 -0
  47. gretapy-0.0.1/src/gretapy/mt/_lit_grn.py +124 -0
  48. gretapy-0.0.1/src/gretapy/mt/_random.py +202 -0
  49. gretapy-0.0.1/src/gretapy/mt/_utils.py +5 -0
  50. gretapy-0.0.1/src/gretapy/pl/__init__.py +3 -0
  51. gretapy-0.0.1/src/gretapy/pl/_heatmap.py +91 -0
  52. gretapy-0.0.1/src/gretapy/pl/_links.py +372 -0
  53. gretapy-0.0.1/src/gretapy/pl/_ranking.py +392 -0
  54. gretapy-0.0.1/src/gretapy/pp/__init__.py +7 -0
  55. gretapy-0.0.1/src/gretapy/pp/_check.py +266 -0
  56. gretapy-0.0.1/src/gretapy/tl/__init__.py +7 -0
  57. gretapy-0.0.1/src/gretapy/tl/_eval.py +457 -0
  58. gretapy-0.0.1/src/gretapy/tl/_genomic.py +105 -0
  59. gretapy-0.0.1/src/gretapy/tl/_mechanistic.py +343 -0
  60. gretapy-0.0.1/src/gretapy/tl/_predictive.py +199 -0
  61. gretapy-0.0.1/src/gretapy/tl/_prior.py +112 -0
  62. gretapy-0.0.1/src/gretapy/tl/_stats.py +124 -0
  63. gretapy-0.0.1/src/gretapy/tl/_utils.py +22 -0
  64. gretapy-0.0.1/tests/conftest.py +260 -0
  65. gretapy-0.0.1/tests/test_basic.py +5 -0
  66. gretapy-0.0.1/tests/test_ds_db.py +290 -0
  67. gretapy-0.0.1/tests/test_ds_toy.py +189 -0
  68. gretapy-0.0.1/tests/test_mt.py +668 -0
  69. gretapy-0.0.1/tests/test_pl.py +846 -0
  70. gretapy-0.0.1/tests/test_pl_ranking.py +392 -0
  71. gretapy-0.0.1/tests/test_pp_check.py +398 -0
  72. gretapy-0.0.1/tests/test_tl_eval.py +721 -0
  73. gretapy-0.0.1/tests/test_tl_genomic.py +254 -0
  74. gretapy-0.0.1/tests/test_tl_mechanistic.py +571 -0
  75. gretapy-0.0.1/tests/test_tl_predictive.py +384 -0
  76. gretapy-0.0.1/tests/test_tl_prior.py +221 -0
  77. gretapy-0.0.1/tests/test_tl_stats.py +660 -0
  78. gretapy-0.0.1/tests/test_tl_utils.py +89 -0
  79. gretapy-0.0.1/tests/test_utils.py +149 -0
@@ -0,0 +1,17 @@
1
+ # Based on pydata/xarray
2
+ codecov:
3
+ require_ci_to_pass: no
4
+
5
+ coverage:
6
+ status:
7
+ project:
8
+ default:
9
+ # Require 1% coverage, i.e., always succeed
10
+ target: 1
11
+ patch: false
12
+ changes: false
13
+
14
+ comment:
15
+ layout: diff, flags, files
16
+ behavior: once
17
+ require_base: no
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 4
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [{*.{yml,yaml,toml},.cruft.json}]
12
+ indent_size = 2
13
+
14
+ [Makefile]
15
+ indent_style = tab
@@ -0,0 +1,93 @@
1
+ name: Bug report
2
+ description: Report something that is broken or incorrect
3
+ type: Bug
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ **Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
9
+ detailing how to provide the necessary information for us to reproduce your bug. In brief:
10
+ * Please provide exact steps how to reproduce the bug in a clean Python environment.
11
+ * In case it's not clear what's causing this bug, please provide the data or the data generation procedure.
12
+ * Replicate problems on public datasets or share data subsets when full sharing isn't possible.
13
+
14
+ - type: textarea
15
+ id: report
16
+ attributes:
17
+ label: Report
18
+ description: A clear and concise description of what the bug is.
19
+ validations:
20
+ required: true
21
+
22
+ - type: textarea
23
+ id: versions
24
+ attributes:
25
+ label: Versions
26
+ description: |
27
+ Which version of packages.
28
+
29
+ Please install `session-info2`, run the following command in a notebook,
30
+ click the “Copy as Markdown” button, then paste the results into the text box below.
31
+
32
+ ```python
33
+ In[1]: import session_info2; session_info2.session_info(dependencies=True)
34
+ ```
35
+
36
+ Alternatively, run this in a console:
37
+
38
+ ```python
39
+ >>> import session_info2; print(session_info2.session_info(dependencies=True)._repr_mimebundle_()["text/markdown"])
40
+ ```
41
+ render: python
42
+ placeholder: |
43
+ anndata 0.11.3
44
+ ---- ----
45
+ charset-normalizer 3.4.1
46
+ coverage 7.7.0
47
+ psutil 7.0.0
48
+ dask 2024.7.1
49
+ jaraco.context 5.3.0
50
+ numcodecs 0.15.1
51
+ jaraco.functools 4.0.1
52
+ Jinja2 3.1.6
53
+ sphinxcontrib-jsmath 1.0.1
54
+ sphinxcontrib-htmlhelp 2.1.0
55
+ toolz 1.0.0
56
+ session-info2 0.1.2
57
+ PyYAML 6.0.2
58
+ llvmlite 0.44.0
59
+ scipy 1.15.2
60
+ pandas 2.2.3
61
+ sphinxcontrib-devhelp 2.0.0
62
+ h5py 3.13.0
63
+ tblib 3.0.0
64
+ setuptools-scm 8.2.0
65
+ more-itertools 10.3.0
66
+ msgpack 1.1.0
67
+ sparse 0.15.5
68
+ wrapt 1.17.2
69
+ jaraco.collections 5.1.0
70
+ numba 0.61.0
71
+ pyarrow 19.0.1
72
+ pytz 2025.1
73
+ MarkupSafe 3.0.2
74
+ crc32c 2.7.1
75
+ sphinxcontrib-qthelp 2.0.0
76
+ sphinxcontrib-serializinghtml 2.0.0
77
+ zarr 2.18.4
78
+ asciitree 0.3.3
79
+ six 1.17.0
80
+ sphinxcontrib-applehelp 2.0.0
81
+ numpy 2.1.3
82
+ cloudpickle 3.1.1
83
+ sphinxcontrib-bibtex 2.6.3
84
+ natsort 8.4.0
85
+ jaraco.text 3.12.1
86
+ setuptools 76.1.0
87
+ Deprecated 1.2.18
88
+ packaging 24.2
89
+ python-dateutil 2.9.0.post0
90
+ ---- ----
91
+ Python 3.13.2 | packaged by conda-forge | (main, Feb 17 2025, 14:10:22) [GCC 13.3.0]
92
+ OS Linux-6.11.0-109019-tuxedo-x86_64-with-glibc2.39
93
+ Updated 2025-03-18 15:47
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Scverse Community Forum
4
+ url: https://discourse.scverse.org/
5
+ about: If you have questions about “How to do X”, please ask them here.
@@ -0,0 +1,11 @@
1
+ name: Feature request
2
+ description: Propose a new feature for gretapy
3
+ type: Enhancement
4
+ body:
5
+ - type: textarea
6
+ id: description
7
+ attributes:
8
+ label: Description of feature
9
+ description: Please describe your suggestion for a new feature. It might help to describe a problem or use case, plus any alternatives that you have considered.
10
+ validations:
11
+ required: true
@@ -0,0 +1,26 @@
1
+ name: Check Build
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ package:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v5
18
+ with:
19
+ filter: blob:none
20
+ fetch-depth: 0
21
+ - name: Install uv
22
+ uses: astral-sh/setup-uv@v7
23
+ - name: Build package
24
+ run: uv build
25
+ - name: Check package
26
+ run: uvx twine check --strict dist/*.whl
@@ -0,0 +1,27 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ # Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
8
+ jobs:
9
+ release:
10
+ name: Upload release to PyPI
11
+ runs-on: ubuntu-latest
12
+ environment:
13
+ name: pypi
14
+ url: https://pypi.org/p/gretapy
15
+ permissions:
16
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
17
+ steps:
18
+ - uses: actions/checkout@v5
19
+ with:
20
+ filter: blob:none
21
+ fetch-depth: 0
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v7
24
+ - name: Build package
25
+ run: uv build
26
+ - name: Publish package distributions to PyPI
27
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,97 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: "0 5 1,15 * *"
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ # Get the test environment from hatch as defined in pyproject.toml.
17
+ # This ensures that the pyproject.toml is the single point of truth for test definitions and the same tests are
18
+ # run locally and on continuous integration.
19
+ # Check [[tool.hatch.envs.hatch-test.matrix]] in pyproject.toml and https://hatch.pypa.io/latest/environment/ for
20
+ # more details.
21
+ get-environments:
22
+ runs-on: ubuntu-latest
23
+ outputs:
24
+ envs: ${{ steps.get-envs.outputs.envs }}
25
+ steps:
26
+ - uses: actions/checkout@v5
27
+ with:
28
+ filter: blob:none
29
+ fetch-depth: 0
30
+ - name: Install uv
31
+ uses: astral-sh/setup-uv@v7
32
+ - name: Get test environments
33
+ id: get-envs
34
+ run: |
35
+ ENVS_JSON=$(uvx hatch env show --json | jq -c 'to_entries
36
+ | map(
37
+ select(.key | startswith("hatch-test"))
38
+ | {
39
+ name: .key,
40
+ label: (if (.key | contains("pre")) then .key + " (PRE-RELEASE DEPENDENCIES)" else .key end),
41
+ python: .value.python
42
+ }
43
+ )')
44
+ echo "envs=${ENVS_JSON}" | tee $GITHUB_OUTPUT
45
+
46
+ # Run tests through hatch. Spawns a separate runner for each environment defined in the hatch matrix obtained above.
47
+ test:
48
+ needs: get-environments
49
+
50
+ strategy:
51
+ fail-fast: false
52
+ matrix:
53
+ os: [ubuntu-latest]
54
+ env: ${{ fromJSON(needs.get-environments.outputs.envs) }}
55
+
56
+ name: ${{ matrix.env.label }}
57
+ runs-on: ${{ matrix.os }}
58
+
59
+ steps:
60
+ - uses: actions/checkout@v5
61
+ with:
62
+ filter: blob:none
63
+ fetch-depth: 0
64
+ - name: Install uv
65
+ uses: astral-sh/setup-uv@v7
66
+ with:
67
+ python-version: ${{ matrix.env.python }}
68
+ - name: create hatch environment
69
+ run: uvx hatch env create ${{ matrix.env.name }}
70
+ - name: run tests using hatch
71
+ env:
72
+ MPLBACKEND: agg
73
+ PLATFORM: ${{ matrix.os }}
74
+ DISPLAY: :42
75
+ run: uvx hatch run ${{ matrix.env.name }}:run-cov -v --color=yes -n auto
76
+ - name: generate coverage report
77
+ run: |
78
+ # See https://coverage.readthedocs.io/en/latest/config.html#run-patch
79
+ test -f .coverage || uvx hatch run ${{ matrix.env.name }}:cov-combine
80
+ uvx hatch run ${{ matrix.env.name }}:cov-report # report visibly
81
+ uvx hatch run ${{ matrix.env.name }}:coverage xml # create report for upload
82
+ - name: Upload coverage
83
+ uses: codecov/codecov-action@v5
84
+
85
+ # Check that all tests defined above pass. This makes it easy to set a single "required" test in branch
86
+ # protection instead of having to update it frequently. See https://github.com/re-actors/alls-green#why.
87
+ check:
88
+ name: Tests pass in all hatch environments
89
+ if: always()
90
+ needs:
91
+ - get-environments
92
+ - test
93
+ runs-on: ubuntu-latest
94
+ steps:
95
+ - uses: re-actors/alls-green@release/v1
96
+ with:
97
+ jobs: ${{ toJSON(needs) }}
@@ -0,0 +1,21 @@
1
+ # Temp files
2
+ .DS_Store
3
+ *~
4
+ buck-out/
5
+
6
+ # Compiled files
7
+ .venv/
8
+ __pycache__/
9
+ .*cache/
10
+
11
+ # Distribution / packaging
12
+ /dist/
13
+
14
+ # Tests and coverage
15
+ /data/
16
+ /node_modules/
17
+ /.coverage*
18
+
19
+ # docs
20
+ /docs/generated/
21
+ /docs/_build/
@@ -0,0 +1,38 @@
1
+ fail_fast: false
2
+ default_language_version:
3
+ python: python3
4
+ default_stages:
5
+ - pre-commit
6
+ - pre-push
7
+ minimum_pre_commit_version: 2.16.0
8
+ repos:
9
+ - repo: https://github.com/biomejs/pre-commit
10
+ rev: v2.3.8
11
+ hooks:
12
+ - id: biome-format
13
+ exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually.
14
+ - repo: https://github.com/tox-dev/pyproject-fmt
15
+ rev: v2.11.1
16
+ hooks:
17
+ - id: pyproject-fmt
18
+ - repo: https://github.com/astral-sh/ruff-pre-commit
19
+ rev: v0.14.8
20
+ hooks:
21
+ - id: ruff-check
22
+ types_or: [python, pyi, jupyter]
23
+ args: [--fix, --exit-non-zero-on-fix]
24
+ - id: ruff-format
25
+ types_or: [python, pyi, jupyter]
26
+ - repo: https://github.com/pre-commit/pre-commit-hooks
27
+ rev: v6.0.0
28
+ hooks:
29
+ - id: detect-private-key
30
+ - id: check-ast
31
+ - id: end-of-file-fixer
32
+ - id: mixed-line-ending
33
+ args: [--fix=lf]
34
+ - id: trailing-whitespace
35
+ - id: check-case-conflict
36
+ # Check that there are no merge conflicts (could be generated by template sync)
37
+ - id: check-merge-conflict
38
+ args: [--assume-in-merge]
@@ -0,0 +1,16 @@
1
+ # https://docs.readthedocs.io/en/stable/config-file/v2.html
2
+ version: 2
3
+ build:
4
+ os: ubuntu-24.04
5
+ tools:
6
+ python: "3.13"
7
+ nodejs: latest
8
+ jobs:
9
+ create_environment:
10
+ - asdf plugin add uv
11
+ - asdf install uv latest
12
+ - asdf global uv latest
13
+ build:
14
+ html:
15
+ - uvx hatch run docs:build
16
+ - mv docs/_build $READTHEDOCS_OUTPUT
@@ -0,0 +1,18 @@
1
+ {
2
+ "recommendations": [
3
+ // GitHub integration
4
+ "github.vscode-github-actions",
5
+ "github.vscode-pull-request-github",
6
+ // Language support
7
+ "ms-python.python",
8
+ "ms-python.vscode-pylance",
9
+ "ms-toolsai.jupyter",
10
+ "tamasfe.even-better-toml",
11
+ // Dependency management
12
+ "ninoseki.vscode-mogami",
13
+ // Linting and formatting
14
+ "editorconfig.editorconfig",
15
+ "charliermarsh.ruff",
16
+ "biomejs.biome",
17
+ ],
18
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "name": "Python: Build Documentation",
9
+ "type": "debugpy",
10
+ "request": "launch",
11
+ "module": "sphinx",
12
+ "args": ["-M", "html", ".", "_build"],
13
+ "cwd": "${workspaceFolder}/docs",
14
+ "console": "internalConsole",
15
+ "justMyCode": false,
16
+ },
17
+ {
18
+ "name": "Python: Debug Test",
19
+ "type": "debugpy",
20
+ "request": "launch",
21
+ "program": "${file}",
22
+ "purpose": ["debug-test"],
23
+ "console": "internalConsole",
24
+ "justMyCode": false,
25
+ "env": {
26
+ "PYTEST_ADDOPTS": "--color=yes",
27
+ },
28
+ "presentation": {
29
+ "hidden": true,
30
+ },
31
+ },
32
+ ],
33
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "[python][json][jsonc]": {
3
+ "editor.formatOnSave": true,
4
+ },
5
+ "[python]": {
6
+ "editor.defaultFormatter": "charliermarsh.ruff",
7
+ "editor.codeActionsOnSave": {
8
+ "source.fixAll": "always",
9
+ "source.organizeImports": "always",
10
+ },
11
+ },
12
+ "[json][jsonc]": {
13
+ "editor.defaultFormatter": "biomejs.biome",
14
+ },
15
+ "python.analysis.typeCheckingMode": "basic",
16
+ "python.testing.pytestEnabled": true,
17
+ "python.testing.pytestArgs": ["-vv", "--color=yes"],
18
+ }
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog][],
6
+ and this project adheres to [Semantic Versioning][].
7
+
8
+ [keep a changelog]: https://keepachangelog.com/en/1.0.0/
9
+ [semantic versioning]: https://semver.org/spec/v2.0.0.html
10
+
11
+ ## [Unreleased]
12
+
13
+ ### Added
14
+
15
+ - Basic tool, preprocessing and plotting functions
gretapy-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025, Pau Badia i Mompel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
gretapy-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,139 @@
1
+ Metadata-Version: 2.4
2
+ Name: gretapy
3
+ Version: 0.0.1
4
+ Summary: Package to evaluate gene regulatory networks (GRNs).
5
+ Project-URL: Documentation, https://gretapy.readthedocs.io/
6
+ Project-URL: Homepage, https://github.com/PauBadiaM/gretapy
7
+ Project-URL: Source, https://github.com/PauBadiaM/gretapy
8
+ Author: Pau Badia i Mompel
9
+ Maintainer-email: Pau Badia i Mompel <paubim@stanford.edu>
10
+ License: MIT License
11
+
12
+ Copyright (c) 2025, Pau Badia i Mompel
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
31
+ License-File: LICENSE
32
+ Classifier: Programming Language :: Python :: 3 :: Only
33
+ Classifier: Programming Language :: Python :: 3.11
34
+ Classifier: Programming Language :: Python :: 3.12
35
+ Classifier: Programming Language :: Python :: 3.13
36
+ Classifier: Programming Language :: Python :: 3.14
37
+ Requires-Python: >=3.11
38
+ Requires-Dist: anndata
39
+ Requires-Dist: decoupler[full]>=2.1.4
40
+ Requires-Dist: llvmlite>=0.39
41
+ Requires-Dist: mudata
42
+ Requires-Dist: numba>=0.57
43
+ Requires-Dist: pyboolnet
44
+ Requires-Dist: pyranges
45
+ Requires-Dist: session-info2
46
+ Description-Content-Type: text/markdown
47
+
48
+ # gretapy - Evaluation and analysis of Gene Regulatory Networks (GRNs)
49
+ <img src="https://raw.githubusercontent.com/saezlab/gretapy/refs/heads/main/docs/_static/images/logo.png" align="right" width="120" class="no-scaled-link" alt='GRETA logo' />
50
+
51
+ [![Tests][badge-tests]][tests]
52
+ [![Documentation][badge-docs]][documentation]
53
+
54
+ [![Issues][badge-issues]][issue tracker]
55
+ [![Coverage][badge-coverage]][codecoverage]
56
+ [![Stars][badge-stars]](https://github.com/scverse/anndata/stargazers)
57
+
58
+ [![PyPI][badge-pypi]][pypi]
59
+ [![Downloads month][badge-mdown]][down]
60
+ [![Downloads all][badge-adown]][down]
61
+
62
+ [![Conda version][badge-condav]][conda]
63
+ [![Conda downloads][badge-condad]][conda]
64
+
65
+ [badge-tests]: https://img.shields.io/github/actions/workflow/status/saezlab/gretapy/test.yaml?branch=main
66
+ [badge-docs]: https://img.shields.io/readthedocs/gretapy
67
+ [badge-condav]: https://img.shields.io/conda/vn/conda-forge/gretapy.svg
68
+ [badge-condad]: https://img.shields.io/conda/dn/conda-forge/gretapy.svg
69
+ [badge-issues]: https://img.shields.io/github/issues/saezlab/gretapy
70
+ [badge-coverage]: https://codecov.io/gh/saezlab/gretapy/branch/main/graph/badge.svg
71
+ [badge-pypi]: https://img.shields.io/pypi/v/gretapy.svg
72
+ [badge-mdown]: https://static.pepy.tech/badge/gretapy/month
73
+ [badge-adown]: https://static.pepy.tech/badge/gretapy
74
+ [badge-stars]: https://img.shields.io/github/stars/saezlab/gretapy?style=flat&logo=github&color=yellow
75
+
76
+ `gretapy` is a comprehensive framework for benchmarking and evaluating gene regulatory networks (GRNs) inferred from single-cell multiome (RNA+ATAC) data. It provides a systematic evaluation across four complementary dimensions: prior knowledge validation (TF markers, known TF-TF interactions, reference networks), genomic annotations (TF binding sites, cis-regulatory elements, chromatin-gene links), predictive performance (pathway enrichment, expression correlation), and mechanistic validation (perturbation forecasting, Boolean network simulations). The package includes built-in GRN inference methods, curated benchmark datasets, and visualization tools to facilitate rigorous comparison of network inference approaches.
77
+
78
+ <img src="https://raw.githubusercontent.com/saezlab/gretapy/refs/heads/main/docs/_static/images/gabstract.png" align="center" width="100%" alt='GRETA graphical abstract' />
79
+
80
+ ## Getting started
81
+
82
+ Please refer to the [documentation][],
83
+ in particular, the [API documentation][].
84
+
85
+ ## Installation
86
+
87
+ You need to have Python 3.11 or newer installed on your system.
88
+ If you don't have Python installed, we recommend installing [uv][].
89
+
90
+ There are several alternative options to install gretapy:
91
+
92
+ 1. Install the latest stable release from [PyPI][pypi] with minimal dependancies:
93
+
94
+ ```bash
95
+ pip install gretapy
96
+ ```
97
+
98
+ 2. Install the latest stable full release from [PyPI][pypi] with extra dependancies:
99
+
100
+ ```bash
101
+ pip install gretapy[full]
102
+ ```
103
+
104
+ 3. Install the latest stable version from [conda-forge][conda] using mamba or conda:
105
+
106
+ ```bash
107
+ mamba create -n=greta conda-forge::gretapy
108
+ ```
109
+
110
+ 4. Install the latest development version:
111
+
112
+ ```bash
113
+ pip install git+https://github.com/saezlab/gretapy.git@main
114
+ ```
115
+
116
+ ## Release notes
117
+
118
+ See the [changelog][].
119
+
120
+ ## Contact
121
+
122
+ For questions and help requests, you can reach out in the [scverse discourse][].
123
+ If you found a bug, please use the [issue tracker][].
124
+
125
+ ## Citation
126
+
127
+ > Badia-i-Mompel P., Casals-Franch R., Wessels L., Müller-Dott S., Trimbour R., Yang Y., Ramirez Flores R.O., Saez-Rodriguez J. 2024. Comparison and evaluation of methods to infer gene regulatory networks from multimodal single-cell data. bioRxiv. https://doi.org/10.1101/2024.12.20.629764
128
+
129
+ [uv]: https://github.com/astral-sh/uv
130
+ [scverse discourse]: https://discourse.scverse.org/
131
+ [issue tracker]: https://github.com/saezlab/gretapy/issues
132
+ [tests]: https://github.com/saezlab/gretapy/actions/workflows/test.yaml
133
+ [documentation]: https://gretapy.readthedocs.io
134
+ [changelog]: https://gretapy.readthedocs.io/en/latest/changelog.html
135
+ [api documentation]: https://gretapy.readthedocs.io/en/latest/api.html
136
+ [pypi]: https://pypi.org/project/gretapy
137
+ [down]: https://pepy.tech/project/gretapy
138
+ [conda]: https://anaconda.org/conda-forge/gretapy
139
+ [codecoverage]: https://codecov.io/gh/saezlab/gretapy