cool-seq-tool 0.13.1__tar.gz → 0.14.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.
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/PKG-INFO +1 -1
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/mappers/exon_genomic_coords.py +26 -8
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool.egg-info/PKG-INFO +1 -1
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/tests/mappers/test_exon_genomic_coords.py +54 -13
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/.coveragerc +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/.github/ISSUE_TEMPLATE/bug-report.yaml +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/.github/ISSUE_TEMPLATE/feature-request.yaml +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/.github/workflows/checks.yaml +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/.github/workflows/pr-priority-label.yaml +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/.github/workflows/release.yml +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/.github/workflows/stale.yaml +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/.gitignore +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/.pre-commit-config.yaml +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/.readthedocs.yaml +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/CITATION.cff +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/LICENSE +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/README.md +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/Makefile +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/make.bat +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/_static/img/biomart.png +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/_templates/module_summary.rst +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/changelog.rst +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/conf.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/contributing.rst +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/index.rst +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/install.rst +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/license.rst +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/reference/index.rst +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/transcript_selection.rst +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/docs/source/usage.rst +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/pyproject.toml +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/setup.cfg +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/__init__.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/app.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/handlers/__init__.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/handlers/seqrepo_access.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/mappers/__init__.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/mappers/alignment.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/mappers/liftover.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/mappers/mane_transcript.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/resources/__init__.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/resources/data_files.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/resources/status.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/resources/transcript_mapping.tsv +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/schemas.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/sources/__init__.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/sources/mane_transcript_mappings.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/sources/transcript_mappings.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/sources/uta_database.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/utils.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool.egg-info/SOURCES.txt +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool.egg-info/dependency_links.txt +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool.egg-info/requires.txt +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool.egg-info/top_level.txt +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/tests/conftest.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/tests/handlers/test_seqrepo_access.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/tests/mappers/test_alignment.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/tests/mappers/test_liftover.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/tests/mappers/test_mane_transcript.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/tests/sources/test_mane_transcript_mappings.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/tests/sources/test_uta_database.py +0 -0
- {cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/tests/test_utils.py +0 -0
{cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/mappers/exon_genomic_coords.py
RENAMED
@@ -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)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"""Module for testing that Cool Seq Tool works correctly."""
|
2
2
|
|
3
|
+
import logging
|
3
4
|
from datetime import datetime
|
4
5
|
|
5
6
|
import pytest
|
@@ -171,6 +172,7 @@ def tpm3_exon1():
|
|
171
172
|
"gene": "TPM3",
|
172
173
|
"genomic_ac": "NC_000001.11",
|
173
174
|
"tx_ac": "NM_152263.3",
|
175
|
+
"strand": -1,
|
174
176
|
"seg": {
|
175
177
|
"exon_ord": 0,
|
176
178
|
"offset": 0,
|
@@ -194,6 +196,7 @@ def tpm3_exon8():
|
|
194
196
|
"gene": "TPM3",
|
195
197
|
"genomic_ac": "NC_000001.11",
|
196
198
|
"tx_ac": "NM_152263.3",
|
199
|
+
"strand": -1,
|
197
200
|
"seg": {
|
198
201
|
"exon_ord": 7,
|
199
202
|
"offset": 0,
|
@@ -217,6 +220,7 @@ def tpm3_exon1_g(tpm3_exon1):
|
|
217
220
|
"gene": tpm3_exon1.gene,
|
218
221
|
"genomic_ac": tpm3_exon1.genomic_ac,
|
219
222
|
"tx_ac": tpm3_exon1.tx_ac,
|
223
|
+
"strand": tpm3_exon1.strand,
|
220
224
|
"seg_start": tpm3_exon1.seg,
|
221
225
|
}
|
222
226
|
return GenomicTxSegService(**params)
|
@@ -229,6 +233,7 @@ def tpm3_exon8_g(tpm3_exon8):
|
|
229
233
|
"gene": tpm3_exon8.gene,
|
230
234
|
"genomic_ac": tpm3_exon8.genomic_ac,
|
231
235
|
"tx_ac": tpm3_exon8.tx_ac,
|
236
|
+
"strand": tpm3_exon8.strand,
|
232
237
|
"seg_end": tpm3_exon8.seg,
|
233
238
|
}
|
234
239
|
return GenomicTxSegService(**params)
|
@@ -241,6 +246,7 @@ def tpm3_exon1_exon8(tpm3_exon1, tpm3_exon8):
|
|
241
246
|
"gene": tpm3_exon8.gene,
|
242
247
|
"genomic_ac": tpm3_exon8.genomic_ac,
|
243
248
|
"tx_ac": tpm3_exon8.tx_ac,
|
249
|
+
"strand": tpm3_exon8.strand,
|
244
250
|
"seg_start": tpm3_exon1.seg,
|
245
251
|
"seg_end": tpm3_exon8.seg,
|
246
252
|
}
|
@@ -261,6 +267,7 @@ def tpm3_exon1_exon8_offset(tpm3_exon1, tpm3_exon8):
|
|
261
267
|
"gene": "TPM3",
|
262
268
|
"genomic_ac": "NC_000001.11",
|
263
269
|
"tx_ac": "NM_152263.3",
|
270
|
+
"strand": -1,
|
264
271
|
"seg_start": tpm3_exon1_cpy.seg,
|
265
272
|
"seg_end": tpm3_exon8_cpy.seg,
|
266
273
|
}
|
@@ -274,6 +281,7 @@ def mane_braf():
|
|
274
281
|
"gene": "BRAF",
|
275
282
|
"genomic_ac": "NC_000007.14",
|
276
283
|
"tx_ac": "NM_004333.6",
|
284
|
+
"strand": -1,
|
277
285
|
"seg_start": {
|
278
286
|
"exon_ord": 5,
|
279
287
|
"offset": 1,
|
@@ -309,6 +317,7 @@ def wee1_exon2_exon11():
|
|
309
317
|
"gene": "WEE1",
|
310
318
|
"genomic_ac": "NC_000011.10",
|
311
319
|
"tx_ac": "NM_003390.3",
|
320
|
+
"strand": 1,
|
312
321
|
"seg_start": {
|
313
322
|
"exon_ord": 1,
|
314
323
|
"offset": 205,
|
@@ -344,6 +353,7 @@ def mane_wee1_exon2_exon11():
|
|
344
353
|
"gene": "WEE1",
|
345
354
|
"genomic_ac": "NC_000011.10",
|
346
355
|
"tx_ac": "NM_003390.4",
|
356
|
+
"strand": 1,
|
347
357
|
"seg_start": {
|
348
358
|
"exon_ord": 1,
|
349
359
|
"offset": 205,
|
@@ -379,6 +389,7 @@ def ntrk1_exon10_exon17():
|
|
379
389
|
"gene": "NTRK1",
|
380
390
|
"genomic_ac": "NC_000001.11",
|
381
391
|
"tx_ac": "NM_002529.3",
|
392
|
+
"strand": 1,
|
382
393
|
"seg_start": {
|
383
394
|
"exon_ord": 9,
|
384
395
|
"offset": 0,
|
@@ -414,6 +425,7 @@ def zbtb10_exon3_end():
|
|
414
425
|
"gene": "ZBTB10",
|
415
426
|
"genomic_ac": "NC_000008.11",
|
416
427
|
"tx_ac": "NM_001105539.3",
|
428
|
+
"strand": 1,
|
417
429
|
"seg_start": None,
|
418
430
|
"seg_end": {
|
419
431
|
"exon_ord": 2,
|
@@ -438,6 +450,7 @@ def zbtb10_exon5_start():
|
|
438
450
|
"gene": "ZBTB10",
|
439
451
|
"genomic_ac": "NC_000008.11",
|
440
452
|
"tx_ac": "NM_001105539.3",
|
453
|
+
"strand": 1,
|
441
454
|
"seg_start": {
|
442
455
|
"exon_ord": 4,
|
443
456
|
"offset": -201,
|
@@ -462,6 +475,7 @@ def tpm3_exon6_end():
|
|
462
475
|
"gene": "TPM3",
|
463
476
|
"genomic_ac": "NC_000001.11",
|
464
477
|
"tx_ac": "NM_152263.4",
|
478
|
+
"strand": -1,
|
465
479
|
"seg_start": None,
|
466
480
|
"seg_end": {
|
467
481
|
"exon_ord": 5,
|
@@ -486,6 +500,7 @@ def tpm3_exon5_start():
|
|
486
500
|
"gene": "TPM3",
|
487
501
|
"genomic_ac": "NC_000001.11",
|
488
502
|
"tx_ac": "NM_152263.4",
|
503
|
+
"strand": -1,
|
489
504
|
"seg_start": {
|
490
505
|
"exon_ord": 4,
|
491
506
|
"offset": -102,
|
@@ -510,6 +525,7 @@ def gusbp3_exon2_end():
|
|
510
525
|
"gene": "GUSBP3",
|
511
526
|
"genomic_ac": "NC_000005.10",
|
512
527
|
"tx_ac": "NR_027386.2",
|
528
|
+
"strand": -1,
|
513
529
|
"seg_start": None,
|
514
530
|
"seg_end": {
|
515
531
|
"exon_ord": 1,
|
@@ -534,6 +550,7 @@ def eln_grch38_intronic():
|
|
534
550
|
"gene": "ELN",
|
535
551
|
"genomic_ac": "NC_000007.14",
|
536
552
|
"tx_ac": "NM_000501.4",
|
553
|
+
"strand": 1,
|
537
554
|
"seg_start": {
|
538
555
|
"exon_ord": 0,
|
539
556
|
"offset": 1,
|
@@ -569,6 +586,7 @@ def gusbp3_exon5_start():
|
|
569
586
|
"gene": "GUSBP3",
|
570
587
|
"genomic_ac": "NC_000005.10",
|
571
588
|
"tx_ac": "NR_027386.2",
|
589
|
+
"strand": -1,
|
572
590
|
"seg_start": {
|
573
591
|
"exon_ord": 4,
|
574
592
|
"offset": -3589,
|
@@ -609,6 +627,7 @@ def genomic_tx_seg_service_checks(actual, expected=None, is_valid=True):
|
|
609
627
|
assert actual.gene == expected.gene
|
610
628
|
assert actual.genomic_ac == expected.genomic_ac
|
611
629
|
assert actual.tx_ac == expected.tx_ac
|
630
|
+
assert actual.strand == expected.strand
|
612
631
|
|
613
632
|
for seg_attr in ["seg_start", "seg_end"]:
|
614
633
|
expected_seg = getattr(expected, seg_attr)
|
@@ -635,6 +654,7 @@ def genomic_tx_seg_service_checks(actual, expected=None, is_valid=True):
|
|
635
654
|
assert actual.gene is None
|
636
655
|
assert actual.genomic_ac is None
|
637
656
|
assert actual.tx_ac is None
|
657
|
+
assert actual.strand is None
|
638
658
|
assert actual.seg_start is None
|
639
659
|
assert actual.seg_end is None
|
640
660
|
assert len(actual.errors) > 0
|
@@ -678,6 +698,7 @@ def genomic_tx_seg_checks(actual, expected=None, is_valid=True):
|
|
678
698
|
assert actual.gene == expected.gene
|
679
699
|
assert actual.genomic_ac == expected.genomic_ac
|
680
700
|
assert actual.tx_ac == expected.tx_ac
|
701
|
+
assert actual.strand == expected.strand
|
681
702
|
|
682
703
|
expected_seg = expected.seg
|
683
704
|
if expected_seg:
|
@@ -700,6 +721,7 @@ def genomic_tx_seg_checks(actual, expected=None, is_valid=True):
|
|
700
721
|
assert actual.gene is None
|
701
722
|
assert actual.genomic_ac is None
|
702
723
|
assert actual.tx_ac is None
|
724
|
+
assert actual.strand is None
|
703
725
|
assert actual.seg is None
|
704
726
|
assert len(actual.errors) > 0
|
705
727
|
|
@@ -1463,7 +1485,7 @@ async def test_valid_inputs(test_egc_mapper, eln_grch38_intronic):
|
|
1463
1485
|
|
1464
1486
|
|
1465
1487
|
@pytest.mark.asyncio
|
1466
|
-
async def test_invalid(test_egc_mapper):
|
1488
|
+
async def test_invalid(test_egc_mapper, caplog):
|
1467
1489
|
"""Test that invalid queries return `None`."""
|
1468
1490
|
resp = await test_egc_mapper.genomic_to_tx_segment(
|
1469
1491
|
transcript="NM_152263 3",
|
@@ -1507,18 +1529,6 @@ async def test_invalid(test_egc_mapper):
|
|
1507
1529
|
genomic_tx_seg_service_checks(resp, is_valid=False)
|
1508
1530
|
assert resp.errors == ["Genomic accession does not exist in UTA: NC_000035.200"]
|
1509
1531
|
|
1510
|
-
# Invalid coordinates
|
1511
|
-
resp = await test_egc_mapper.genomic_to_tx_segment(
|
1512
|
-
genomic_ac="NC_000001.11",
|
1513
|
-
seg_start_genomic=9999999999998,
|
1514
|
-
seg_end_genomic=9999999999999,
|
1515
|
-
transcript="NM_152263.3",
|
1516
|
-
)
|
1517
|
-
genomic_tx_seg_service_checks(resp, is_valid=False)
|
1518
|
-
assert resp.errors == [
|
1519
|
-
"9999999999998 on NC_000001.11 does not occur within the exons for NM_152263.3"
|
1520
|
-
]
|
1521
|
-
|
1522
1532
|
# Must supply either gene or transcript
|
1523
1533
|
resp = await test_egc_mapper.genomic_to_tx_segment(
|
1524
1534
|
seg_start_genomic=154191901, genomic_ac="NC_000001.11"
|
@@ -1526,6 +1536,37 @@ async def test_invalid(test_egc_mapper):
|
|
1526
1536
|
genomic_tx_seg_service_checks(resp, is_valid=False)
|
1527
1537
|
assert resp.errors == ["Must provide either `gene` or `transcript`"]
|
1528
1538
|
|
1539
|
+
# Check 150 bp warning statement
|
1540
|
+
with caplog.at_level(logging.WARNING):
|
1541
|
+
await test_egc_mapper.genomic_to_tx_segment(
|
1542
|
+
genomic_ac="NC_000001.11",
|
1543
|
+
seg_start_genomic=9999999999998,
|
1544
|
+
seg_end_genomic=9999999999999,
|
1545
|
+
transcript="NM_152263.3",
|
1546
|
+
)
|
1547
|
+
assert any(
|
1548
|
+
(
|
1549
|
+
"9999999999998 on NC_000001.11 occurs more than 150 bp outside the exon "
|
1550
|
+
"boundaries of the NM_152263.3 transcript, indicating this may not be "
|
1551
|
+
"a chimeric transcript junction and is unlikely to represent a "
|
1552
|
+
"contiguous coding sequence. Confirm that the genomic position 9999999999998 is "
|
1553
|
+
"being used to represent transcript junction and not DNA breakpoint."
|
1554
|
+
)
|
1555
|
+
in record.message
|
1556
|
+
for record in caplog.records
|
1557
|
+
)
|
1558
|
+
assert any(
|
1559
|
+
(
|
1560
|
+
"9999999999999 on NC_000001.11 occurs more than 150 bp outside the exon "
|
1561
|
+
"boundaries of the NM_152263.3 transcript, indicating this may not be "
|
1562
|
+
"a chimeric transcript junction and is unlikely to represent a "
|
1563
|
+
"contiguous coding sequence. Confirm that the genomic position 9999999999999 is "
|
1564
|
+
"being used to represent transcript junction and not DNA breakpoint."
|
1565
|
+
)
|
1566
|
+
in record.message
|
1567
|
+
for record in caplog.records
|
1568
|
+
)
|
1569
|
+
|
1529
1570
|
# Exon 22 does not exist
|
1530
1571
|
resp = await test_egc_mapper.tx_segment_to_genomic(
|
1531
1572
|
exon_start=None,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/resources/transcript_mapping.tsv
RENAMED
File without changes
|
File without changes
|
File without changes
|
{cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/sources/mane_transcript_mappings.py
RENAMED
File without changes
|
{cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool/sources/transcript_mappings.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/src/cool_seq_tool.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cool_seq_tool-0.13.1 → cool_seq_tool-0.14.0}/tests/sources/test_mane_transcript_mappings.py
RENAMED
File without changes
|
File without changes
|
File without changes
|