cool-seq-tool 0.14.3__tar.gz → 0.14.4__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.3 → cool_seq_tool-0.14.4}/PKG-INFO +1 -1
  2. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/mappers/exon_genomic_coords.py +28 -0
  3. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool.egg-info/PKG-INFO +1 -1
  4. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/tests/mappers/test_exon_genomic_coords.py +14 -0
  5. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/.coveragerc +0 -0
  6. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/.github/ISSUE_TEMPLATE/bug-report.yaml +0 -0
  7. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/.github/ISSUE_TEMPLATE/feature-request.yaml +0 -0
  8. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/.github/workflows/checks.yaml +0 -0
  9. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/.github/workflows/pr-priority-label.yaml +0 -0
  10. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/.github/workflows/release.yml +0 -0
  11. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/.github/workflows/stale.yaml +0 -0
  12. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/.gitignore +0 -0
  13. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/.pre-commit-config.yaml +0 -0
  14. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/.readthedocs.yaml +0 -0
  15. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/CITATION.cff +0 -0
  16. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/LICENSE +0 -0
  17. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/README.md +0 -0
  18. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/Makefile +0 -0
  19. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/make.bat +0 -0
  20. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/_static/img/biomart.png +0 -0
  21. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/_templates/module_summary.rst +0 -0
  22. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/changelog.rst +0 -0
  23. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/conf.py +0 -0
  24. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/contributing.rst +0 -0
  25. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/index.rst +0 -0
  26. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/install.rst +0 -0
  27. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/license.rst +0 -0
  28. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/reference/index.rst +0 -0
  29. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/transcript_selection.rst +0 -0
  30. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/docs/source/usage.rst +0 -0
  31. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/pyproject.toml +0 -0
  32. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/setup.cfg +0 -0
  33. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/__init__.py +0 -0
  34. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/app.py +0 -0
  35. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/handlers/__init__.py +0 -0
  36. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/handlers/seqrepo_access.py +0 -0
  37. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/mappers/__init__.py +0 -0
  38. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/mappers/alignment.py +0 -0
  39. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/mappers/feature_overlap.py +0 -0
  40. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/mappers/liftover.py +0 -0
  41. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/mappers/mane_transcript.py +0 -0
  42. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/resources/__init__.py +0 -0
  43. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/resources/data_files.py +0 -0
  44. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/resources/status.py +0 -0
  45. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/resources/transcript_mapping.tsv +0 -0
  46. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/schemas.py +0 -0
  47. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/sources/__init__.py +0 -0
  48. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/sources/mane_transcript_mappings.py +0 -0
  49. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/sources/transcript_mappings.py +0 -0
  50. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/sources/uta_database.py +0 -0
  51. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool/utils.py +0 -0
  52. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool.egg-info/SOURCES.txt +0 -0
  53. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool.egg-info/dependency_links.txt +0 -0
  54. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool.egg-info/requires.txt +0 -0
  55. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/src/cool_seq_tool.egg-info/top_level.txt +0 -0
  56. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/tests/conftest.py +0 -0
  57. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/tests/handlers/test_feature_overlap.py +0 -0
  58. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/tests/handlers/test_seqrepo_access.py +0 -0
  59. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/tests/mappers/test_alignment.py +0 -0
  60. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/tests/mappers/test_liftover.py +0 -0
  61. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/tests/mappers/test_mane_transcript.py +0 -0
  62. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/tests/sources/test_mane_transcript_mappings.py +0 -0
  63. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/tests/sources/test_uta_database.py +0 -0
  64. {cool_seq_tool-0.14.3 → cool_seq_tool-0.14.4}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cool_seq_tool
3
- Version: 0.14.3
3
+ Version: 0.14.4
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
@@ -65,6 +65,27 @@ class TxSegment(BaseModelForbidExtra):
65
65
  genomic_location: SequenceLocation = Field(
66
66
  ..., description="The genomic position of a transcript segment."
67
67
  )
68
+ is_exonic: bool = Field(
69
+ default=True, description="If the position occurs on an exon"
70
+ )
71
+
72
+ @model_validator(mode="before")
73
+ def check_seg_pos(cls, values: dict) -> dict: # noqa: N805
74
+ """Ensure that only one of `start` or `end` is set in the
75
+ genomic_location field
76
+
77
+ :param values: The values in the TxSegment class
78
+ :raises ValueError: If `start` and `end` are both set in
79
+ `genomic_location`
80
+ :return: Values in model
81
+ """
82
+ loc = values.get("genomic_location")
83
+ start = getattr(loc, "start", None)
84
+ end = getattr(loc, "end", None)
85
+ if start and end:
86
+ err_msg = "Only one of `start` or `end` may be set as this describes the start or end of a transcript segment"
87
+ raise ValueError(err_msg)
88
+ return values
68
89
 
69
90
  model_config = ConfigDict(
70
91
  json_schema_extra={
@@ -79,6 +100,7 @@ class TxSegment(BaseModelForbidExtra):
79
100
  },
80
101
  "end": 154192135,
81
102
  },
103
+ "is_exonic": True,
82
104
  }
83
105
  }
84
106
  )
@@ -136,6 +158,7 @@ class GenomicTxSeg(BaseModelForbidExtra):
136
158
  },
137
159
  "end": 154192135,
138
160
  },
161
+ "is_exonic": True,
139
162
  },
140
163
  "errors": [],
141
164
  }
@@ -202,6 +225,7 @@ class GenomicTxSegService(BaseModelForbidExtra):
202
225
  },
203
226
  "end": 154192135,
204
227
  },
