protpen 1.0.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 (72) hide show
  1. protpen-1.0.0/.github/workflows/publish.yml +51 -0
  2. protpen-1.0.0/.github/workflows/tests.yml +31 -0
  3. protpen-1.0.0/.gitignore +23 -0
  4. protpen-1.0.0/CONTRIBUTING.md +65 -0
  5. protpen-1.0.0/LICENSE +674 -0
  6. protpen-1.0.0/PKG-INFO +863 -0
  7. protpen-1.0.0/README.md +168 -0
  8. protpen-1.0.0/original_scripts/download_AF_from_uniprot.py +151 -0
  9. protpen-1.0.0/original_scripts/enrich_tsvs.py +289 -0
  10. protpen-1.0.0/original_scripts/filter_sort_consolidate_foldseek.py +83 -0
  11. protpen-1.0.0/original_scripts/foldseek_command_line_search.py +55 -0
  12. protpen-1.0.0/original_scripts/merge_tsvs.py +94 -0
  13. protpen-1.0.0/original_scripts/run_eggnog_mapper.py +58 -0
  14. protpen-1.0.0/protpen/cli_consolidate_foldseek.py +33 -0
  15. protpen-1.0.0/protpen/cli_download.py +33 -0
  16. protpen-1.0.0/protpen/cli_eggnog.py +42 -0
  17. protpen-1.0.0/protpen/cli_enrich.py +108 -0
  18. protpen-1.0.0/protpen/cli_foldseek.py +42 -0
  19. protpen-1.0.0/protpen/cli_merge.py +32 -0
  20. protpen-1.0.0/protpen/downloader.py +201 -0
  21. protpen-1.0.0/protpen/eggnog.py +51 -0
  22. protpen-1.0.0/protpen/enrich_utils.py +259 -0
  23. protpen-1.0.0/protpen/foldseek.py +90 -0
  24. protpen-1.0.0/protpen/foldseek_utils.py +65 -0
  25. protpen-1.0.0/protpen/merge_utils.py +85 -0
  26. protpen-1.0.0/pyproject.toml +41 -0
  27. protpen-1.0.0/sample_search/README_sample_search.md +92 -0
  28. protpen-1.0.0/sample_search/consolidated_foldseek_results.tsv +4 -0
  29. protpen-1.0.0/sample_search/eggnog_output/search_run.emapper.annotations +12 -0
  30. protpen-1.0.0/sample_search/eggnog_output/search_run.emapper.annotations.xlsx +0 -0
  31. protpen-1.0.0/sample_search/eggnog_output/search_run.emapper.hits +4 -0
  32. protpen-1.0.0/sample_search/eggnog_output/search_run.emapper.seed_orthologs +16 -0
  33. protpen-1.0.0/sample_search/eggnog_results.tsv +5 -0
  34. protpen-1.0.0/sample_search/enriched_foldseek_results.tsv +4 -0
  35. protpen-1.0.0/sample_search/merged_annotations.tsv +4 -0
  36. protpen-1.0.0/sample_search/run_consolidate.sh +47 -0
  37. protpen-1.0.0/sample_search/run_download_alphafold.sh +52 -0
  38. protpen-1.0.0/sample_search/run_eggnog_mapper.sh +57 -0
  39. protpen-1.0.0/sample_search/run_enrich.sh +42 -0
  40. protpen-1.0.0/sample_search/run_foldseek.sh +49 -0
  41. protpen-1.0.0/sample_search/run_merge.sh +44 -0
  42. protpen-1.0.0/sample_search/sample_foldseek_output/Q9HW80.tsv +97 -0
  43. protpen-1.0.0/sample_search/sample_foldseek_output/Q9HZG6.tsv +1 -0
  44. protpen-1.0.0/sample_search/sample_foldseek_output/Q9I368.tsv +40 -0
  45. protpen-1.0.0/sample_search/sample_foldseek_output/Q9I786.tsv +476 -0
  46. protpen-1.0.0/sample_search/sample_pdb/Q9HW80.json +464 -0
  47. protpen-1.0.0/sample_search/sample_pdb/Q9HW80.pdb +3453 -0
  48. protpen-1.0.0/sample_search/sample_pdb/Q9HZG6.json +427 -0
  49. protpen-1.0.0/sample_search/sample_pdb/Q9HZG6.pdb +886 -0
  50. protpen-1.0.0/sample_search/sample_pdb/Q9I368.json +470 -0
  51. protpen-1.0.0/sample_search/sample_pdb/Q9I368.pdb +1337 -0
  52. protpen-1.0.0/sample_search/sample_pdb/Q9I786.json +482 -0
  53. protpen-1.0.0/sample_search/sample_pdb/Q9I786.pdb +964 -0
  54. protpen-1.0.0/sample_search/sample_proteins.fasta +19 -0
  55. protpen-1.0.0/sample_search/sample_run_pipeline.sh +128 -0
  56. protpen-1.0.0/sample_search/uniprot_json_enrich/I0AIT9.json +2139 -0
  57. protpen-1.0.0/sample_search/uniprot_json_enrich/K7N5L8.json +539 -0
  58. protpen-1.0.0/sample_search/uniprot_json_enrich/O58247.json +2709 -0
  59. protpen-1.0.0/sample_search/uniprot_json_enrich/P72350.json +1112 -0
  60. protpen-1.0.0/sample_search/uniprot_json_enrich/Q1D303.json +498 -0
  61. protpen-1.0.0/sample_search/uniprot_json_enrich/Q1D304.json +589 -0
  62. protpen-1.0.0/sample_search/uniprot_json_enrich/Q1D305.json +512 -0
  63. protpen-1.0.0/sample_search/uniprot_json_enrich/Q8U3U2.json +812 -0
  64. protpen-1.0.0/sample_search/uniprot_json_enrich/Q9KN57.json +804 -0
  65. protpen-1.0.0/sample_search/uniprot_json_enrich/Q9KN58.json +646 -0
  66. protpen-1.0.0/sample_search/uniprot_json_enrich/W0J1H8.json +391 -0
  67. protpen-1.0.0/tests/test_downloader.py +135 -0
  68. protpen-1.0.0/tests/test_eggnog.py +43 -0
  69. protpen-1.0.0/tests/test_enrich_utils.py +100 -0
  70. protpen-1.0.0/tests/test_foldseek.py +33 -0
  71. protpen-1.0.0/tests/test_foldseek_utils.py +68 -0
  72. protpen-1.0.0/tests/test_merge_utils.py +138 -0
