cool-seq-tool 0.14.5__tar.gz → 0.15.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.14.5 → cool_seq_tool-0.15.0}/PKG-INFO +2 -2
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/pyproject.toml +1 -1
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/app.py +1 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/mappers/exon_genomic_coords.py +27 -5
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/sources/mane_transcript_mappings.py +17 -1
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool.egg-info/PKG-INFO +2 -2
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool.egg-info/requires.txt +1 -1
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/tests/mappers/test_exon_genomic_coords.py +32 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/tests/sources/test_mane_transcript_mappings.py +10 -1
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.coveragerc +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.github/CODEOWNERS +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.github/ISSUE_TEMPLATE/bug-report.yaml +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.github/ISSUE_TEMPLATE/feature-request.yaml +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.github/workflows/checks.yaml +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.github/workflows/pr-priority-label.yaml +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.github/workflows/release.yml +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.github/workflows/stale.yaml +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.gitignore +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.pre-commit-config.yaml +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/.readthedocs.yaml +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/CITATION.cff +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/LICENSE +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/README.md +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/Makefile +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/make.bat +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/_static/img/biomart.png +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/_templates/module_summary.rst +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/changelog.rst +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/conf.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/contributing.rst +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/index.rst +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/install.rst +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/license.rst +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/reference/index.rst +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/transcript_selection.rst +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/docs/source/usage.rst +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/setup.cfg +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/__init__.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/handlers/__init__.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/handlers/seqrepo_access.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/mappers/__init__.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/mappers/alignment.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/mappers/feature_overlap.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/mappers/liftover.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/mappers/mane_transcript.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/resources/__init__.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/resources/data_files.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/resources/status.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/resources/transcript_mapping.tsv +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/schemas.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/sources/__init__.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/sources/transcript_mappings.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/sources/uta_database.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/utils.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool.egg-info/SOURCES.txt +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool.egg-info/dependency_links.txt +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool.egg-info/top_level.txt +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/tests/conftest.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/tests/handlers/test_feature_overlap.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/tests/handlers/test_seqrepo_access.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/tests/mappers/test_alignment.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/tests/mappers/test_liftover.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/tests/mappers/test_mane_transcript.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/tests/sources/test_uta_database.py +0 -0
- {cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/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.
|
3
|
+
Version: 0.15.0
|
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
|
@@ -50,7 +50,7 @@ Requires-Dist: agct>=0.1.0-dev1
|
|
50
50
|
Requires-Dist: polars~=1.0
|
51
51
|
Requires-Dist: biocommons.seqrepo
|
52
52
|
Requires-Dist: pydantic<3.0,>=2.0
|
53
|
-
Requires-Dist: ga4gh.vrs<3.0,>=2.1.
|
53
|
+
Requires-Dist: ga4gh.vrs<3.0,>=2.1.4
|
54
54
|
Requires-Dist: wags-tails~=0.4.0
|
55
55
|
Requires-Dist: bioutils
|
56
56
|
Provides-Extra: dev
|
{cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/mappers/exon_genomic_coords.py
RENAMED
@@ -8,12 +8,15 @@ from pydantic import ConfigDict, Field, StrictInt, StrictStr, model_validator
|
|
8
8
|
|
9
9
|
from cool_seq_tool.handlers.seqrepo_access import SeqRepoAccess
|
10
10
|
from cool_seq_tool.mappers.liftover import LiftOver
|
11
|
+
from cool_seq_tool.mappers.mane_transcript import ManeTranscript
|
11
12
|
from cool_seq_tool.schemas import (
|
13
|
+
AnnotationLayer,
|
12
14
|
Assembly,
|
13
15
|
BaseModelForbidExtra,
|
14
16
|
CoordinateType,
|
15
17
|
ServiceMeta,
|
16
18
|
Strand,
|
19
|
+
TranscriptPriority,
|
17
20
|
)
|
18
21
|
from cool_seq_tool.sources.mane_transcript_mappings import ManeTranscriptMappings
|
19
22
|
from cool_seq_tool.sources.uta_database import GenomicAlnData, UtaDatabase
|
@@ -113,6 +116,9 @@ class GenomicTxSeg(BaseModelForbidExtra):
|
|
113
116
|
)
|
114
117
|
genomic_ac: StrictStr | None = Field(None, description="RefSeq genomic accession.")
|
115
118
|
tx_ac: StrictStr | None = Field(None, description="RefSeq transcript accession.")
|
119
|
+
tx_status: TranscriptPriority | None = Field(
|
120
|
+
None, description="Transcript priority for RefSeq transcript accession"
|
121
|
+
)
|
116
122
|
strand: Strand | None = Field(
|
117
123
|
None, description="The strand that the transcript accession exists on."
|
118
124
|
)
|
@@ -144,6 +150,7 @@ class GenomicTxSeg(BaseModelForbidExtra):
|
|
144
150
|
"gene": "TPM3",
|
145
151
|
"genomic_ac": "NC_000001.11",
|
146
152
|
"tx_ac": "NM_152263.3",
|
153
|
+
"tx_status": "longest_compatible_remaining",
|
147
154
|
"strand": -1,
|
148
155
|
"seg": {
|
149
156
|
"exon_ord": 0,
|
@@ -172,6 +179,9 @@ class GenomicTxSegService(BaseModelForbidExtra):
|
|
172
179
|
)
|
173
180
|
genomic_ac: StrictStr | None = Field(None, description="RefSeq genomic accession.")
|
174
181
|
tx_ac: StrictStr | None = Field(None, description="RefSeq transcript accession.")
|
182
|
+
tx_status: TranscriptPriority | None = Field(
|
183
|
+
None, description="Transcript priority for RefSeq transcript accession"
|
184
|
+
)
|
175
185
|
strand: Strand | None = Field(
|
176
186
|
None, description="The strand that the transcript exists on."
|
177
187
|
)
|
@@ -211,6 +221,7 @@ class GenomicTxSegService(BaseModelForbidExtra):
|
|
211
221
|
"gene": "TPM3",
|
212
222
|
"genomic_ac": "NC_000001.11",
|
213
223
|
"tx_ac": "NM_152263.3",
|
224
|
+
"tx_status": "longest_compatible_remaining",
|
214
225
|
"strand": -1,
|
215
226
|
"seg_start": {
|
216
227
|
"exon_ord": 0,
|
@@ -264,6 +275,7 @@ class ExonGenomicCoordsMapper:
|
|
264
275
|
self,
|
265
276
|
seqrepo_access: SeqRepoAccess,
|
266
277
|
uta_db: UtaDatabase,
|
278
|
+
mane_transcript: ManeTranscript,
|
267
279
|
mane_transcript_mappings: ManeTranscriptMappings,
|
268
280
|
liftover: LiftOver,
|
269
281
|
) -> None:
|
@@ -288,11 +300,13 @@ class ExonGenomicCoordsMapper:
|
|
288
300
|
|
289
301
|
:param seqrepo_access: SeqRepo instance to give access to query SeqRepo database
|
290
302
|
:param uta_db: UtaDatabase instance to give access to query UTA database
|
303
|
+
:param mane_transcript: ManeTranscript instance to give access to ManeTranscript class
|
291
304
|
:param mane_transcript_mappings: Instance to provide access to ManeTranscriptMappings class
|
292
305
|
:param liftover: Instance to provide mapping between human genome assemblies
|
293
306
|
"""
|
294
307
|
self.seqrepo_access = seqrepo_access
|
295
308
|
self.uta_db = uta_db
|
309
|
+
self.mane_transcript = mane_transcript
|
296
310
|
self.mane_transcript_mappings = mane_transcript_mappings
|
297
311
|
self.liftover = liftover
|
298
312
|
|
@@ -431,6 +445,7 @@ class ExonGenomicCoordsMapper:
|
|
431
445
|
gene=gene,
|
432
446
|
genomic_ac=genomic_ac,
|
433
447
|
tx_ac=transcript,
|
448
|
+
tx_status=self.mane_transcript_mappings.get_transcript_status(transcript),
|
434
449
|
strand=strand,
|
435
450
|
seg_start=seg_start,
|
436
451
|
seg_end=seg_end,
|
@@ -522,6 +537,7 @@ class ExonGenomicCoordsMapper:
|
|
522
537
|
params["gene"] = start_tx_seg_data.gene
|
523
538
|
params["genomic_ac"] = start_tx_seg_data.genomic_ac
|
524
539
|
params["tx_ac"] = start_tx_seg_data.tx_ac
|
540
|
+
params["tx_status"] = start_tx_seg_data.tx_status
|
525
541
|
params["strand"] = start_tx_seg_data.strand
|
526
542
|
params["seg_start"] = start_tx_seg_data.seg
|
527
543
|
else:
|
@@ -557,6 +573,7 @@ class ExonGenomicCoordsMapper:
|
|
557
573
|
params["gene"] = end_tx_seg_data.gene
|
558
574
|
params["genomic_ac"] = end_tx_seg_data.genomic_ac
|
559
575
|
params["tx_ac"] = end_tx_seg_data.tx_ac
|
576
|
+
params["tx_status"] = end_tx_seg_data.tx_status
|
560
577
|
params["strand"] = end_tx_seg_data.strand
|
561
578
|
|
562
579
|
params["seg_end"] = end_tx_seg_data.seg
|
@@ -858,14 +875,18 @@ class ExonGenomicCoordsMapper:
|
|
858
875
|
if mane_transcripts:
|
859
876
|
transcript = mane_transcripts[0]["RefSeq_nuc"]
|
860
877
|
else:
|
861
|
-
# Attempt to find
|
878
|
+
# Attempt to find longest compatible transcript if a MANE transcript
|
862
879
|
# cannot be found
|
863
|
-
results = await self.
|
864
|
-
|
880
|
+
results = await self.mane_transcript.get_longest_compatible_transcript(
|
881
|
+
start_pos=genomic_pos,
|
882
|
+
end_pos=genomic_pos,
|
883
|
+
gene=gene,
|
884
|
+
alt_ac=genomic_ac,
|
885
|
+
start_annotation_layer=AnnotationLayer.GENOMIC,
|
865
886
|
)
|
866
887
|
|
867
|
-
if
|
868
|
-
transcript = results
|
888
|
+
if results:
|
889
|
+
transcript = results.refseq
|
869
890
|
else:
|
870
891
|
# Run if gene is for a noncoding transcript
|
871
892
|
query = f"""
|
@@ -962,6 +983,7 @@ class ExonGenomicCoordsMapper:
|
|
962
983
|
gene=gene,
|
963
984
|
genomic_ac=genomic_ac,
|
964
985
|
tx_ac=transcript,
|
986
|
+
tx_status=self.mane_transcript_mappings.get_transcript_status(transcript),
|
965
987
|
strand=strand,
|
966
988
|
seg=TxSegment(
|
967
989
|
exon_ord=exon_num,
|
{cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/sources/mane_transcript_mappings.py
RENAMED
@@ -8,7 +8,7 @@ from pathlib import Path
|
|
8
8
|
import polars as pl
|
9
9
|
|
10
10
|
from cool_seq_tool.resources.data_files import DataFile, get_data_file
|
11
|
-
from cool_seq_tool.schemas import ManeGeneData
|
11
|
+
from cool_seq_tool.schemas import ManeGeneData, TranscriptPriority
|
12
12
|
|
13
13
|
_logger = logging.getLogger(__name__)
|
14
14
|
|
@@ -85,6 +85,22 @@ class ManeTranscriptMappings:
|
|
85
85
|
return []
|
86
86
|
return mane_rows.to_dicts()
|
87
87
|
|
88
|
+
def get_transcript_status(self, tx_ac: str) -> TranscriptPriority:
|
89
|
+
"""Get MANE status for a transcript
|
90
|
+
|
91
|
+
:param tx_ac: A RefSeq transcript accession
|
92
|
+
:return: A TranscriptPriority object
|
93
|
+
"""
|
94
|
+
mane_info = self.get_mane_from_transcripts([tx_ac])
|
95
|
+
if not mane_info:
|
96
|
+
return TranscriptPriority.LONGEST_COMPATIBLE_REMAINING
|
97
|
+
mane_info = mane_info[0]["MANE_status"]
|
98
|
+
return (
|
99
|
+
TranscriptPriority.MANE_SELECT
|
100
|
+
if mane_info == "MANE Select"
|
101
|
+
else TranscriptPriority.MANE_PLUS_CLINICAL
|
102
|
+
)
|
103
|
+
|
88
104
|
def get_mane_data_from_chr_pos(
|
89
105
|
self, alt_ac: str, start: int, end: int
|
90
106
|
) -> list[dict]:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cool_seq_tool
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.15.0
|
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
|
@@ -50,7 +50,7 @@ Requires-Dist: agct>=0.1.0-dev1
|
|
50
50
|
Requires-Dist: polars~=1.0
|
51
51
|
Requires-Dist: biocommons.seqrepo
|
52
52
|
Requires-Dist: pydantic<3.0,>=2.0
|
53
|
-
Requires-Dist: ga4gh.vrs<3.0,>=2.1.
|
53
|
+
Requires-Dist: ga4gh.vrs<3.0,>=2.1.4
|
54
54
|
Requires-Dist: wags-tails~=0.4.0
|
55
55
|
Requires-Dist: bioutils
|
56
56
|
Provides-Extra: dev
|
@@ -172,6 +172,7 @@ def tpm3_exon1():
|
|
172
172
|
"gene": "TPM3",
|
173
173
|
"genomic_ac": "NC_000001.11",
|
174
174
|
"tx_ac": "NM_152263.3",
|
175
|
+
"tx_status": "longest_compatible_remaining",
|
175
176
|
"strand": -1,
|
176
177
|
"seg": {
|
177
178
|
"exon_ord": 0,
|
@@ -197,6 +198,7 @@ def tpm3_exon8():
|
|
197
198
|
"gene": "TPM3",
|
198
199
|
"genomic_ac": "NC_000001.11",
|
199
200
|
"tx_ac": "NM_152263.3",
|
201
|
+
"tx_status": "longest_compatible_remaining",
|
200
202
|
"strand": -1,
|
201
203
|
"seg": {
|
202
204
|
"exon_ord": 7,
|
@@ -222,6 +224,7 @@ def tpm3_exon1_g(tpm3_exon1):
|
|
222
224
|
"gene": tpm3_exon1.gene,
|
223
225
|
"genomic_ac": tpm3_exon1.genomic_ac,
|
224
226
|
"tx_ac": tpm3_exon1.tx_ac,
|
227
|
+
"tx_status": tpm3_exon1.tx_status,
|
225
228
|
"strand": tpm3_exon1.strand,
|
226
229
|
"seg_start": tpm3_exon1.seg,
|
227
230
|
}
|
@@ -235,6 +238,7 @@ def tpm3_exon8_g(tpm3_exon8):
|
|
235
238
|
"gene": tpm3_exon8.gene,
|
236
239
|
"genomic_ac": tpm3_exon8.genomic_ac,
|
237
240
|
"tx_ac": tpm3_exon8.tx_ac,
|
241
|
+
"tx_status": tpm3_exon8.tx_status,
|
238
242
|
"strand": tpm3_exon8.strand,
|
239
243
|
"seg_end": tpm3_exon8.seg,
|
240
244
|
}
|
@@ -248,6 +252,7 @@ def tpm3_exon1_exon8(tpm3_exon1, tpm3_exon8):
|
|
248
252
|
"gene": tpm3_exon8.gene,
|
249
253
|
"genomic_ac": tpm3_exon8.genomic_ac,
|
250
254
|
"tx_ac": tpm3_exon8.tx_ac,
|
255
|
+
"tx_status": tpm3_exon8.tx_status,
|
251
256
|
"strand": tpm3_exon8.strand,
|
252
257
|
"seg_start": tpm3_exon1.seg,
|
253
258
|
"seg_end": tpm3_exon8.seg,
|
@@ -269,6 +274,7 @@ def tpm3_exon1_exon8_offset(tpm3_exon1, tpm3_exon8):
|
|
269
274
|
"gene": "TPM3",
|
270
275
|
"genomic_ac": "NC_000001.11",
|
271
276
|
"tx_ac": "NM_152263.3",
|
277
|
+
"tx_status": "longest_compatible_remaining",
|
272
278
|
"strand": -1,
|
273
279
|
"seg_start": tpm3_exon1_cpy.seg,
|
274
280
|
"seg_end": tpm3_exon8_cpy.seg,
|
@@ -283,6 +289,7 @@ def mane_braf():
|
|
283
289
|
"gene": "BRAF",
|
284
290
|
"genomic_ac": "NC_000007.14",
|
285
291
|
"tx_ac": "NM_004333.6",
|
292
|
+
"tx_status": "mane_select",
|
286
293
|
"strand": -1,
|
287
294
|
"seg_start": {
|
288
295
|
"exon_ord": 5,
|
@@ -321,6 +328,7 @@ def wee1_exon2_exon11():
|
|
321
328
|
"gene": "WEE1",
|
322
329
|
"genomic_ac": "NC_000011.10",
|
323
330
|
"tx_ac": "NM_003390.3",
|
331
|
+
"tx_status": "longest_compatible_remaining",
|
324
332
|
"strand": 1,
|
325
333
|
"seg_start": {
|
326
334
|
"exon_ord": 1,
|
@@ -359,6 +367,7 @@ def mane_wee1_exon2_exon11():
|
|
359
367
|
"gene": "WEE1",
|
360
368
|
"genomic_ac": "NC_000011.10",
|
361
369
|
"tx_ac": "NM_003390.4",
|
370
|
+
"tx_status": "mane_select",
|
362
371
|
"strand": 1,
|
363
372
|
"seg_start": {
|
364
373
|
"exon_ord": 1,
|
@@ -397,6 +406,7 @@ def ntrk1_exon10_exon17():
|
|
397
406
|
"gene": "NTRK1",
|
398
407
|
"genomic_ac": "NC_000001.11",
|
399
408
|
"tx_ac": "NM_002529.3",
|
409
|
+
"tx_status": "longest_compatible_remaining",
|
400
410
|
"strand": 1,
|
401
411
|
"seg_start": {
|
402
412
|
"exon_ord": 9,
|
@@ -435,6 +445,7 @@ def zbtb10_exon3_end():
|
|
435
445
|
"gene": "ZBTB10",
|
436
446
|
"genomic_ac": "NC_000008.11",
|
437
447
|
"tx_ac": "NM_001105539.3",
|
448
|
+
"tx_status": "mane_select",
|
438
449
|
"strand": 1,
|
439
450
|
"seg_start": None,
|
440
451
|
"seg_end": {
|
@@ -461,6 +472,7 @@ def zbtb10_exon5_start():
|
|
461
472
|
"gene": "ZBTB10",
|
462
473
|
"genomic_ac": "NC_000008.11",
|
463
474
|
"tx_ac": "NM_001105539.3",
|
475
|
+
"tx_status": "mane_select",
|
464
476
|
"strand": 1,
|
465
477
|
"seg_start": {
|
466
478
|
"exon_ord": 4,
|
@@ -487,6 +499,7 @@ def tpm3_exon6_end():
|
|
487
499
|
"gene": "TPM3",
|
488
500
|
"genomic_ac": "NC_000001.11",
|
489
501
|
"tx_ac": "NM_152263.4",
|
502
|
+
"tx_status": "mane_select",
|
490
503
|
"strand": -1,
|
491
504
|
"seg_start": None,
|
492
505
|
"seg_end": {
|
@@ -513,6 +526,7 @@ def tpm3_exon5_start():
|
|
513
526
|
"gene": "TPM3",
|
514
527
|
"genomic_ac": "NC_000001.11",
|
515
528
|
"tx_ac": "NM_152263.4",
|
529
|
+
"tx_status": "mane_select",
|
516
530
|
"strand": -1,
|
517
531
|
"seg_start": {
|
518
532
|
"exon_ord": 4,
|
@@ -539,6 +553,7 @@ def gusbp3_exon2_end():
|
|
539
553
|
"gene": "GUSBP3",
|
540
554
|
"genomic_ac": "NC_000005.10",
|
541
555
|
"tx_ac": "NR_027386.2",
|
556
|
+
"tx_status": "longest_compatible_remaining",
|
542
557
|
"strand": -1,
|
543
558
|
"seg_start": None,
|
544
559
|
"seg_end": {
|
@@ -565,6 +580,7 @@ def eln_grch38_intronic():
|
|
565
580
|
"gene": "ELN",
|
566
581
|
"genomic_ac": "NC_000007.14",
|
567
582
|
"tx_ac": "NM_000501.4",
|
583
|
+
"tx_status": "mane_select",
|
568
584
|
"strand": 1,
|
569
585
|
"seg_start": {
|
570
586
|
"exon_ord": 0,
|
@@ -603,6 +619,7 @@ def gusbp3_exon5_start():
|
|
603
619
|
"gene": "GUSBP3",
|
604
620
|
"genomic_ac": "NC_000005.10",
|
605
621
|
"tx_ac": "NR_027386.2",
|
622
|
+
"tx_status": "longest_compatible_remaining",
|
606
623
|
"strand": -1,
|
607
624
|
"seg_start": {
|
608
625
|
"exon_ord": 4,
|
@@ -645,6 +662,7 @@ def genomic_tx_seg_service_checks(actual, expected=None, is_valid=True):
|
|
645
662
|
assert actual.gene == expected.gene
|
646
663
|
assert actual.genomic_ac == expected.genomic_ac
|
647
664
|
assert actual.tx_ac == expected.tx_ac
|
665
|
+
assert actual.tx_status == expected.tx_status
|
648
666
|
assert actual.strand == expected.strand
|
649
667
|
|
650
668
|
for seg_attr in ["seg_start", "seg_end"]:
|
@@ -676,6 +694,7 @@ def genomic_tx_seg_service_checks(actual, expected=None, is_valid=True):
|
|
676
694
|
assert actual.gene is None
|
677
695
|
assert actual.genomic_ac is None
|
678
696
|
assert actual.tx_ac is None
|
697
|
+
assert actual.tx_status is None
|
679
698
|
assert actual.strand is None
|
680
699
|
assert actual.seg_start is None
|
681
700
|
assert actual.seg_end is None
|
@@ -720,6 +739,7 @@ def genomic_tx_seg_checks(actual, expected=None, is_valid=True):
|
|
720
739
|
assert actual.gene == expected.gene
|
721
740
|
assert actual.genomic_ac == expected.genomic_ac
|
722
741
|
assert actual.tx_ac == expected.tx_ac
|
742
|
+
assert actual.tx_status == expected.tx_status
|
723
743
|
assert actual.strand == expected.strand
|
724
744
|
|
725
745
|
expected_seg = expected.seg
|
@@ -747,6 +767,7 @@ def genomic_tx_seg_checks(actual, expected=None, is_valid=True):
|
|
747
767
|
assert actual.gene is None
|
748
768
|
assert actual.genomic_ac is None
|
749
769
|
assert actual.tx_ac is None
|
770
|
+
assert actual.tx_status is None
|
750
771
|
assert actual.strand is None
|
751
772
|
assert actual.seg is None
|
752
773
|
assert len(actual.errors) > 0
|
@@ -1050,6 +1071,17 @@ async def test_genomic_to_transcript_fusion_context(
|
|
1050
1071
|
resp = await test_egc_mapper.genomic_to_tx_segment(**inputs)
|
1051
1072
|
genomic_tx_seg_service_checks(resp, gusbp3_exon5_start)
|
1052
1073
|
|
1074
|
+
# Test case where gene does not have a MANE transcript. We are looking
|
1075
|
+
# to check that the same transcript accession is returned across runs
|
1076
|
+
inputs = {
|
1077
|
+
"genomic_ac": "NC_000001.11",
|
1078
|
+
"seg_end_genomic": 156421555,
|
1079
|
+
"gene": "MIR9-1HG",
|
1080
|
+
}
|
1081
|
+
resp = await test_egc_mapper.genomic_to_tx_segment(**inputs)
|
1082
|
+
assert resp.tx_ac == "NM_001320454.2"
|
1083
|
+
assert resp.tx_status == "longest_compatible_remaining"
|
1084
|
+
|
1053
1085
|
|
1054
1086
|
@pytest.mark.asyncio
|
1055
1087
|
async def test_get_alt_ac_start_and_end(
|
{cool_seq_tool-0.14.5 → cool_seq_tool-0.15.0}/tests/sources/test_mane_transcript_mappings.py
RENAMED
@@ -5,7 +5,7 @@ from unittest.mock import patch
|
|
5
5
|
import polars as pl
|
6
6
|
import pytest
|
7
7
|
|
8
|
-
from cool_seq_tool.schemas import ManeGeneData
|
8
|
+
from cool_seq_tool.schemas import ManeGeneData, TranscriptPriority
|
9
9
|
|
10
10
|
|
11
11
|
@pytest.fixture(scope="module")
|
@@ -168,6 +168,15 @@ def test_get_mane_from_transcripts(
|
|
168
168
|
assert resp == []
|
169
169
|
|
170
170
|
|
171
|
+
def test_get_transcript_status(test_mane_transcript_mappings):
|
172
|
+
"""Test that get_transcript_status works correctly"""
|
173
|
+
actual = test_mane_transcript_mappings.get_transcript_status("NM_152263.4")
|
174
|
+
assert actual == TranscriptPriority.MANE_SELECT
|
175
|
+
|
176
|
+
actual = test_mane_transcript_mappings.get_transcript_status("NM_152263.3")
|
177
|
+
assert actual == TranscriptPriority.LONGEST_COMPATIBLE_REMAINING
|
178
|
+
|
179
|
+
|
171
180
|
def test_get_mane_data_from_chr_pos(
|
172
181
|
test_mane_transcript_mappings, braf_select, braf_plus_clinical
|
173
182
|
):
|
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.14.5 → cool_seq_tool-0.15.0}/src/cool_seq_tool/resources/transcript_mapping.tsv
RENAMED
File without changes
|
File without changes
|
File without changes
|
{cool_seq_tool-0.14.5 → cool_seq_tool-0.15.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.14.5 → cool_seq_tool-0.15.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
|
File without changes
|
File without changes
|