cool-seq-tool 0.7.1__py3-none-any.whl → 0.8.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.
@@ -87,7 +87,9 @@ class GenomicTxSeg(BaseModelForbidExtra):
87
87
  """Model for representing a boundary for a transcript segment."""
88
88
 
89
89
  seg: TxSegment | None = Field(None, description="Transcript segment.")
90
- gene: StrictStr | None = Field(None, description="HGNC gene symbol.")
90
+ gene: StrictStr | None = Field(
91
+ None, description="Valid, case-sensitive HGNC gene symbol."
92
+ )
91
93
  genomic_ac: StrictStr | None = Field(None, description="RefSeq genomic accession.")
92
94
  tx_ac: StrictStr | None = Field(None, description="RefSeq transcript accession.")
93
95
  errors: list[StrictStr] = Field([], description="Error messages.")
@@ -139,7 +141,9 @@ class GenomicTxSeg(BaseModelForbidExtra):
139
141
  class GenomicTxSegService(BaseModelForbidExtra):
140
142
  """Service model for genomic and transcript data."""
141
143
 
142
- gene: StrictStr | None = Field(None, description="HGNC gene symbol.")
144
+ gene: StrictStr | None = Field(
145
+ None, description="Valid, case-sensitive HGNC gene symbol."
146
+ )
143
147
  genomic_ac: StrictStr | None = Field(None, description="RefSeq genomic accession.")
144
148
  tx_ac: StrictStr | None = Field(None, description="RefSeq transcript accession.")
145
149
  seg_start: TxSegment | None = Field(None, description="Start transcript segment.")
@@ -292,7 +296,7 @@ class ExonGenomicCoordsMapper:
292
296
  ('NC_000001.11', 154192135, 154170399)
293
297
 
294
298
  :param transcript: RefSeq transcript accession
295
- :param gene: HGNC gene symbol
299
+ :param gene: Valid, case-sensitive HGNC gene symbol
296
300
  :param exon_start: Starting transcript exon number (1-based). If not provided,
297
301
  must provide ``exon_end``
298
302
  :param exon_start_offset: Starting exon offset
@@ -335,9 +339,6 @@ class ExonGenomicCoordsMapper:
335
339
  if errors:
336
340
  return _return_service_errors(errors)
337
341
 
338
- if gene:
339
- gene = gene.upper()
340
-
341
342
  # Get aligned genomic data (hgnc gene, alt_ac, alt_start_i, alt_end_i, strand)
342
343
  # for exon(s)
