cool-seq-tool 0.14.2__tar.gz → 0.14.3__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.14.2 → cool_seq_tool-0.14.3}/.gitignore +3 -0
  2. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/PKG-INFO +3 -3
  3. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/install.rst +1 -1
  4. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/pyproject.toml +2 -2
  5. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/mappers/alignment.py +1 -1
  6. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/mappers/feature_overlap.py +6 -5
  7. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/mappers/mane_transcript.py +17 -10
  8. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/resources/status.py +6 -1
  9. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/schemas.py +1 -1
  10. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/utils.py +1 -1
  11. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool.egg-info/PKG-INFO +3 -3
  12. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/.coveragerc +0 -0
  13. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/.github/ISSUE_TEMPLATE/bug-report.yaml +0 -0
  14. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/.github/ISSUE_TEMPLATE/feature-request.yaml +0 -0
  15. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/.github/workflows/checks.yaml +0 -0
  16. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/.github/workflows/pr-priority-label.yaml +0 -0
  17. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/.github/workflows/release.yml +0 -0
  18. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/.github/workflows/stale.yaml +0 -0
  19. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/.pre-commit-config.yaml +0 -0
  20. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/.readthedocs.yaml +0 -0
  21. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/CITATION.cff +0 -0
  22. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/LICENSE +0 -0
  23. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/README.md +0 -0
  24. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/Makefile +0 -0
  25. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/make.bat +0 -0
  26. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/_static/img/biomart.png +0 -0
  27. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/_templates/module_summary.rst +0 -0
  28. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/changelog.rst +0 -0
  29. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/conf.py +0 -0
  30. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/contributing.rst +0 -0
  31. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/index.rst +0 -0
  32. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/license.rst +0 -0
  33. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/reference/index.rst +0 -0
  34. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/transcript_selection.rst +0 -0
  35. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/docs/source/usage.rst +0 -0
  36. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/setup.cfg +0 -0
  37. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/__init__.py +0 -0
  38. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/app.py +0 -0
  39. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/handlers/__init__.py +0 -0
  40. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/handlers/seqrepo_access.py +0 -0
  41. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/mappers/__init__.py +0 -0
  42. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/mappers/exon_genomic_coords.py +0 -0
  43. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/mappers/liftover.py +0 -0
  44. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/resources/__init__.py +0 -0
  45. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/resources/data_files.py +0 -0
  46. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/resources/transcript_mapping.tsv +0 -0
  47. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/sources/__init__.py +0 -0
  48. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/sources/mane_transcript_mappings.py +0 -0
  49. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/sources/transcript_mappings.py +0 -0
  50. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool/sources/uta_database.py +0 -0
  51. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool.egg-info/SOURCES.txt +0 -0
  52. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool.egg-info/dependency_links.txt +0 -0
  53. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool.egg-info/requires.txt +0 -0
  54. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/src/cool_seq_tool.egg-info/top_level.txt +0 -0
  55. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/tests/conftest.py +0 -0
  56. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/tests/handlers/test_feature_overlap.py +0 -0
  57. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/tests/handlers/test_seqrepo_access.py +0 -0
  58. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/tests/mappers/test_alignment.py +0 -0
  59. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/tests/mappers/test_exon_genomic_coords.py +0 -0
  60. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/tests/mappers/test_liftover.py +0 -0
  61. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/tests/mappers/test_mane_transcript.py +0 -0
  62. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/tests/sources/test_mane_transcript_mappings.py +0 -0
  63. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/tests/sources/test_uta_database.py +0 -0
  64. {cool_seq_tool-0.14.2 → cool_seq_tool-0.14.3}/tests/test_utils.py +0 -0
@@ -135,3 +135,6 @@ docs/source/reference/api
135
135
 
136
136
  # Files created by doctests
137
137
  tpm3.fasta
138
+
139
+ # VSCode
140
+ .vscode
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cool_seq_tool
3
- Version: 0.14.2
3
+ Version: 0.14.3
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
@@ -38,10 +38,10 @@ Classifier: Intended Audience :: Developers
38
38
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
39
39
  Classifier: License :: OSI Approved :: MIT License
40
40
  Classifier: Programming Language :: Python :: 3
41
- Classifier: Programming Language :: Python :: 3.10
42
41
  Classifier: Programming Language :: Python :: 3.11
43
42
  Classifier: Programming Language :: Python :: 3.12
44
- Requires-Python: >=3.10
43
+ Classifier: Programming Language :: Python :: 3.13
44
+ Requires-Python: >=3.11
45
45
  Description-Content-Type: text/markdown
46
46
  License-File: LICENSE
47
47
  Requires-Dist: asyncpg
@@ -6,7 +6,7 @@ Installation
6
6
  Prerequisites
7
7
  -------------
8
8
 
