cool-seq-tool 0.7.1__tar.gz → 0.8.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 (63) hide show
  1. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/PKG-INFO +1 -1
  2. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/mappers/exon_genomic_coords.py +11 -13
  3. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/sources/mane_transcript_mappings.py +3 -1
  4. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool.egg-info/PKG-INFO +1 -1
  5. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/tests/mappers/test_exon_genomic_coords.py +3 -9
  6. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.coveragerc +0 -0
  7. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.github/ISSUE_TEMPLATE/bug-report.yaml +0 -0
  8. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.github/ISSUE_TEMPLATE/feature-request.yaml +0 -0
  9. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.github/workflows/checks.yaml +0 -0
  10. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.github/workflows/close_issue.yml +0 -0
  11. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.github/workflows/pr-priority-label.yaml +0 -0
  12. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.github/workflows/release.yml +0 -0
  13. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.github/workflows/stale.yaml +0 -0
  14. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.gitignore +0 -0
  15. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.pre-commit-config.yaml +0 -0
  16. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/.readthedocs.yaml +0 -0
  17. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/CITATION.cff +0 -0
  18. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/LICENSE +0 -0
  19. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/README.md +0 -0
  20. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/Makefile +0 -0
  21. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/make.bat +0 -0
  22. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/_static/img/biomart.png +0 -0
  23. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/_templates/module_summary.rst +0 -0
  24. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/changelog.rst +0 -0
  25. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/conf.py +0 -0
  26. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/contributing.rst +0 -0
  27. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/index.rst +0 -0
  28. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/install.rst +0 -0
  29. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/license.rst +0 -0
  30. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/reference/index.rst +0 -0
  31. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/transcript_selection.rst +0 -0
  32. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/docs/source/usage.rst +0 -0
  33. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/pyproject.toml +0 -0
  34. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/setup.cfg +0 -0
  35. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/__init__.py +0 -0
  36. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/app.py +0 -0
  37. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/handlers/__init__.py +0 -0
  38. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/handlers/seqrepo_access.py +0 -0
  39. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/mappers/__init__.py +0 -0
  40. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/mappers/alignment.py +0 -0
  41. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/mappers/liftover.py +0 -0
  42. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/mappers/mane_transcript.py +0 -0
  43. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/resources/__init__.py +0 -0
  44. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/resources/data_files.py +0 -0
  45. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/resources/status.py +0 -0
  46. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/resources/transcript_mapping.tsv +0 -0
  47. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/schemas.py +0 -0
  48. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/sources/__init__.py +0 -0
  49. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/sources/transcript_mappings.py +0 -0
  50. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/sources/uta_database.py +0 -0
  51. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool/utils.py +0 -0
  52. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool.egg-info/SOURCES.txt +0 -0
  53. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool.egg-info/dependency_links.txt +0 -0
  54. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool.egg-info/requires.txt +0 -0
  55. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/src/cool_seq_tool.egg-info/top_level.txt +0 -0
  56. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/tests/conftest.py +0 -0
  57. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/tests/handlers/test_seqrepo_access.py +0 -0
  58. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/tests/mappers/test_alignment.py +0 -0
  59. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/tests/mappers/test_liftover.py +0 -0
  60. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/tests/mappers/test_mane_transcript.py +0 -0
  61. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/tests/sources/test_mane_transcript_mappings.py +0 -0
  62. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.0}/tests/sources/test_uta_database.py +0 -0
  63. {cool_seq_tool-0.7.1 → cool_seq_tool-0.8.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.7.1
3
+ Version: 0.8.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
@@ -87,7 +87,9 @@ class GenomicTxSeg(BaseModelForbidExtra):
87
87
  """Model for representing a boundary for a transcript segment."""
88
88
 
89
89
  seg: TxSegment | None = Field(None, description="Transcript segment.")
90
- gene: StrictStr | None = Field(None, description="HGNC gene symbol.")
90
+ gene: StrictStr | None = Field(
91
+ None, description="Valid, case-sensitive HGNC gene symbol."
92
+ )
91
93
  genomic_ac: StrictStr | None = Field(None, description="RefSeq genomic accession.")
92
94
  tx_ac: StrictStr | None = Field(None, description="RefSeq transcript accession.")
93
95
  errors: list[StrictStr] = Field([], description="Error messages.")
@@ -139,7 +141,9 @@ class GenomicTxSeg(BaseModelForbidExtra):
139
141
  class GenomicTxSegService(BaseModelForbidExtra):
140
142
  """Service model for genomic and transcript data."""
141
143
 
142
- gene: StrictStr | None = Field(None, description="HGNC gene symbol.")
144
+ gene: StrictStr | None = Field(
145
+ None, description="Valid, case-sensitive HGNC gene symbol."
146
+ )
143
147
  genomic_ac: StrictStr | None = Field(None, description="RefSeq genomic accession.")
144
148
  tx_ac: StrictStr | None = Field(None, description="RefSeq transcript accession.")
145
149
  seg_start: TxSegment | None = Field(None, description="Start transcript segment.")
@@ -292,7 +296,7 @@ class ExonGenomicCoordsMapper:
292
296
  ('NC_000001.11', 154192135, 154170399)
293
297
 
294
298
  :param transcript: RefSeq transcript accession
295
- :param gene: HGNC gene symbol
299
+ :param gene: Valid, case-sensitive HGNC gene symbol
296
300
  :param exon_start: Starting transcript exon number (1-based). If not provided,
297
301
  must provide ``exon_end``
298
302
  :param exon_start_offset: Starting exon offset
@@ -335,9 +339,6 @@ class ExonGenomicCoordsMapper:
335
339
  if errors:
336
340
  return _return_service_errors(errors)
337
341
 
338
- if gene:
339
- gene = gene.upper()
340
-
341
342
  # Get aligned genomic data (hgnc gene, alt_ac, alt_start_i, alt_end_i, strand)
342
343
  # for exon(s)
343
344
  (
@@ -455,7 +456,7 @@ class ExonGenomicCoordsMapper:
455
456
  following the breakpoint for the 3' end. For the negative strand, adjacent
456
457
  is defined as the exon following the breakpoint for the 5' end and the exon
457
458
  preceding the breakpoint for the 3' end.
458
- :param gene: gene name. Ideally, HGNC symbol. Must be given if no ``transcript``
459
+ :param gene: A valid, case-sensitive HGNC symbol. Must be given if no ``transcript``
459
460
  value is provided.
460
461
  :param coordinate_type: Coordinate type for ``seg_start_genomic`` and
461
462
  ``seg_end_genomic``
@@ -473,9 +474,6 @@ class ExonGenomicCoordsMapper:
473
474
  if errors:
474
475
  return _return_service_errors(errors)
475
476
 
476
- if gene is not None:
477
- gene = gene.upper()
478
-
479
477
  params = {}
480
478
 
481
479
  if seg_start_genomic:
@@ -630,7 +628,7 @@ class ExonGenomicCoordsMapper:
630
628
  must provide ``tx_exon_end``
631
629
  :param tx_exon_end: Transcript's exon end coordinates. If not provided, must
632
630
  provide ``tx_exon_start``
633
- :param gene: HGNC gene symbol
631
+ :param gene: A valid, case-sensitive HGNC gene symbol
634
632
  :return: Tuple containing aligned genomic data for start and end exon and
635
633
  warnings if found
636
634
  """
@@ -755,7 +753,7 @@ class ExonGenomicCoordsMapper:
755
753
  :param transcript: The transcript to use. If this is not given, we will try the
756
754
  following transcripts: MANE Select, MANE Clinical Plus, Longest Remaining
757
755
  Compatible Transcript
758
- :param gene: HGNC gene symbol
756
+ :param gene: Valid, case-sensitive HGNC gene symbol
759
757
  :param get_nearest_transcript_junction: If ``True``, this will return the
760
758
  adjacent exon if the position specified by``seg_start_genomic`` or
761
759
  ``seg_end_genomic`` does not occur on an exon. For the positive strand, adjacent
@@ -1062,7 +1060,7 @@ class ExonGenomicCoordsMapper:
1062
1060
  :param genomic_ac: Genomic RefSeq accession
1063
1061
  :param genomic_pos: Genomic position where the transcript segment occurs
1064
1062
  :param is_seg_start: Whether or not ``genomic_pos`` represents the start position.
1065
- :param gene: HGNC gene symbol
1063
+ :param gene: Valid, case-sensitive HGNC gene symbol
1066
1064
  :param tx_ac: Transcript RefSeq accession. If not provided, will use MANE
1067
1065
  transcript
1068
1066
  :return: Transcript segment data and associated genomic metadata
@@ -61,7 +61,9 @@ class ManeTranscriptMappings:
61
61
  location information). The list is sorted so that a MANE Select entry comes
62
62
  first, followed by a MANE Plus Clinical entry, if available.
63
63
  """
64
- data = self.df.filter(pl.col("symbol") == gene_symbol.upper())
64
+ data = self.df.filter(
65
+ pl.col("symbol").str.to_uppercase() == gene_symbol.upper()
66
+ )
65
67
 
66
68
  if len(data) == 0:
67
69
  _logger.warning(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cool_seq_tool
3
- Version: 0.7.1
3
+ Version: 0.8.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
@@ -1162,7 +1162,7 @@ async def test_wee1(test_egc_mapper, wee1_exon2_exon11, mane_wee1_exon2_exon11):
1162
1162
  "seg_start_genomic": 9597639,
1163
1163
  "seg_end_genomic": 9609996,
1164
1164
  "transcript": "NM_003390.3",
1165
- "gene": "wee1",
1165
+ "gene": "WEE1",
1166
1166
  }
1167
1167
  g_to_t_resp = await test_egc_mapper.genomic_to_tx_segment(**inputs)
1168
1168
  genomic_tx_seg_service_checks(g_to_t_resp, wee1_exon2_exon11)
@@ -1177,7 +1177,7 @@ async def test_wee1(test_egc_mapper, wee1_exon2_exon11, mane_wee1_exon2_exon11):
1177
1177
  "genomic_ac": "NC_000011.9",
1178
1178
  "seg_start_genomic": 9597639, # GRCh38 coords: 9576092
1179
1179
  "seg_end_genomic": 9609996, # GRCh38 coords: 9588449
1180
- "gene": "wee1",
1180
+ "gene": "WEE1",
1181
1181
  }
1182
1182
  g_to_t_resp = await test_egc_mapper.genomic_to_tx_segment(**inputs)
1183
1183
  genomic_tx_seg_service_checks(g_to_t_resp, mane_wee1_exon2_exon11)
@@ -1216,12 +1216,6 @@ async def test_transcript_to_genomic(
1216
1216
  expected.seg_end.genomic_location.start = 154170399
1217
1217
  genomic_tx_seg_service_checks(resp, expected)
1218
1218
 
1219
- resp = await test_egc_mapper.tx_segment_to_genomic(
1220
- exon_start=None, exon_end=8, gene="tpm3", transcript="NM_152263.3"
1221
- )
1222
- expected.seg_end.genomic_location.start = 154170399
1223
- genomic_tx_seg_service_checks(resp, expected)
1224
-
1225
1219
  expected = tpm3_exon1_exon8.model_copy(deep=True)
1226
1220
  resp = await test_egc_mapper.tx_segment_to_genomic(
1227
1221
  exon_start=1, exon_end=8, exon_end_offset=-5, transcript="NM_152263.3"
@@ -1371,7 +1365,7 @@ async def test_invalid(test_egc_mapper):
1371
1365
  gene="dummy gene",
1372
1366
  )
1373
1367
  genomic_tx_seg_service_checks(resp, is_valid=False)
1374
- assert resp.errors == ["Expected gene, DUMMY GENE, but found TPM3"]
1368
+ assert resp.errors == ["Expected gene, dummy gene, but found TPM3"]
1375
1369
 
1376
1370
  # Invalid accession
1377
1371
  resp = await test_egc_mapper.genomic_to_tx_segment(
File without changes
File without changes
File without changes
File without changes
File without changes