cool-seq-tool 0.14.3__py3-none-any.whl → 0.14.4__py3-none-any.whl

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.
@@ -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
@@ -6,7 +6,7 @@ cool_seq_tool/handlers/__init__.py,sha256=KalQ46vX1MO4SJz2SlspKoIRy1n3c3Vp1t4Y2p
6
6
  cool_seq_tool/handlers/seqrepo_access.py,sha256=lRzPc8V0eZJTlefbHuVKeZTEC8-KcyPzpqX7vx3amu8,9118
7
7
  cool_seq_tool/mappers/__init__.py,sha256=tavpwkNogg_nF1J_kb6Q9jk7ezqdRz063v7BMZ4koLM,390
8
8
  cool_seq_tool/mappers/alignment.py,sha256=kWgYssM8YL-Z13H9GdpL77P7simNcbxltAs9YDXHE54,9640
9
- cool_seq_tool/mappers/exon_genomic_coords.py,sha256=t36NhWo2Rl84dgZY6qO7XFmGpfisjAqC-1ZOTRZxWvg,44757
9
+ cool_seq_tool/mappers/exon_genomic_coords.py,sha256=fV4LyrpHPLRrx6AtV15g93q5XCH3i-y3Wj9tl-Cg8mM,45845
10
10
  cool_seq_tool/mappers/feature_overlap.py,sha256=X5UFClaH6ixRsO2fDLxqjywp-Z0bvNx4uzgBICy394U,9758
11
11
  cool_seq_tool/mappers/liftover.py,sha256=lltx9zxfkrb5PHtJlKp3a39JCwPP4e0Zft-mQc1jXL8,3367
12
12
  cool_seq_tool/mappers/mane_transcript.py,sha256=IluiLBxPQoY-CxkpqpjEBcMlHvrNLa34wdKdQxtKgDY,54613
@@ -18,8 +18,8 @@ cool_seq_tool/sources/__init__.py,sha256=51QiymeptF7AeVGgV-tW_9f4pIUr0xtYbyzpvHO
18
18
  cool_seq_tool/sources/mane_transcript_mappings.py,sha256=C5puIA1xuEzBaSvs8VtSxVb2OIDGUg5no8v6Ma2QSdw,6597
19
19
  cool_seq_tool/sources/transcript_mappings.py,sha256=903RKTMBO2rbKh6iTQ1BEWnY4C7saBFMPw2_4ATuudg,10054
20
20
  cool_seq_tool/sources/uta_database.py,sha256=zzRzmYuybqzEg7zeuQjhK46SPK5GfbiWWNRGNJju8AI,36197
21
- cool_seq_tool-0.14.3.dist-info/licenses/LICENSE,sha256=IpqC9A-tZW7XXXvCS8c4AVINqkmpxiVA-34Qe3CZSjo,1072
22
- cool_seq_tool-0.14.3.dist-info/METADATA,sha256=C-8jHyitpgW7cvaBDKtjfa8ClFsTil9X7yStIY73y3I,6535
23
- cool_seq_tool-0.14.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
24
- cool_seq_tool-0.14.3.dist-info/top_level.txt,sha256=cGuxdN6p3y16jQf6hCwWhE4OptwUeZPm_PNJlPb3b0k,14
25
- cool_seq_tool-0.14.3.dist-info/RECORD,,
21
+ cool_seq_tool-0.14.4.dist-info/licenses/LICENSE,sha256=IpqC9A-tZW7XXXvCS8c4AVINqkmpxiVA-34Qe3CZSjo,1072
22
+ cool_seq_tool-0.14.4.dist-info/METADATA,sha256=gPz48irXCwNUecTcgpKrdrHiBhi8R_Is55S2UYs9Qtk,6535
23
+ cool_seq_tool-0.14.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
24
+ cool_seq_tool-0.14.4.dist-info/top_level.txt,sha256=cGuxdN6p3y16jQf6hCwWhE4OptwUeZPm_PNJlPb3b0k,14
25
+ cool_seq_tool-0.14.4.dist-info/RECORD,,