9
- * Python 3.10+
9
+ * Python 3.11+
10
10
  * A UNIX-like environment (e.g. MacOS, WSL, Ubuntu)
11
11
  * A recent version of PostgreSQL (ideally at least 11+)
12
12
 
@@ -16,11 +16,11 @@ classifiers = [
16
16
  "Topic :: Scientific/Engineering :: Bio-Informatics",
17
17
  "License :: OSI Approved :: MIT License",
18
18
  "Programming Language :: Python :: 3",
19
- "Programming Language :: Python :: 3.10",
20
19
  "Programming Language :: Python :: 3.11",
21
20
  "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
22
  ]
23
- requires-python = ">=3.10"
23
+ requires-python = ">=3.11"
24
24
  description = "Common Operation on Lots of Sequences Tool"
25
25
  license = {file = "LICENSE"}
26
26
  dependencies = [
@@ -106,7 +106,7 @@ class AlignmentMapper:
106
106
  c_end_pos: int,
107
107
  cds_start: int | None = None,
108
108
  coordinate_type: CoordinateType = CoordinateType.RESIDUE,
109
- target_genome_assembly: bool = Assembly.GRCH38,
109
+ target_genome_assembly: Assembly = Assembly.GRCH38,
110
110
  ) -> tuple[dict | None, str | None]:
111
111
  """Translate cDNA representation to genomic representation
112
112
 
@@ -212,14 +212,15 @@ class FeatureOverlap:
212
212
 
213
213
  ga4gh_seq_id = ga4gh_aliases[0]
214
214
 
215
- def _get_seq_loc(start_pos: int, stop_pos: int, refget_ac: str) -> dict:
216
- """Get VRS Sequence Location represented as a dict
215
+ def _get_seq_loc(
216
+ start_pos: int, stop_pos: int, refget_ac: str
217
+ ) -> SequenceLocation:
218
+ """Get VRS Sequence Location
217
219
 
218
220
  :param start_pos: Start position
219
221
  :param stop_pos: Stop position
220
222
  :param refget_ac: Refget Accession (SQ.)
221
- :return: VRS Sequence Location represented as dictionary with the ga4gh ID
222
- included
223
+ :return: VRS Sequence Location
223
224
  """
224
225
  _sl = SequenceLocation(
225
226
  sequenceReference=SequenceReference(
@@ -229,7 +230,7 @@ class FeatureOverlap:
229
230
  end=stop_pos,
230
231
  )
231
232
  ga4gh_identify(_sl)
232
- return _sl.model_dump(exclude_none=True)
233
+ return _sl
233
234
 
234
235
  resp = {}
235
236
  refget_ac = ga4gh_seq_id.split("ga4gh:")[-1]
@@ -55,7 +55,7 @@ class DataRepresentation(BaseModel):
55
55
  """Define object model for final output representation"""
56
56
 
57
57
  gene: str | None = None
58
- refseq: str
58
+ refseq: str | None = None
59
59
  ensembl: str | None = None
60
60
  pos: tuple[int, int]
61
61
  strand: Strand
@@ -447,7 +447,7 @@ class ManeTranscript:
447
447
 
448
448
  async def _g_to_c(
449
449
  self,
450
- g: dict,
450
+ g: GenomicTxMetadata,
451
451
  refseq_c_ac: str,
452
452
  status: TranscriptPriority,
453
453
  ensembl_c_ac: str | None = None,
@@ -590,16 +590,23 @@ class ManeTranscript:
590
590
  if mane_transcript:
591
591
  mane_start_pos = mane_transcript.pos[0]
592
592
  mane_end_pos = mane_transcript.pos[1]
593
- if anno == AnnotationLayer.CDNA:
593
+ if anno == AnnotationLayer.CDNA and isinstance(
594
+ mane_transcript, CdnaRepresentation
595
+ ):
594
596
  mane_cds = mane_transcript.coding_start_site
595
597
  mane_start_pos += mane_cds
596
598
  mane_end_pos += mane_cds
597
- mane_ref, _ = self.seqrepo_access.get_reference_sequence(
598
- mane_transcript.refseq,
599
- start=mane_start_pos,
600
- end=mane_end_pos if mane_start_pos != mane_end_pos else None,
601
- coordinate_type=coordinate_type,
602
- )
599
+
600
+ if mane_transcript.refseq:
601
+ mane_ref, _ = self.seqrepo_access.get_reference_sequence(
602
+ mane_transcript.refseq,
603
+ start=mane_start_pos,
604
+ end=mane_end_pos if mane_start_pos != mane_end_pos else None,
605
+ coordinate_type=coordinate_type,
606
+ )
607
+ else:
608
+ mane_ref = None
609
+
603
610
  if not mane_ref:
604
611
  _logger.info("Unable to validate reference for MANE Transcript")
605
612
 
@@ -1330,7 +1337,7 @@ class ManeTranscript:
1330
1337
  gene: str | None = None,
1331
1338
  coordinate_type: CoordinateType = CoordinateType.RESIDUE,
1332
1339
  try_longest_compatible: bool = False,
1333
- ) -> dict | None:
1340
+ ) -> ProteinAndCdnaRepresentation | None:
1334
1341
  """Given GRCh38 genomic representation, return protein representation.
1335
1342
 
1336
1343
  Will try MANE Select and then MANE Plus Clinical. If neither is found and
@@ -24,6 +24,7 @@ ResourceStatus = namedtuple(
24
24
  DataFile.TRANSCRIPT_MAPPINGS.lower(),
25
25
  DataFile.MANE_SUMMARY.lower(),
26
26
  DataFile.LRG_REFSEQGENE.lower(),
27
+ DataFile.MANE_REFSEQ_GENOMIC.lower(),
27
28
  "liftover",
28
29
  ),
29
30
  )
@@ -37,6 +38,7 @@ async def check_status(
37
38
  sr: SeqRepo | None = None,
38
39
  chain_file_37_to_38: str | None = None,
39
40
  chain_file_38_to_37: str | None = None,
41
+ mane_refseq_genomic_path: str | None = None,
40
42
  ) -> ResourceStatus:
41
43
  """Perform basic status checks on availability of required data resources.
