loqusdb 2.7.21__py3-none-any.whl → 2.7.22__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.
loqusdb/__init__.py CHANGED
@@ -4,7 +4,7 @@ from pymongo import ASCENDING, IndexModel
4
4
 
5
5
  logger = logging.getLogger(__name__)
6
6
 
7
- __version__ = "2.7.21"
7
+ __version__ = "2.7.22"
8
8
 
9
9
  INDEXES = {
10
10
  "variant": [
@@ -37,7 +37,7 @@ def build_profile_variant(variant, keep_chr_prefix=None):
37
37
 
38
38
  chrom = variant.CHROM
39
39
  if not keep_chr_prefix:
40
- if chrom.startswith(("chr", "CHR", "Chr")):
40
+ if chrom.lower().startswith("chr"):
41
41
  chrom = chrom[3:]
42
42
 
43
43
  pos = int(variant.POS)
@@ -99,7 +99,7 @@ def get_coords(variant, keep_chr_prefix, genome_build):
99
99
  }
100
100
  chrom = variant.CHROM
101
101
  if not keep_chr_prefix:
102
- if chrom.startswith(("chr", "CHR", "Chr")):
102
+ if chrom.lower().startswith("chr"):
103
103
  chrom = chrom[3:]
104
104
  coordinates["chrom"] = chrom
105
105
  end_chrom = chrom
@@ -121,7 +121,7 @@ def get_coords(variant, keep_chr_prefix, genome_build):
121
121
  other_coordinates = alt.strip("ATCGN").strip("[]").split(":")
122
122
  end_chrom = other_coordinates[0]
123
123
  if not keep_chr_prefix:
124
- if end_chrom.startswith(("chr", "CHR", "Chr")):
124
+ if chrom.lower().startswith("chr"):
125
125
  end_chrom = end_chrom[3:]
126
126
 
127
127
  end = int(other_coordinates[1])
@@ -56,9 +56,13 @@ def export(ctx, outfile, variant_type, freq):
56
56
  if genome == GRCH37 and chrom in existing_chromosomes:
57
57
  ordered_chromosomes.append(chrom)
58
58
  existing_chromosomes.remove(chrom)
59
- elif genome == GRCH38 and chrom[3:] in existing_chromosomes:
60
- ordered_chromosomes.append(chrom)
61
- existing_chromosomes.remove(chrom)
59
+ elif genome == GRCH38:
60
+ if chrom[3:] in existing_chromosomes:
61
+ ordered_chromosomes.append(chrom[3:])
62
+ existing_chromosomes.remove(chrom[3:])
63
+ elif chrom in existing_chromosomes:
64
+ ordered_chromosomes.append(chrom)
65
+ existing_chromosomes.remove(chrom)
62
66
  for chrom in existing_chromosomes:
63
67
  ordered_chromosomes.append(chrom)
64
68
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: loqusdb
3
- Version: 2.7.21
3
+ Version: 2.7.22
4
4
  Summary: A simple observation count database
5
5
  License: MIT
6
6
  Author: Your Name
@@ -1,14 +1,14 @@
1
- loqusdb/__init__.py,sha256=XVjdPPoBf9nwKTdk1RIKAPlBUf5K9iI1qNNMjggiOXU,1415
1
+ loqusdb/__init__.py,sha256=Y0QmFuaSq7ltbH8xOPBqjJ3cGsEyN4XaFW4giE5d4Ps,1415
2
2
  loqusdb/__main__.py,sha256=8FGKySAGaWSzAYMj6HRsxeyiME3V01Idt7HrmN7pSYY,397
3
3
  loqusdb/build_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  loqusdb/build_models/case.py,sha256=AByutEYK2N3kS9JFvyZfPKNZdCpZHCSD0nNHAgaU1Cs,4127
5
- loqusdb/build_models/profile_variant.py,sha256=WzWhxq4HNvf67IknyBWYnMHQzPMZ9eitw_so6lfOkPc,1166
6
- loqusdb/build_models/variant.py,sha256=4_FDSRUGDt-h3lqBJ00kC9QDdTTGzpbEF-s51AjLQLU,8094
5
+ loqusdb/build_models/profile_variant.py,sha256=ORus7IPhMZQyA8C4v822MzXTW4ZXHRSgmTDC7frkfI4,1158
6
+ loqusdb/build_models/variant.py,sha256=QQqCdZCdpeY-l8unc6GVwORBrgjvKpEk85ItD5Toci4,8074
7
7
  loqusdb/commands/__init__.py,sha256=BXAN3UADgqPrkGczzjlLO9GyyQ96dnLnP7n92JlYHgo,603
8
8
  loqusdb/commands/annotate.py,sha256=MGU9EerKYsFx1lkyjQ6ZMUKYuShi0uSTPJCS0cyxq7U,1467
9
9
  loqusdb/commands/cli.py,sha256=lRgOYN3JDE81z3EUdqc5-eU7i0m5XF8p0WZvI3svQ3g,3577
10
10
  loqusdb/commands/delete.py,sha256=BRtm6Uade3l97FBcKFNkiYjks84AhuXYo-2QD8E74A4,2120
11
- loqusdb/commands/export.py,sha256=3eV0pYfkD73qoB0_Y2_wpxV0xOrCAppVoPs9C815zyI,4078
11
+ loqusdb/commands/export.py,sha256=mbRPOaUgPerLpH7ZKwyI2IzStAIsywZMHJystasLYec,4271
12
12
  loqusdb/commands/identity.py,sha256=KLA9c8e6cJFDxtqIa1G6zdHTHK1sz2b3v1Utdtik_4k,787
13
13
  loqusdb/commands/load.py,sha256=pHtjldblUM-HFFgcN5UtoaxGhYmo1yeexqGq4I427qk,4996
14
14
  loqusdb/commands/load_profile.py,sha256=x-T2bzi2SL5kwZhY_3hHQCtGDLao1xkxj1pZaOnzs4U,3436
@@ -49,8 +49,8 @@ loqusdb/utils/profiling.py,sha256=uISq4xfRNPPedoYXS_D4dXphq8odDogfMBm_XfHBTpE,92
49
49
  loqusdb/utils/update.py,sha256=1edJG-u24FgOSxyXAQEiyTG4IyK-Uo3lSIl5qyzcXsI,4433
50
50
  loqusdb/utils/variant.py,sha256=U6nMZRUf5NDDQ74nG0HBCLMnFQVgFAT6eHll_F2uiwc,2087
51
51
  loqusdb/utils/vcf.py,sha256=og8JBYock31v_0CnsoRhuKIJCurLCIFW8PCCQIRWF-Q,5207
52
- loqusdb-2.7.21.dist-info/LICENSE,sha256=urpFcJXw3elN9kV2fFutc-lXegjuu2lqP_GSy8_CAbs,1054
53
- loqusdb-2.7.21.dist-info/METADATA,sha256=O3-3dPE2wqMdn26vDR9HImJ92dG8sOS2kLhmMKpqBOs,5321
54
- loqusdb-2.7.21.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
55
- loqusdb-2.7.21.dist-info/entry_points.txt,sha256=wFoWzEFjsSgXkj9FMQA8C9ihZoJ9R1XvbGuX9hEEI6E,52
56
- loqusdb-2.7.21.dist-info/RECORD,,
52
+ loqusdb-2.7.22.dist-info/LICENSE,sha256=urpFcJXw3elN9kV2fFutc-lXegjuu2lqP_GSy8_CAbs,1054
53
+ loqusdb-2.7.22.dist-info/METADATA,sha256=UIyXnGX1KUcCWkGadC1Ce3AL17J7EUlKvrVvR3kuKKc,5321
54
+ loqusdb-2.7.22.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
55
+ loqusdb-2.7.22.dist-info/entry_points.txt,sha256=wFoWzEFjsSgXkj9FMQA8C9ihZoJ9R1XvbGuX9hEEI6E,52
56
+ loqusdb-2.7.22.dist-info/RECORD,,