228
+ "is_exonic": True,
205
229
  },
206
230
  "seg_end": {
207
231
  "exon_ord": 7,
@@ -214,6 +238,7 @@ class GenomicTxSegService(BaseModelForbidExtra):
214
238
  },
215
239
  "start": 154170399,
216
240
  },
241
+ "is_exonic": True,
217
242
  },
218
243
  }
219
244
  }
@@ -895,6 +920,7 @@ class ExonGenomicCoordsMapper:
895
920
  # Check if breakpoint occurs on an exon.
896
921
  # If not, determine the adjacent exon given the selected transcript
897
922
  if not self._is_exonic_breakpoint(genomic_pos, tx_exons):
923
+ is_exonic = False
898
924
  exon_num = self._get_adjacent_exon(
899
925
  tx_exons_genomic_coords=tx_exons,
900
926
  strand=strand,
@@ -902,6 +928,7 @@ class ExonGenomicCoordsMapper:
902
928
  end=genomic_pos if not is_seg_start else None,
903
929
  )
904
930
  else:
931
+ is_exonic = True
905
932
  exon_data = await self.uta_db.get_tx_exon_aln_v_data(
906
933
  transcript,
907
934
  genomic_pos,
@@ -934,6 +961,7 @@ class ExonGenomicCoordsMapper:
934
961
  exon_ord=exon_num,
935
962
  offset=offset,
936
963
  genomic_location=genomic_location,
964
+ is_exonic=is_exonic,
937
965
  ),
938
966
  )
939
967
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cool_seq_tool
3
- Version: 0.14.3
3
+ Version: 0.14.4
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
@@ -184,6 +184,7 @@ def tpm3_exon1():
184
184
  },
185
185
  "end": 154192135,
186
186
  },
187
+ "is_exonic": True,
187
188
  },
188
189
  }
189
190
  return GenomicTxSeg(**params)
@@ -208,6 +209,7 @@ def tpm3_exon8():
208
209
  },
209
210
  "start": 154170399,
210
211
  },
212
+ "is_exonic": True,
211
213
  },
212
214
  }
213
215
  return GenomicTxSeg(**params)
@@ -293,6 +295,7 @@ def mane_braf():
293
295
  },
294
296
  "end": 140801559,
295
297
  },
298
+ "is_exonic": True,
296
299
  },
297
300
  "seg_end": {
298
301
  "exon_ord": 14,
@@ -305,6 +308,7 @@ def mane_braf():
305
308
  },
306
309
  "start": 140753336,
307
310
  },
311
+ "is_exonic": True,
308
312
  },
309
313
  }
310
314
  return GenomicTxSegService(**params)
@@ -438,6 +442,7 @@ def zbtb10_exon3_end():
438
442
  },
439
443
  "end": 80514010,
440
444
  },
445
+ "is_exonic": False,
441
446
  },
442
447
  }
443
448
  return GenomicTxSegService(**params)
@@ -462,6 +467,7 @@ def zbtb10_exon5_start():
462
467
  },
463
468
  "start": 80518580,
464
469
  },
470
+ "is_exonic": False,
465
471
  },
466
472
  "seg_end": None,
467
473
  }
@@ -488,6 +494,7 @@ def tpm3_exon6_end():
488
494
  },
489
495
  "start": 154171410,
490
496
  },
497
+ "is_exonic": False,
491
498
  },
492
499
  }
493
500
  return GenomicTxSegService(**params)
@@ -512,6 +519,7 @@ def tpm3_exon5_start():
512
519
  },
513
520
  "end": 154173080,
514
521
  },
522
+ "is_exonic": False,
515
523
  },
516
524
  "seg_end": None,
517
525
  }
@@ -538,6 +546,7 @@ def gusbp3_exon2_end():
538
546
  },
539
547
  "start": 69680764,
540
548
  },
549
+ "is_exonic": False,
541
550
  },
542
551
  }
543
552
  return GenomicTxSegService(**params)
@@ -562,6 +571,7 @@ def eln_grch38_intronic():
562
571
  },
563
572
  "start": 74028173,
564
573
  },
574
+ "is_exonic": True,
565
575
  },
566
576
  "seg_end": {
567
577
  "exon_ord": 7,
@@ -574,6 +584,7 @@ def eln_grch38_intronic():
574
584
  },
575
585
  "end": 74043599,
576
586
  },
587
+ "is_exonic": False,
577
588
  },
578
589
  }
579
590
  return GenomicTxSegService(**params)
@@ -598,6 +609,7 @@ def gusbp3_exon5_start():
598
609
  },
599
610
  "end": 69645878,
600
611
  },
612
+ "is_exonic": False,
601
613
  },
602
614
  "seg_end": None,
603
615
  }
@@ -648,6 +660,7 @@ def genomic_tx_seg_service_checks(actual, expected=None, is_valid=True):
648
660
  assert (
649
661
  actual_seg.genomic_location.end == expected_seg.genomic_location.end
650
662
  )
663
+ assert actual_seg.is_exonic == expected_seg.is_exonic
651
664
 
652
665
  assert actual.errors == expected.errors
653
666
  else:
@@ -715,6 +728,7 @@ def genomic_tx_seg_checks(actual, expected=None, is_valid=True):
715
728
  actual_seg.genomic_location.start == expected_seg.genomic_location.start
716
729
  )
717
730
  assert actual_seg.genomic_location.end == expected_seg.genomic_location.end
731
+ assert actual_seg.is_exonic == expected_seg.is_exonic
718
732
 
719
733
  assert actual.errors == expected.errors
720
734
  else:
File without changes
File without changes
File without changes