42
44
 
@@ -62,6 +64,7 @@ async def check_status(
62
64
  is used for ``agct``. If this is not provided, will check to see if
63
65
  ``LIFTOVER_CHAIN_38_TO_37`` env var is set. If neither is provided, will allow
64
66
  ``agct`` to download a chain file from UCSC
67
+ :param mane_refseq_genomic_path: Optional path to MANE RefSeq Genomic GFF data
65
68
  :return: boolean description of availability of each resource, given current
66
69
  environment configurations
67
70
  """
@@ -69,19 +72,21 @@ async def check_status(
69
72
  DataFile.TRANSCRIPT_MAPPINGS.lower(): transcript_file_path,
70
73
  DataFile.LRG_REFSEQGENE.lower(): lrg_refseqgene_path,
71
74
  DataFile.MANE_SUMMARY.lower(): mane_data_path,
75
+ DataFile.MANE_REFSEQ_GENOMIC.lower(): mane_refseq_genomic_path,
72
76
  }
73
77
 
74
78
  status = {
75
79
  DataFile.TRANSCRIPT_MAPPINGS.lower(): False,
76
80
  DataFile.LRG_REFSEQGENE.lower(): False,
77
81
  DataFile.MANE_SUMMARY.lower(): False,
82
+ DataFile.MANE_REFSEQ_GENOMIC.lower(): False,
78
83
  "liftover": False,
79
84
  "uta": False,
80
85
  "seqrepo": False,
81
86
  }
82
87
  for r in list(DataFile):
83
88
  name_lower = r.lower()
84
- declared_path = file_path_params[name_lower]
89
+ declared_path = file_path_params.get(name_lower)
85
90
  if declared_path and declared_path.exists() and declared_path.is_file():
86
91
  status[name_lower] = True
87
92
  continue
@@ -14,7 +14,7 @@ from pydantic import (
14
14
 
15
15
  from cool_seq_tool import __version__
16
16
 
17
- _now = str(datetime.datetime.now(tz=datetime.timezone.utc))
17
+ _now = str(datetime.datetime.now(tz=datetime.UTC))
18
18
 
19
19
 
20
20
  class AnnotationLayer(str, Enum):
@@ -47,7 +47,7 @@ def service_meta() -> ServiceMeta:
47
47
  """
48
48
  return ServiceMeta(
49
49
  version=__version__,
50
- response_datetime=datetime.datetime.now(tz=datetime.timezone.utc),
50
+ response_datetime=datetime.datetime.now(tz=datetime.UTC),
51
51
  )
52
52
 
53
53
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cool_seq_tool
3
- Version: 0.14.2
3
+ Version: 0.14.3
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
@@ -38,10 +38,10 @@ Classifier: Intended Audience :: Developers
38
38
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
39
39
  Classifier: License :: OSI Approved :: MIT License
40
40
  Classifier: Programming Language :: Python :: 3
41
- Classifier: Programming Language :: Python :: 3.10
42
41
  Classifier: Programming Language :: Python :: 3.11
43
42
  Classifier: Programming Language :: Python :: 3.12
44
- Requires-Python: >=3.10
43
+ Classifier: Programming Language :: Python :: 3.13
44
+ Requires-Python: >=3.11
45
45
  Description-Content-Type: text/markdown
46
46
  License-File: LICENSE
47
47
  Requires-Dist: asyncpg
File without changes
File without changes
File without changes