343
344
  (
@@ -455,7 +456,7 @@ class ExonGenomicCoordsMapper:
455
456
  following the breakpoint for the 3' end. For the negative strand, adjacent
456
457
  is defined as the exon following the breakpoint for the 5' end and the exon
457
458
  preceding the breakpoint for the 3' end.
458
- :param gene: gene name. Ideally, HGNC symbol. Must be given if no ``transcript``
459
+ :param gene: A valid, case-sensitive HGNC symbol. Must be given if no ``transcript``
459
460
  value is provided.
460
461
  :param coordinate_type: Coordinate type for ``seg_start_genomic`` and
461
462
  ``seg_end_genomic``
@@ -473,9 +474,6 @@ class ExonGenomicCoordsMapper:
473
474
  if errors:
474
475
  return _return_service_errors(errors)
475
476
 
476
- if gene is not None:
477
- gene = gene.upper()
478
-
479
477
  params = {}
480
478
 
481
479
  if seg_start_genomic:
@@ -630,7 +628,7 @@ class ExonGenomicCoordsMapper:
630
628
  must provide ``tx_exon_end``
631
629
  :param tx_exon_end: Transcript's exon end coordinates. If not provided, must
632
630
  provide ``tx_exon_start``
633
- :param gene: HGNC gene symbol
631
+ :param gene: A valid, case-sensitive HGNC gene symbol
634
632
  :return: Tuple containing aligned genomic data for start and end exon and
635
633
  warnings if found
636
634
  """
@@ -755,7 +753,7 @@ class ExonGenomicCoordsMapper:
755
753
  :param transcript: The transcript to use. If this is not given, we will try the
756
754
  following transcripts: MANE Select, MANE Clinical Plus, Longest Remaining
757
755
  Compatible Transcript
758
- :param gene: HGNC gene symbol
756
+ :param gene: Valid, case-sensitive HGNC gene symbol
759
757
  :param get_nearest_transcript_junction: If ``True``, this will return the
760
758
  adjacent exon if the position specified by``seg_start_genomic`` or
761
759
  ``seg_end_genomic`` does not occur on an exon. For the positive strand, adjacent
@@ -1062,7 +1060,7 @@ class ExonGenomicCoordsMapper:
1062
1060
  :param genomic_ac: Genomic RefSeq accession
1063
1061
  :param genomic_pos: Genomic position where the transcript segment occurs
1064
1062
  :param is_seg_start: Whether or not ``genomic_pos`` represents the start position.
1065
- :param gene: HGNC gene symbol
1063
+ :param gene: Valid, case-sensitive HGNC gene symbol
1066
1064
  :param tx_ac: Transcript RefSeq accession. If not provided, will use MANE
1067
1065
  transcript
1068
1066
  :return: Transcript segment data and associated genomic metadata
@@ -61,7 +61,9 @@ class ManeTranscriptMappings:
61
61
  location information). The list is sorted so that a MANE Select entry comes
62
62
  first, followed by a MANE Plus Clinical entry, if available.
63
63
  """
64
- data = self.df.filter(pl.col("symbol") == gene_symbol.upper())
64
+ data = self.df.filter(
65
+ pl.col("symbol").str.to_uppercase() == gene_symbol.upper()
66
+ )
65
67
 
66
68
  if len(data) == 0:
67
69
  _logger.warning(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cool_seq_tool
3
- Version: 0.7.1
3
+ Version: 0.8.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
@@ -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=O0JRxNFk8nWxD4v5ij47xelhvfVLdEXS43l2tzRuiUE,305
8
8
  cool_seq_tool/mappers/alignment.py,sha256=nV6PS3mhkQ2MD1GcpNBujBOqd3AKxYSYA9BCusFOa1o,9636
9
- cool_seq_tool/mappers/exon_genomic_coords.py,sha256=lfmzuVXaYT7w2FBDS3xhJNgETusllomFy5Utzhfhlpc,48782
9
+ cool_seq_tool/mappers/exon_genomic_coords.py,sha256=XoG60ha1JDoAI-vlc-0rh3tFSyKx61u49hVyeBpjPME,48836
10
10
  cool_seq_tool/mappers/liftover.py,sha256=lltx9zxfkrb5PHtJlKp3a39JCwPP4e0Zft-mQc1jXL8,3367
11
11
  cool_seq_tool/mappers/mane_transcript.py,sha256=nirxlf3EGVInFYG4fsAqiEmDdTc_h1XuPyX2ul-a7Rk,54368
12
12
  cool_seq_tool/resources/__init__.py,sha256=VwUC8YaucTS6SmRirToulZTF6CuvuLQRSxFfSfAovCc,77
@@ -14,11 +14,11 @@ cool_seq_tool/resources/data_files.py,sha256=3lhu28tzlSoTs4vHZNu-hhoAWRrPGuZj_oI
14
14
  cool_seq_tool/resources/status.py,sha256=L0KM-VG3N4Yuaqh3AKZd_2KPDLR0Y7rvW_OD6x8mF7A,5717
15
15
  cool_seq_tool/resources/transcript_mapping.tsv,sha256=AO3luYQAbFiCoRgiiPXotakb5pAwx1jDCeXpvGdIuac,24138769
16
16
  cool_seq_tool/sources/__init__.py,sha256=51QiymeptF7AeVGgV-tW_9f4pIUr0xtYbyzpvHOCneM,304
17
- cool_seq_tool/sources/mane_transcript_mappings.py,sha256=E_pj7FEBcB6HUR8yhSVibB0beMMlKJ62pK0qvl4y5nw,5358
17
+ cool_seq_tool/sources/mane_transcript_mappings.py,sha256=Q6J57O2lLWXlgKT0zq3BIwkwFawySnORHOX-UxzfyDE,5399
18
18
  cool_seq_tool/sources/transcript_mappings.py,sha256=903RKTMBO2rbKh6iTQ1BEWnY4C7saBFMPw2_4ATuudg,10054
19
19
  cool_seq_tool/sources/uta_database.py,sha256=gc5wsKOIhvzhwFmPmqOY0hhaVfRkRSzYNa9tpBt81_U,35017
20
- cool_seq_tool-0.7.1.dist-info/LICENSE,sha256=IpqC9A-tZW7XXXvCS8c4AVINqkmpxiVA-34Qe3CZSjo,1072
21
- cool_seq_tool-0.7.1.dist-info/METADATA,sha256=Y9_RZI2iHpmNOFwXoFCCKyHs6aXmNrzKQfyHkmqUVmQ,6226
22
- cool_seq_tool-0.7.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
23
- cool_seq_tool-0.7.1.dist-info/top_level.txt,sha256=cGuxdN6p3y16jQf6hCwWhE4OptwUeZPm_PNJlPb3b0k,14
24
- cool_seq_tool-0.7.1.dist-info/RECORD,,
20
+ cool_seq_tool-0.8.0.dist-info/LICENSE,sha256=IpqC9A-tZW7XXXvCS8c4AVINqkmpxiVA-34Qe3CZSjo,1072
21
+ cool_seq_tool-0.8.0.dist-info/METADATA,sha256=moL8cCRR-wPQh3t9kJviAVRuvAapZJ40-8Ea8pjIRic,6226
22
+ cool_seq_tool-0.8.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
23
+ cool_seq_tool-0.8.0.dist-info/top_level.txt,sha256=cGuxdN6p3y16jQf6hCwWhE4OptwUeZPm_PNJlPb3b0k,14
24
+ cool_seq_tool-0.8.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (75.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5