cool-seq-tool 0.8.0__tar.gz → 0.9.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 (64) hide show
  1. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/PKG-INFO +15 -15
  2. cool_seq_tool-0.9.0/README.md +59 -0
  3. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/contributing.rst +1 -1
  4. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/index.rst +4 -4
  5. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/install.rst +1 -1
  6. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/transcript_selection.rst +4 -3
  7. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/usage.rst +1 -1
  8. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/pyproject.toml +2 -2
  9. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/mappers/exon_genomic_coords.py +21 -2
  10. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool.egg-info/PKG-INFO +15 -15
  11. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool.egg-info/SOURCES.txt +0 -1
  12. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool.egg-info/requires.txt +2 -2
  13. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/tests/conftest.py +15 -0
  14. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/tests/mappers/test_exon_genomic_coords.py +39 -1
  15. cool_seq_tool-0.8.0/.github/workflows/close_issue.yml +0 -18
  16. cool_seq_tool-0.8.0/README.md +0 -59
  17. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/.coveragerc +0 -0
  18. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/.github/ISSUE_TEMPLATE/bug-report.yaml +0 -0
  19. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/.github/ISSUE_TEMPLATE/feature-request.yaml +0 -0
  20. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/.github/workflows/checks.yaml +0 -0
  21. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/.github/workflows/pr-priority-label.yaml +0 -0
  22. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/.github/workflows/release.yml +0 -0
  23. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/.github/workflows/stale.yaml +0 -0
  24. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/.gitignore +0 -0
  25. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/.pre-commit-config.yaml +0 -0
  26. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/.readthedocs.yaml +0 -0
  27. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/CITATION.cff +0 -0
  28. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/LICENSE +0 -0
  29. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/Makefile +0 -0
  30. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/make.bat +0 -0
  31. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/_static/img/biomart.png +0 -0
  32. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/_templates/module_summary.rst +0 -0
  33. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/changelog.rst +0 -0
  34. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/conf.py +0 -0
  35. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/license.rst +0 -0
  36. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/docs/source/reference/index.rst +0 -0
  37. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/setup.cfg +0 -0
  38. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/__init__.py +0 -0
  39. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/app.py +0 -0
  40. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/handlers/__init__.py +0 -0
  41. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/handlers/seqrepo_access.py +0 -0
  42. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/mappers/__init__.py +0 -0
  43. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/mappers/alignment.py +0 -0
  44. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/mappers/liftover.py +0 -0
  45. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/mappers/mane_transcript.py +0 -0
  46. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/resources/__init__.py +0 -0
  47. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/resources/data_files.py +0 -0
  48. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/resources/status.py +0 -0
  49. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/resources/transcript_mapping.tsv +0 -0
  50. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/schemas.py +0 -0
  51. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/sources/__init__.py +0 -0
  52. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/sources/mane_transcript_mappings.py +0 -0
  53. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/sources/transcript_mappings.py +0 -0
  54. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/sources/uta_database.py +0 -0
  55. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool/utils.py +0 -0
  56. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool.egg-info/dependency_links.txt +0 -0
  57. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/src/cool_seq_tool.egg-info/top_level.txt +0 -0
  58. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/tests/handlers/test_seqrepo_access.py +0 -0
  59. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/tests/mappers/test_alignment.py +0 -0
  60. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/tests/mappers/test_liftover.py +0 -0
  61. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/tests/mappers/test_mane_transcript.py +0 -0
  62. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/tests/sources/test_mane_transcript_mappings.py +0 -0
  63. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/tests/sources/test_uta_database.py +0 -0
  64. {cool_seq_tool-0.8.0 → cool_seq_tool-0.9.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cool_seq_tool
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: Common Operation on Lots of Sequences Tool
5
5
  Author: Kori Kuzma, James Stevenson, Katie Stahl, Alex Wagner
6
6
  License: MIT License
@@ -53,7 +53,7 @@ Requires-Dist: hgvs
53
53
  Requires-Dist: biocommons.seqrepo
54
54
  Requires-Dist: pydantic==2.*
55
55
  Requires-Dist: ga4gh.vrs~=2.0.0a10
56
- Requires-Dist: wags-tails~=0.1.3
56
+ Requires-Dist: wags-tails~=0.2.2
57
57
  Requires-Dist: bioutils
58
58
  Provides-Extra: dev
59
59
  Requires-Dist: pre-commit>=3.7.1; extra == "dev"
@@ -61,11 +61,11 @@ Requires-Dist: ipython; extra == "dev"
61
61
  Requires-Dist: ipykernel; extra == "dev"
62
62
  Requires-Dist: psycopg2-binary; extra == "dev"
63
63
  Requires-Dist: ruff==0.5.0; extra == "dev"
64
- Provides-Extra: test
65
- Requires-Dist: pytest; extra == "test"
66
- Requires-Dist: pytest-cov; extra == "test"
67
- Requires-Dist: pytest-asyncio==0.18.3; extra == "test"
68
- Requires-Dist: mock; extra == "test"
64
+ Provides-Extra: tests
65
+ Requires-Dist: pytest; extra == "tests"
66
+ Requires-Dist: pytest-cov; extra == "tests"
67
+ Requires-Dist: pytest-asyncio==0.18.3; extra == "tests"
68
+ Requires-Dist: mock; extra == "tests"
69
69
  Provides-Extra: docs
70
70
  Requires-Dist: sphinx==6.1.3; extra == "docs"
71
71
  Requires-Dist: sphinx-autodoc-typehints==1.22.0; extra == "docs"
@@ -76,10 +76,10 @@ Requires-Dist: furo==2023.3.27; extra == "docs"
76
76
  Requires-Dist: sphinx-github-changelog==1.2.1; extra == "docs"
77
77
 
78
78
  <h1 align="center">
79
- CoolSeqTool
79
+ Cool-Seq-Tool
80
80
  </h1>
81
81
 
82
- [![image](https://img.shields.io/pypi/v/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![image](https://img.shields.io/pypi/l/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![image](https://img.shields.io/pypi/pyversions/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![Actions status](https://github.com/genomicmedlab/cool-seq-tool/actions/workflows/checks.yaml/badge.svg)](https://github.com/genomicmedlab/cool-seq-tool/actions/checks.yaml)
82
+ [![image](https://img.shields.io/pypi/v/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14007783.svg)](https://doi.org/10.5281/zenodo.14007783) [![image](https://img.shields.io/pypi/l/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![image](https://img.shields.io/pypi/pyversions/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![Actions status](https://github.com/genomicmedlab/cool-seq-tool/actions/workflows/checks.yaml/badge.svg)](https://github.com/genomicmedlab/cool-seq-tool/actions/checks.yaml)
83
83
 
84
84
  ---
85
85
 
@@ -90,18 +90,18 @@ CoolSeqTool
90
90
  ## Overview
91
91
 
92
92
  <!-- description -->
93
- The **CoolSeqTool** provides:
93
+ The Common Operations On Lots-Of Sequences Tool, **Cool-Seq-Tool**, provides:
94
94
 
95
- - A Pythonic API on top of sequence data of interest to tertiary analysis tools, including mappings between gene names and transcripts, [MANE transcript](https://www.ncbi.nlm.nih.gov/refseq/MANE/) descriptions, and the [Universal Transcript Archive](https://github.com/biocommons/uta)
96
- - Augmented access to the [SeqRepo](https://github.com/biocommons/biocommons.seqrepo) database, including multiple additional methods and tools
97
- - Mapping tools that combine the above to support translation between references sequences, annotation layers, and MANE transcripts
95
+ - A Pythonic API on top of sequence data of interest to tertiary analysis tools, including mappings between gene names and transcripts, [MANE transcript](https://www.ncbi.nlm.nih.gov/refseq/MANE/) descriptions, and transcript alignment data from the [Universal Transcript Archive](https://github.com/biocommons/uta)
96
+ - Augmented access to the [SeqRepo](https://github.com/biocommons/biocommons.seqrepo) database, including multiple additional methods and tools
97
+ - Mapping tools, including a transcript selection algorithm for selecting a representative transcript defined [here](https://coolseqtool.readthedocs.io/stable/transcript_selection.html), that combine the above to support translation between references sequences, annotation layers, and transcripts
98
98
  <!-- /description -->
99
99
 
100
100
  ---
101
101
 
102
102
  ## Install
103
103
 
104
- CoolSeqTool is available on [PyPI](https://pypi.org/project/cool-seq-tool)
104
+ Cool-Seq-Tool is available on [PyPI](https://pypi.org/project/cool-seq-tool)
105
105
 
106
106
  ```shell
107
107
  python3 -m pip install cool-seq-tool
@@ -113,7 +113,7 @@ See the [installation instructions](https://coolseqtool.readthedocs.io/stable/in
113
113
 
114
114
  ## Usage
115
115
 
116
- All CoolSeqTool resources can be initialized by way of a top-level class instance:
116
+ All Cool-Seq-Tool resources can be initialized by way of a top-level class instance:
117
117
 
118
118
  ```pycon
119
119
  >>> from cool_seq_tool import CoolSeqTool
@@ -0,0 +1,59 @@
1
+ <h1 align="center">
2
+ Cool-Seq-Tool
3
+ </h1>
4
+
5
+ [![image](https://img.shields.io/pypi/v/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14007783.svg)](https://doi.org/10.5281/zenodo.14007783) [![image](https://img.shields.io/pypi/l/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![image](https://img.shields.io/pypi/pyversions/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![Actions status](https://github.com/genomicmedlab/cool-seq-tool/actions/workflows/checks.yaml/badge.svg)](https://github.com/genomicmedlab/cool-seq-tool/actions/checks.yaml)
6
+
7
+ ---
8
+
9
+ **[Documentation](https://coolseqtool.readthedocs.io/stable/)** · [Installation](https://coolseqtool.readthedocs.io/stable/install.html) · [Usage](https://coolseqtool.readthedocs.io/stable/usage.html) · [API reference](https://coolseqtool.readthedocs.io/stable/reference/index.html)
10
+
11
+ ---
12
+
13
+ ## Overview
14
+
15
+ <!-- description -->
16
+ The Common Operations On Lots-Of Sequences Tool, **Cool-Seq-Tool**, provides:
17
+
18
+ - A Pythonic API on top of sequence data of interest to tertiary analysis tools, including mappings between gene names and transcripts, [MANE transcript](https://www.ncbi.nlm.nih.gov/refseq/MANE/) descriptions, and transcript alignment data from the [Universal Transcript Archive](https://github.com/biocommons/uta)
19
+ - Augmented access to the [SeqRepo](https://github.com/biocommons/biocommons.seqrepo) database, including multiple additional methods and tools
20
+ - Mapping tools, including a transcript selection algorithm for selecting a representative transcript defined [here](https://coolseqtool.readthedocs.io/stable/transcript_selection.html), that combine the above to support translation between references sequences, annotation layers, and transcripts
21
+ <!-- /description -->
22
+
23
+ ---
24
+
25
+ ## Install
26
+
27
+ Cool-Seq-Tool is available on [PyPI](https://pypi.org/project/cool-seq-tool)
28
+
29
+ ```shell
30
+ python3 -m pip install cool-seq-tool
31
+ ```
32
+
33
+ See the [installation instructions](https://coolseqtool.readthedocs.io/stable/install.html) in the documentation for a description of dependency setup requirements.
34
+
35
+ ---
36
+
37
+ ## Usage
38
+
39
+ All Cool-Seq-Tool resources can be initialized by way of a top-level class instance:
40
+
41
+ ```pycon
42
+ >>> from cool_seq_tool import CoolSeqTool
43
+ >>> from cool_seq_tool.schemas import AnnotationLayer, CoordinateType
44
+ >>> cst = CoolSeqTool()
45
+ >>> result = await cst.mane_transcript.get_mane_transcript(
46
+ ... "NP_004324.2",
47
+ ... 599,
48
+ ... AnnotationLayer.PROTEIN,
49
+ ... coordinate_type=CoordinateType.INTER_RESIDUE,
50
+ ... )
51
+ >>> result.gene, result.refseq, result.status
52
+ ('EGFR', 'NM_005228.5', <TranscriptPriority.MANE_SELECT: 'mane_select'>)
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Feedback and contributing
58
+
59
+ We welcome bug reports, feature requests, and code contributions from users and interested collaborators. The [documentation](https://coolseqtool.readthedocs.io/stable/contributing.html) contains guidance for submitting feedback and contributing new code.
@@ -17,7 +17,7 @@ Create a virtual environment and install :ref:`all dependency groups<dependency-
17
17
 
18
18
  python3 -m venv venv
19
19
  source venv/bin/activate
20
- python3 -m pip install -e ".[dev,test,docs]"
20
+ python3 -m pip install -e ".[dev,tests,docs]"
21
21
 
22
22
  We use `pre-commit <https://pre-commit.com/#usage>`_ to run conformance tests before commits. This provides checks for:
23
23
 
@@ -16,15 +16,15 @@ Cool-Seq-Tool |version|
16
16
  :alt: tests status
17
17
  :target: https://github.com/genomicmedlab/cool-seq-tool/actions/workflows/checks.yaml
18
18
 
19
- The **CoolSeqTool** provides:
19
+ The Common Operations On Lots-Of Sequences Tool, **Cool-Seq-Tool**, provides:
20
20
 
21
- * A Pythonic API on top of sequence data of interest to tertiary analysis tools, including mappings between gene names and transcripts, `MANE transcript <https://www.ncbi.nlm.nih.gov/refseq/MANE/>`_ descriptions, and the `Universal Transcript Archive <https://github.com/biocommons/uta>`_
21
+ * A Pythonic API on top of sequence data of interest to tertiary analysis tools, including mappings between gene names and transcripts, `MANE transcript <https://www.ncbi.nlm.nih.gov/refseq/MANE/>`_ descriptions, and transcript alignment data from the `Universal Transcript Archive <https://github.com/biocommons/uta>`_
22
22
  * Augmented access to the `SeqRepo <https://github.com/biocommons/biocommons.seqrepo>`_ database, including multiple additional methods and tools
23
- * Mapping tools that combine the above to support translation between various references sequences and annotation layers, and to MANE-designated transcripts
23
+ * Mapping tools, including a transcript selection algorithm for selecting a representative transcript defined :ref:`here <transcript_selection_policy>`, that combine the above to support translation between various references sequences and annotation layers, and transcripts
24
24
 
25
25
  See the :ref:`Installation <installation>` and :ref:`Usage <usage>` pages for information on getting started. Individual classes and methods are documented within the :ref:`API reference <api_reference>`.
26
26
 
27
- CoolSeqTool was created to support the `Knowledgebase Integration Project <https://cancervariants.org/projects/integration/>`_ of the `Variant Interpretation for Cancer Consortium (VICC) <https://cancervariants.org/>`_. It is developed primarily by the `Wagner Lab <https://www.nationwidechildrens.org/specialties/institute-for-genomic-medicine/research-labs/wagner-lab>`_. Full source code is available on `GitHub <https://github.com/genomicmedlab/cool-seq-tool>`_.
27
+ Cool-Seq-Tool was created to support the `Knowledgebase Integration Project <https://cancervariants.org/projects/integration/>`_ of the `Variant Interpretation for Cancer Consortium (VICC) <https://cancervariants.org/>`_. It is developed primarily by the `Wagner Lab <https://www.nationwidechildrens.org/specialties/institute-for-genomic-medicine/research-labs/wagner-lab>`_. Full source code is available on `GitHub <https://github.com/genomicmedlab/cool-seq-tool>`_.
28
28
 
29
29
  .. toctree::
30
30
  :hidden:
@@ -24,7 +24,7 @@ Install Cool-Seq-Tool from `PyPI <https://pypi.org/project/cool-seq-tool/>`_:
24
24
  Cool-Seq-Tool provides extra dependency groups for development and testing purposes. Most users won't need to install them.
25
25
 
26
26
  * ``dev`` includes packages for linting and performing other kinds of quality checks
27
- * ``test`` includes packages for running tests
27
+ * ``tests`` includes packages for running tests
28
28
  * ``docs`` includes packages for writing and building documentation
29
29
 
30
30
  Set up UTA
@@ -28,8 +28,9 @@ All compatible transcripts are evaluated and ordered against the below criteria.
28
28
  #. Transcript is annotated as a `MANE Select` transcript
29
29
  #. Transcript is annotated as a `MANE Plus Clinical` transcript
30
30
  #. Transcript is the longest-compatible remaining transcript
31
- #. Transcript is the first-published (lowest-numbered RefSeq/Ensembl accession) remaining transcript
32
31
 
33
- .. note::
32
+ #. If there is a tie, choose the first-published (lowest-numbered RefSeq/Ensembl accession) transcript
34
33
 
35
- We always prefer the most recent version of a transcript associated with an assembly.
34
+ .. note::
35
+
36
+ We always prefer the most recent version of a transcript associated with an assembly.
@@ -30,7 +30,7 @@ Descriptions and examples of functions can be found in the :ref:`API Reference <
30
30
 
31
31
  .. note::
32
32
 
33
- Many component classes in CoolSeqTool, including :py:class:`UtaDatabase <cool_seq_tool.sources.uta_database.UtaDatabase>`, :py:class:`ExonGenomicCoordsMapper <cool_seq_tool.mappers.exon_genomic_coords.ExonGenomicCoordsMapper>`, and :py:class:`ManeTranscript <cool_seq_tool.mappers.mane_transcript>`, define public methods as ``async``. This means that, when used inside another function, they must be called with ``await``:
33
+ Many component classes in Cool-Seq-Tool, including :py:class:`UtaDatabase <cool_seq_tool.sources.uta_database.UtaDatabase>`, :py:class:`ExonGenomicCoordsMapper <cool_seq_tool.mappers.exon_genomic_coords.ExonGenomicCoordsMapper>`, and :py:class:`ManeTranscript <cool_seq_tool.mappers.mane_transcript>`, define public methods as ``async``. This means that, when used inside another function, they must be called with ``await``:
34
34
 
35
35
  .. code-block:: python
36
36
 
@@ -33,14 +33,14 @@ dependencies = [
33
33
  "biocommons.seqrepo",
34
34
  "pydantic == 2.*",
35
35
  "ga4gh.vrs ~= 2.0.0a10",
36
- "wags-tails ~= 0.1.3",
36
+ "wags-tails ~= 0.2.2",
37
37
  "bioutils",
38
38
  ]
39
39
  dynamic = ["version"]
40
40
 
41
41
  [project.optional-dependencies]
42
42
  dev = ["pre-commit>=3.7.1", "ipython", "ipykernel", "psycopg2-binary", "ruff==0.5.0"]
43
- test = ["pytest", "pytest-cov", "pytest-asyncio==0.18.3", "mock"]
43
+ tests = ["pytest", "pytest-cov", "pytest-asyncio==0.18.3", "mock"]
44
44
  docs = [
45
45
  "sphinx==6.1.3",
46
46
  "sphinx-autodoc-typehints==1.22.0",
@@ -1169,14 +1169,32 @@ class ExonGenomicCoordsMapper:
1169
1169
  :param end: Genomic coordinate of breakpoint
1170
1170
  :return: Exon number corresponding to adjacent exon. Will be 0-based
1171
1171
  """
1172
- for i in range(len(tx_exons_genomic_coords) - 1):
1172
+ # If a transcript has only one exon, return 0
1173
+ if len(tx_exons_genomic_coords) == 1:
1174
+ return 0
1175
+
1176
+ # Check if a breakpoint occurs before/after the transcript boundaries
1177
+ bp = start if start else end
1178
+ exon_list_len = len(tx_exons_genomic_coords) - 1
1179
+
1180
+ if strand == Strand.POSITIVE:
1181
+ if bp < tx_exons_genomic_coords[0].alt_start_i:
1182
+ return 0
1183
+ if bp > tx_exons_genomic_coords[exon_list_len].alt_end_i:
1184
+ return exon_list_len
1185
+ if strand == Strand.NEGATIVE:
1186
+ if bp > tx_exons_genomic_coords[0].alt_end_i:
1187
+ return 0
1188
+ if bp < tx_exons_genomic_coords[exon_list_len].alt_start_i:
1189
+ return exon_list_len
1190
+
1191
+ for i in range(exon_list_len):
1173
1192
  exon = tx_exons_genomic_coords[i]
1174
1193
  if start == exon.alt_start_i:
1175
1194
  break
1176
1195
  if end == exon.alt_end_i:
1177
1196
  break
1178
1197
  next_exon = tx_exons_genomic_coords[i + 1]
1179
- bp = start if start else end
1180
1198
  if strand == Strand.POSITIVE:
1181
1199
  lte_exon = exon
1182
1200
  gte_exon = next_exon
@@ -1185,6 +1203,7 @@ class ExonGenomicCoordsMapper:
1185
1203
  gte_exon = exon
1186
1204
  if bp >= lte_exon.alt_end_i and bp <= gte_exon.alt_start_i:
1187
1205
  break
1206
+
1188
1207
  # Return current exon if end position is provided, next exon if start position
1189
1208
  # is provided.
1190
1209
  return exon.ord if end else exon.ord + 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cool_seq_tool
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: Common Operation on Lots of Sequences Tool
5
5
  Author: Kori Kuzma, James Stevenson, Katie Stahl, Alex Wagner
6
6
  License: MIT License
@@ -53,7 +53,7 @@ Requires-Dist: hgvs
53
53
  Requires-Dist: biocommons.seqrepo
54
54
  Requires-Dist: pydantic==2.*
55
55
  Requires-Dist: ga4gh.vrs~=2.0.0a10
56
- Requires-Dist: wags-tails~=0.1.3
56
+ Requires-Dist: wags-tails~=0.2.2
57
57
  Requires-Dist: bioutils
58
58
  Provides-Extra: dev
59
59
  Requires-Dist: pre-commit>=3.7.1; extra == "dev"
@@ -61,11 +61,11 @@ Requires-Dist: ipython; extra == "dev"
61
61
  Requires-Dist: ipykernel; extra == "dev"
62
62
  Requires-Dist: psycopg2-binary; extra == "dev"
63
63
  Requires-Dist: ruff==0.5.0; extra == "dev"
64
- Provides-Extra: test
65
- Requires-Dist: pytest; extra == "test"
66
- Requires-Dist: pytest-cov; extra == "test"
67
- Requires-Dist: pytest-asyncio==0.18.3; extra == "test"
68
- Requires-Dist: mock; extra == "test"
64
+ Provides-Extra: tests
65
+ Requires-Dist: pytest; extra == "tests"
66
+ Requires-Dist: pytest-cov; extra == "tests"
67
+ Requires-Dist: pytest-asyncio==0.18.3; extra == "tests"
68
+ Requires-Dist: mock; extra == "tests"
69
69
  Provides-Extra: docs
70
70
  Requires-Dist: sphinx==6.1.3; extra == "docs"
71
71
  Requires-Dist: sphinx-autodoc-typehints==1.22.0; extra == "docs"
@@ -76,10 +76,10 @@ Requires-Dist: furo==2023.3.27; extra == "docs"
76
76
  Requires-Dist: sphinx-github-changelog==1.2.1; extra == "docs"
77
77
 
78
78
  <h1 align="center">
79
- CoolSeqTool
79
+ Cool-Seq-Tool
80
80
  </h1>
81
81
 
82
- [![image](https://img.shields.io/pypi/v/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![image](https://img.shields.io/pypi/l/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![image](https://img.shields.io/pypi/pyversions/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![Actions status](https://github.com/genomicmedlab/cool-seq-tool/actions/workflows/checks.yaml/badge.svg)](https://github.com/genomicmedlab/cool-seq-tool/actions/checks.yaml)
82
+ [![image](https://img.shields.io/pypi/v/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14007783.svg)](https://doi.org/10.5281/zenodo.14007783) [![image](https://img.shields.io/pypi/l/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![image](https://img.shields.io/pypi/pyversions/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![Actions status](https://github.com/genomicmedlab/cool-seq-tool/actions/workflows/checks.yaml/badge.svg)](https://github.com/genomicmedlab/cool-seq-tool/actions/checks.yaml)
83
83
 
84
84
  ---
85
85
 
@@ -90,18 +90,18 @@ CoolSeqTool
90
90
  ## Overview
91
91
 
92
92
  <!-- description -->
93
- The **CoolSeqTool** provides:
93
+ The Common Operations On Lots-Of Sequences Tool, **Cool-Seq-Tool**, provides:
94
94
 
95
- - A Pythonic API on top of sequence data of interest to tertiary analysis tools, including mappings between gene names and transcripts, [MANE transcript](https://www.ncbi.nlm.nih.gov/refseq/MANE/) descriptions, and the [Universal Transcript Archive](https://github.com/biocommons/uta)
96
- - Augmented access to the [SeqRepo](https://github.com/biocommons/biocommons.seqrepo) database, including multiple additional methods and tools
97
- - Mapping tools that combine the above to support translation between references sequences, annotation layers, and MANE transcripts
95
+ - A Pythonic API on top of sequence data of interest to tertiary analysis tools, including mappings between gene names and transcripts, [MANE transcript](https://www.ncbi.nlm.nih.gov/refseq/MANE/) descriptions, and transcript alignment data from the [Universal Transcript Archive](https://github.com/biocommons/uta)
96
+ - Augmented access to the [SeqRepo](https://github.com/biocommons/biocommons.seqrepo) database, including multiple additional methods and tools
97
+ - Mapping tools, including a transcript selection algorithm for selecting a representative transcript defined [here](https://coolseqtool.readthedocs.io/stable/transcript_selection.html), that combine the above to support translation between references sequences, annotation layers, and transcripts
98
98
  <!-- /description -->
99
99
 
100
100
  ---
101
101
 
102
102
  ## Install
103
103
 
104
- CoolSeqTool is available on [PyPI](https://pypi.org/project/cool-seq-tool)
104
+ Cool-Seq-Tool is available on [PyPI](https://pypi.org/project/cool-seq-tool)
105
105
 
106
106
  ```shell
107
107
  python3 -m pip install cool-seq-tool
@@ -113,7 +113,7 @@ See the [installation instructions](https://coolseqtool.readthedocs.io/stable/in
113
113
 
114
114
  ## Usage
115
115
 
116
- All CoolSeqTool resources can be initialized by way of a top-level class instance:
116
+ All Cool-Seq-Tool resources can be initialized by way of a top-level class instance:
117
117
 
118
118
  ```pycon
119
119
  >>> from cool_seq_tool import CoolSeqTool
@@ -9,7 +9,6 @@ pyproject.toml
9
9
  .github/ISSUE_TEMPLATE/bug-report.yaml
10
10
  .github/ISSUE_TEMPLATE/feature-request.yaml
11
11
  .github/workflows/checks.yaml
12
- .github/workflows/close_issue.yml
13
12
  .github/workflows/pr-priority-label.yaml
14
13
  .github/workflows/release.yml
15
14
  .github/workflows/stale.yaml
@@ -7,7 +7,7 @@ hgvs
7
7
  biocommons.seqrepo
8
8
  pydantic==2.*
9
9
  ga4gh.vrs~=2.0.0a10
10
- wags-tails~=0.1.3
10
+ wags-tails~=0.2.2
11
11
  bioutils
12
12
 
13
13
  [dev]
@@ -26,7 +26,7 @@ sphinxext-opengraph==0.8.2
26
26
  furo==2023.3.27
27
27
  sphinx-github-changelog==1.2.1
28
28
 
29
- [test]
29
+ [tests]
30
30
  pytest
31
31
  pytest-cov
32
32
  pytest-asyncio==0.18.3
@@ -277,6 +277,21 @@ def nm_001105539_exons_genomic_coords():
277
277
  ]
278
278
 
279
279
 
280
+ @pytest.fixture(scope="session")
281
+ def mm_001005183_1_exons():
282
+ """Create test fixture for NM_001005183.1 exons and genomic coordinates"""
283
+ return [
284
+ _ExonCoord(
285
+ ord=0,
286
+ tx_start_i=0,
287
+ tx_end_i=939,
288
+ alt_start_i=55426253,
289
+ alt_end_i=55427192,
290
+ alt_strand=Strand.POSITIVE,
291
+ )
292
+ ]
293
+
294
+
280
295
  @pytest.fixture(scope="session")
281
296
  def tpm3_1_8_start_genomic():
282
297
  """Create test fixture for genomic data for exon 1, 8"""
@@ -806,7 +806,10 @@ async def test_get_start_end_exon_coords(test_egc_mapper):
806
806
 
807
807
  @pytest.mark.asyncio()
808
808
  async def test_get_adjacent_exon(
809
- test_egc_mapper, nm_152263_exons_genomic_coords, nm_001105539_exons_genomic_coords
809
+ test_egc_mapper,
810
+ nm_152263_exons_genomic_coords,
811
+ nm_001105539_exons_genomic_coords,
812
+ mm_001005183_1_exons,
810
813
  ):
811
814
  """Test that get_adjacent_exon works properly"""
812
815
  resp = test_egc_mapper._get_adjacent_exon(
@@ -840,6 +843,41 @@ async def test_get_adjacent_exon(
840
843
  )
841
844
  assert resp == 4
842
845
 
846
+ # Check cases where breakpoint occurs in before/after transcript boundaries
847
+ resp = test_egc_mapper._get_adjacent_exon(
848
+ tx_exons_genomic_coords=nm_001105539_exons_genomic_coords,
849
+ start=80486220,
850
+ strand=Strand.POSITIVE,
851
+ )
852
+ assert resp == 0
853
+ resp = test_egc_mapper._get_adjacent_exon(
854
+ tx_exons_genomic_coords=nm_001105539_exons_genomic_coords,
855
+ start=80526285,
856
+ strand=Strand.POSITIVE,
857
+ )
858
+ assert resp == 5
859
+ resp = test_egc_mapper._get_adjacent_exon(
860
+ tx_exons_genomic_coords=nm_152263_exons_genomic_coords,
861
+ end=154192110,
862
+ strand=Strand.NEGATIVE,
863
+ )
864
+ assert resp == 0
865
+ resp = test_egc_mapper._get_adjacent_exon(
866
+ tx_exons_genomic_coords=nm_152263_exons_genomic_coords,
867
+ end=154161809,
868
+ strand=Strand.NEGATIVE,
869
+ )
870
+ assert resp == 9
871
+
872
+ # Check cases where transcript only has one exon and breakpoint does not occur
873
+ # exon
874
+ resp = test_egc_mapper._get_adjacent_exon(
875
+ tx_exons_genomic_coords=mm_001005183_1_exons,
876
+ start=55411058,
877
+ strand=Strand.POSITIVE,
878
+ )
879
+ assert resp == 0
880
+
843
881
 
844
882
  def test_is_exonic_breakpoint(test_egc_mapper, nm_001105539_exons_genomic_coords):
845
883
  """Test is breakpoint occurs on exon"""
@@ -1,18 +0,0 @@
1
- name: Close issues related to a merged pull request based on staging branch.
2
-
3
- on:
4
- pull_request:
5
- types: [closed]
6
- branches:
7
- - staging
8
-
9
- jobs:
10
- closeIssueOnPrMergeTrigger:
11
-
12
- runs-on: ubuntu-latest
13
-
14
- steps:
15
- - name: Closes issues related to a merged pull request.
16
- uses: ldez/gha-mjolnir@v1.0.3
17
- env:
18
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,59 +0,0 @@
1
- <h1 align="center">
2
- CoolSeqTool
3
- </h1>
4
-
5
- [![image](https://img.shields.io/pypi/v/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![image](https://img.shields.io/pypi/l/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![image](https://img.shields.io/pypi/pyversions/cool-seq-tool.svg)](https://pypi.python.org/pypi/cool-seq-tool) [![Actions status](https://github.com/genomicmedlab/cool-seq-tool/actions/workflows/checks.yaml/badge.svg)](https://github.com/genomicmedlab/cool-seq-tool/actions/checks.yaml)
6
-
7
- ---
8
-
9
- **[Documentation](https://coolseqtool.readthedocs.io/stable/)** · [Installation](https://coolseqtool.readthedocs.io/stable/install.html) · [Usage](https://coolseqtool.readthedocs.io/stable/usage.html) · [API reference](https://coolseqtool.readthedocs.io/stable/reference/index.html)
10
-
11
- ---
12
-
13
- ## Overview
14
-
15
- <!-- description -->
16
- The **CoolSeqTool** provides:
17
-
18
- - A Pythonic API on top of sequence data of interest to tertiary analysis tools, including mappings between gene names and transcripts, [MANE transcript](https://www.ncbi.nlm.nih.gov/refseq/MANE/) descriptions, and the [Universal Transcript Archive](https://github.com/biocommons/uta)
19
- - Augmented access to the [SeqRepo](https://github.com/biocommons/biocommons.seqrepo) database, including multiple additional methods and tools
20
- - Mapping tools that combine the above to support translation between references sequences, annotation layers, and MANE transcripts
21
- <!-- /description -->
22
-
23
- ---
24
-
25
- ## Install
26
-
27
- CoolSeqTool is available on [PyPI](https://pypi.org/project/cool-seq-tool)
28
-
29
- ```shell
30
- python3 -m pip install cool-seq-tool
31
- ```
32
-
33
- See the [installation instructions](https://coolseqtool.readthedocs.io/stable/install.html) in the documentation for a description of dependency setup requirements.
34
-
35
- ---
36
-
37
- ## Usage
38
-
39
- All CoolSeqTool resources can be initialized by way of a top-level class instance:
40
-
41
- ```pycon
42
- >>> from cool_seq_tool import CoolSeqTool
43
- >>> from cool_seq_tool.schemas import AnnotationLayer, CoordinateType
44
- >>> cst = CoolSeqTool()
45
- >>> result = await cst.mane_transcript.get_mane_transcript(
46
- ... "NP_004324.2",
47
- ... 599,
48
- ... AnnotationLayer.PROTEIN,
49
- ... coordinate_type=CoordinateType.INTER_RESIDUE,
50
- ... )
51
- >>> result.gene, result.refseq, result.status
52
- ('EGFR', 'NM_005228.5', <TranscriptPriority.MANE_SELECT: 'mane_select'>)
53
- ```
54
-
55
- ---
56
-
57
- ## Feedback and contributing
58
-
59
- We welcome bug reports, feature requests, and code contributions from users and interested collaborators. The [documentation](https://coolseqtool.readthedocs.io/stable/contributing.html) contains guidance for submitting feedback and contributing new code.
File without changes
File without changes
File without changes
File without changes