cool-seq-tool 0.13.1__py3-none-any.whl → 0.14.0__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.
- cool_seq_tool/mappers/exon_genomic_coords.py +26 -8
- {cool_seq_tool-0.13.1.dist-info → cool_seq_tool-0.14.0.dist-info}/METADATA +1 -1
- {cool_seq_tool-0.13.1.dist-info → cool_seq_tool-0.14.0.dist-info}/RECORD +6 -6
- {cool_seq_tool-0.13.1.dist-info → cool_seq_tool-0.14.0.dist-info}/WHEEL +1 -1
- {cool_seq_tool-0.13.1.dist-info → cool_seq_tool-0.14.0.dist-info}/licenses/LICENSE +0 -0
- {cool_seq_tool-0.13.1.dist-info → cool_seq_tool-0.14.0.dist-info}/top_level.txt +0 -0
@@ -93,6 +93,9 @@ class GenomicTxSeg(BaseModelForbidExtra):
|
|
93
93
|
)
|
94
94
|
genomic_ac: StrictStr | None = Field(None, description="RefSeq genomic accession.")
|
95
95
|
tx_ac: StrictStr | None = Field(None, description="RefSeq transcript accession.")
|
96
|
+
strand: Strand | None = Field(
|
97
|
+
None, description="The strand that the transcript accession exists on."
|
98
|
+
)
|
96
99
|
errors: list[StrictStr] = Field([], description="Error messages.")
|
97
100
|
|
98
101
|
@model_validator(mode="before")
|
@@ -121,6 +124,7 @@ class GenomicTxSeg(BaseModelForbidExtra):
|
|
121
124
|
"gene": "TPM3",
|
122
125
|
"genomic_ac": "NC_000001.11",
|
123
126
|
"tx_ac": "NM_152263.3",
|
127
|
+
"strand": -1,
|
124
128
|
"seg": {
|
125
129
|
"exon_ord": 0,
|
126
130
|
"offset": 0,
|
@@ -147,6 +151,9 @@ class GenomicTxSegService(BaseModelForbidExtra):
|
|
147
151
|
)
|
148
152
|
genomic_ac: StrictStr | None = Field(None, description="RefSeq genomic accession.")
|
149
153
|
tx_ac: StrictStr | None = Field(None, description="RefSeq transcript accession.")
|
154
|
+
strand: Strand | None = Field(
|
155
|
+
None, description="The strand that the transcript exists on."
|
156
|
+
)
|
150
157
|
seg_start: TxSegment | None = Field(None, description="Start transcript segment.")
|
151
158
|
seg_end: TxSegment | None = Field(None, description="End transcript segment.")
|
152
159
|
errors: list[StrictStr] = Field([], description="Error messages.")
|
@@ -183,6 +190,7 @@ class GenomicTxSegService(BaseModelForbidExtra):
|
|
183
190
|
"gene": "TPM3",
|
184
191
|
"genomic_ac": "NC_000001.11",
|
185
192
|
"tx_ac": "NM_152263.3",
|
193
|
+
"strand": -1,
|
186
194
|
"seg_start": {
|
187
195
|
"exon_ord": 0,
|
188
196
|
"offset": 0,
|
@@ -400,6 +408,7 @@ class ExonGenomicCoordsMapper:
|
|
400
408
|
gene=gene,
|
401
409
|
genomic_ac=genomic_ac,
|
402
410
|
tx_ac=transcript,
|
411
|
+
strand=strand,
|
403
412
|
seg_start=seg_start,
|
404
413
|
seg_end=seg_end,
|
405
414
|
)
|
@@ -490,6 +499,7 @@ class ExonGenomicCoordsMapper:
|
|
490
499
|
params["gene"] = start_tx_seg_data.gene
|
491
500
|
params["genomic_ac"] = start_tx_seg_data.genomic_ac
|
492
501
|
params["tx_ac"] = start_tx_seg_data.tx_ac
|
502
|
+
params["strand"] = start_tx_seg_data.strand
|
493
503
|
params["seg_start"] = start_tx_seg_data.seg
|
494
504
|
else:
|
495
505
|
start_tx_seg_data = None
|
@@ -524,6 +534,7 @@ class ExonGenomicCoordsMapper:
|
|
524
534
|
params["gene"] = end_tx_seg_data.gene
|
525
535
|
params["genomic_ac"] = end_tx_seg_data.genomic_ac
|
526
536
|
params["tx_ac"] = end_tx_seg_data.tx_ac
|
537
|
+
params["strand"] = end_tx_seg_data.strand
|
527
538
|
|
528
539
|
params["seg_end"] = end_tx_seg_data.seg
|
529
540
|
|
@@ -865,16 +876,21 @@ class ExonGenomicCoordsMapper:
|
|
865
876
|
if use_alt_start_i and coordinate_type == CoordinateType.RESIDUE:
|
866
877
|
genomic_pos = genomic_pos - 1 # Convert residue coordinate to inter-residue
|
867
878
|
|
868
|
-
# Validate that the breakpoint
|
879
|
+
# Validate that the breakpoint occurs within 150 bp of the first and last exon for the selected transcript.
|
880
|
+
# A breakpoint beyond this range is likely erroneous.
|
869
881
|
coordinate_check = await self._validate_genomic_breakpoint(
|
870
882
|
pos=genomic_pos, genomic_ac=genomic_ac, tx_ac=transcript
|
871
883
|
)
|
872
884
|
if not coordinate_check:
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
885
|
+
msg = (
|
886
|
+
f"{genomic_pos} on {genomic_ac} occurs more than 150 bp outside the "
|
887
|
+
f"exon boundaries of the {transcript} transcript, indicating this may not "
|
888
|
+
f"be a chimeric transcript junction and is unlikely to represent a "
|
889
|
+
f"contiguous coding sequence. Confirm that the genomic position "
|
890
|
+
f"{genomic_pos} is being used to represent transcript junction and not "
|
891
|
+
f"DNA breakpoint."
|
877
892
|
)
|
893
|
+
_logger.warning(msg)
|
878
894
|
|
879
895
|
# Check if breakpoint occurs on an exon.
|
880
896
|
# If not, determine the adjacent exon given the selected transcript
|
@@ -913,6 +929,7 @@ class ExonGenomicCoordsMapper:
|
|
913
929
|
gene=gene,
|
914
930
|
genomic_ac=genomic_ac,
|
915
931
|
tx_ac=transcript,
|
932
|
+
strand=strand,
|
916
933
|
seg=TxSegment(
|
917
934
|
exon_ord=exon_num,
|
918
935
|
offset=offset,
|
@@ -955,8 +972,9 @@ class ExonGenomicCoordsMapper:
|
|
955
972
|
:param pos: Genomic position on ``genomic_ac``
|
956
973
|
:param genomic_ac: RefSeq genomic accession, e.g. ``"NC_000007.14"``
|
957
974
|
:param transcript: A transcript accession
|
958
|
-
:return: ``True`` if the coordinate falls within the first and last exon
|
959
|
-
for the transcript, ``False`` if not
|
975
|
+
:return: ``True`` if the coordinate falls within 150bp of the first and last exon
|
976
|
+
for the transcript, ``False`` if not. Breakpoints past this threshold
|
977
|
+
are likely erroneous.
|
960
978
|
"""
|
961
979
|
query = f"""
|
962
980
|
WITH tx_boundaries AS (
|
@@ -968,7 +986,7 @@ class ExonGenomicCoordsMapper:
|
|
968
986
|
AND alt_ac = '{genomic_ac}'
|
969
987
|
)
|
970
988
|
SELECT * FROM tx_boundaries
|
971
|
-
WHERE {pos} between tx_boundaries.min_start and tx_boundaries.max_end
|
989
|
+
WHERE {pos} between (tx_boundaries.min_start - 150) and (tx_boundaries.max_end + 150)
|
972
990
|
""" # noqa: S608
|
973
991
|
results = await self.uta_db.execute_query(query)
|
974
992
|
return bool(results)
|
@@ -6,7 +6,7 @@ cool_seq_tool/handlers/__init__.py,sha256=KalQ46vX1MO4SJz2SlspKoIRy1n3c3Vp1t4Y2p
|
|
6
6
|
cool_seq_tool/handlers/seqrepo_access.py,sha256=Jd19jbdUvPRPn_XWozL67ph-nSIxpb4_UUimapDrsm4,9162
|
7
7
|
cool_seq_tool/mappers/__init__.py,sha256=4_YNwNyw_QrlhRNu1nly8Dezv81XjCIiNa7crVXEh38,305
|
8
8
|
cool_seq_tool/mappers/alignment.py,sha256=nV6PS3mhkQ2MD1GcpNBujBOqd3AKxYSYA9BCusFOa1o,9636
|
9
|
-
cool_seq_tool/mappers/exon_genomic_coords.py,sha256=
|
9
|
+
cool_seq_tool/mappers/exon_genomic_coords.py,sha256=uPBlI9K_IUV3xN9unnCwd6bPmqpfIWB5I-dksN_JZSw,44765
|
10
10
|
cool_seq_tool/mappers/liftover.py,sha256=lltx9zxfkrb5PHtJlKp3a39JCwPP4e0Zft-mQc1jXL8,3367
|
11
11
|
cool_seq_tool/mappers/mane_transcript.py,sha256=C9eKEj8qhVg878oUhBKPYAZS7gpLM5aaQ0HhSkUg-2g,54365
|
12
12
|
cool_seq_tool/resources/__init__.py,sha256=VwUC8YaucTS6SmRirToulZTF6CuvuLQRSxFfSfAovCc,77
|
@@ -17,8 +17,8 @@ cool_seq_tool/sources/__init__.py,sha256=51QiymeptF7AeVGgV-tW_9f4pIUr0xtYbyzpvHO
|
|
17
17
|
cool_seq_tool/sources/mane_transcript_mappings.py,sha256=C5puIA1xuEzBaSvs8VtSxVb2OIDGUg5no8v6Ma2QSdw,6597
|
18
18
|
cool_seq_tool/sources/transcript_mappings.py,sha256=903RKTMBO2rbKh6iTQ1BEWnY4C7saBFMPw2_4ATuudg,10054
|
19
19
|
cool_seq_tool/sources/uta_database.py,sha256=UHFLeiuk8H29CF1tNjE8T22-QaPs_fDUaqQO6Hu18yg,36175
|
20
|
-
cool_seq_tool-0.
|
21
|
-
cool_seq_tool-0.
|
22
|
-
cool_seq_tool-0.
|
23
|
-
cool_seq_tool-0.
|
24
|
-
cool_seq_tool-0.
|
20
|
+
cool_seq_tool-0.14.0.dist-info/licenses/LICENSE,sha256=IpqC9A-tZW7XXXvCS8c4AVINqkmpxiVA-34Qe3CZSjo,1072
|
21
|
+
cool_seq_tool-0.14.0.dist-info/METADATA,sha256=1BpHtcCsaCUBvpmp1Qe1TVoZFHVvUir685EsH925PJ0,6579
|
22
|
+
cool_seq_tool-0.14.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
23
|
+
cool_seq_tool-0.14.0.dist-info/top_level.txt,sha256=cGuxdN6p3y16jQf6hCwWhE4OptwUeZPm_PNJlPb3b0k,14
|
24
|
+
cool_seq_tool-0.14.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|