@@ -0,0 +1,51 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Check out repository
14
+ uses: actions/checkout@v4
15
+ with:
16
+ # hatch-vcs needs the full history and tags to derive the
17
+ # version from the pushed tag.
18
+ fetch-depth: 0
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.10"
24
+
25
+ - name: Install build tool
26
+ run: python -m pip install --upgrade pip build
27
+
28
+ - name: Build sdist and wheel
29
+ run: python -m build
30
+
31
+ - name: Upload build artifacts
32
+ uses: actions/upload-artifact@v4
33
+ with:
34
+ name: dist
35
+ path: dist/
36
+
37
+ publish:
38
+ needs: build
39
+ runs-on: ubuntu-latest
40
+
41
+ steps:
42
+ - name: Download build artifacts
43
+ uses: actions/download-artifact@v4
44
+ with:
45
+ name: dist
46
+ path: dist/
47
+
48
+ - name: Publish to PyPI
49
+ uses: pypa/gh-action-pypi-publish@release/v1
50
+ with:
51
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,31 @@
1
+ name: Tests
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ test:
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - name: Check out repository
12
+ uses: actions/checkout@v4
13
+
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.10"
18
+
19
+ - name: Install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install -e ".[test]"
23
+
24
+ - name: Check code style (black)
25
+ run: black --check protpen/ tests/
26
+
27
+ - name: Run tests
28
+ # test_eggnog.py and test_foldseek.py are excluded because they
29
+ # require EggNOG-mapper and Foldseek to be installed, which this
30
+ # environment doesn't provide.
31
+ run: pytest tests/ --ignore=tests/test_eggnog.py --ignore=tests/test_foldseek.py
@@ -0,0 +1,23 @@
1
+ # Byte-compiled / cache
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+
6
+ # Packaging / build artifacts
7
+ *.egg-info/
8
+ *.egg
9
+ build/
10
+ dist/
11
+
12
+ # Virtual environments
13
+ .venv/
14
+ venv/
15
+ env/
16
+
17
+ # Logs
18
+ logs/
19
+ *.log
20
+
21
+ # OS cruft
22
+ .DS_Store
23
+ Thumbs.db
@@ -0,0 +1,65 @@
1
+ # Contributing to ProtPen
2
+
3
+ Thanks for your interest in ProtPen! This project is a community effort, and contributions of any size — bug fixes, documentation tweaks, new tools, or entirely new pipeline modules — are very welcome, whether you're a first-time contributor or a regular.
4
+
5
+ ## Ways to Contribute
6
+
7
+ - **Report bugs or request features**: please use the [Issues](../../issues) tab. Include enough detail (input data, command run, error message, environment) for others to reproduce the problem.
8
+ - **Improve documentation**: fixes to the README, this file, or inline code comments are always appreciated.
9
+ - **Add a new tool or module**: ProtPen is designed as a [modular pipeline](README.md#modular-design-and-extensibility), and we'd love to see it grow. New annotation tools, structure search methods, or enrichment steps are a great fit. For more information, see [Adding a New Module](#adding-a-new-module) below.
10
+ - **Fix bugs or improve existing code**: pull requests for open issues are very welcome.
11
+
12
+ No contribution is too small — even a typo fix is appreciated.
13
+
14
+ ## Adding a New Module
15
+
16
+ Because each pipeline step communicates only through file-based inputs/outputs (mainly TSV and FASTA), adding a new tool doesn't require touching the rest of the codebase. A new module should generally:
17
+
18
+ - Live in its own file under `protpen/` (e.g. `my_tool.py`), with a corresponding `cli_my_tool.py` wrapper exposing a command-line interface.
19
+ - Accept and produce standardized file formats consistent with the rest of the pipeline.
20
+ - Include unit tests under `tests/`.
21
+ - Be documented in the README's [Scripts](README.md#scripts) table and [Pipeline Workflow](README.md#pipeline-workflow) section.
22
+
23
+ If you're not sure whether an idea fits, feel free to open an issue to discuss it first.
24
+
25
+ ## Tests and Coding Style
26
+
27
+ Install the test/dev dependencies first:
28
+
29
+ ```bash
30
+ pip install -e ".[test]"
31
+ ```
32
+
33
+ **Tests** are written with `pytest` and live under `tests/`. Run the suite with:
34
+
35
+ ```bash
36
+ pytest tests/ --ignore=tests/test_eggnog.py --ignore=tests/test_foldseek.py
37
+ ```
38
+
39
+ `test_eggnog.py` and `test_foldseek.py` are excluded because they require EggNOG-mapper and Foldseek to be installed locally; CI runs the same exclusion (see [`.github/workflows/tests.yml`](.github/workflows/tests.yml)). If your change touches `eggnog.py` or `foldseek.py`, please also run those two files' tests locally if you have the tools installed.
40
+
41
+ **Coding style** is enforced with [`black`](https://black.readthedocs.io/). Format your changes before opening a PR:
42
+
43
+ ```bash
44
+ black protpen/ tests/
45
+ ```
46
+
47
+ CI checks formatting with `black --check protpen/ tests/` and will fail if any file isn't formatted — make sure to run `black` locally first.
48
+
49
+ ## Pull Request Guidelines
50
+
51
+ - Keep pull requests focused on a single change where possible to make review easier.
52
+ - Add or update tests for any behavior you change, and make sure tests pass and code is formatted (see [Tests and Coding Style](#tests-and-coding-style) above) — CI checks both on every PR.
53
+ - Update relevant documentation (README, docstrings, SLURM script comments) alongside code changes.
54
+ - Be ready to discuss and iterate on feedback. Code review is a normal and friendly part of the process.
55
+
56
+ ## Code of Conduct
57
+
58
+ Be respectful and constructive. We want ProtPen to be a welcoming project for contributors of all backgrounds and experience levels.
59
+
60
+ ## Contributors
61
+
62
+ - Diya Mathai
63
+ - Stefan Schulze
64
+
65
+ Want to see your name here? Open a pull request!