Skip to content

Commit 264e4cb

Browse files
committed
Update constraint release versions and mutation rate handling
- Modified CONSTRAINT_RELEASES to include "4.0" alongside "4.1" and "4.1.1". - Introduced CONSTRAINT_MUTATION_RATE_RELEASES for better clarity in mutation rate table paths. - Updated function docstrings to reflect the specific constraint mutation rate release versions. - Adjusted the constraint_mutation_rate function to utilize the new CONSTRAINT_MUTATION_RATE_RELEASES list.
1 parent be147a3 commit 264e4cb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

gnomad/resources/grch38/gnomad.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
EXOME_AN_RELEASES = ["4.1"]
4848
GENOME_AN_RELEASES = ["4.1"]
4949

50-
CONSTRAINT_RELEASES = ["4.1", "4.1.1"]
50+
CONSTRAINT_RELEASES = ["4.0", "4.1", "4.1.1"]
51+
CONSTRAINT_MUTATION_RATE_RELEASES = ["4.1.1"]
5152

5253
DATA_TYPES = ["exomes", "genomes", "joint"]
5354
MAJOR_RELEASES = ["v3", "v4"]
@@ -426,7 +427,7 @@ def _public_constraint_ht_path(version: str) -> str:
426427
"""
427428
Get public constraint table path.
428429
429-
:param version: One of the release versions of gnomAD on GRCh38.
430+
:param version: One of the constraint release versions of gnomAD on GRCh38.
430431
:return: Path to gene constraint Table.
431432
"""
432433
return f"gs://gnomad-public-requester-pays/release/{version}/constraint/gnomad.v{version}.constraint_metrics.ht"
@@ -436,7 +437,7 @@ def _public_constraint_mutation_rate_ht_path(version: str) -> str:
436437
"""
437438
Get public constraint mutation rate table path.
438439
439-
:param version: One of the constraint release versions of gnomAD on GRCh38.
440+
:param version: One of the constraint mutation rate release versions of gnomAD on GRCh38.
440441
:return: Path to mutation rate Table.
441442
"""
442443
return f"gs://gnomad-public-requester-pays/release/{version}/constraint/model/gnomad.v{version}.mutation_rate.ht"
@@ -867,7 +868,7 @@ def constraint_mutation_rate() -> VersionedTableResource:
867868
release: GnomadPublicTableResource(
868869
path=_public_constraint_mutation_rate_ht_path(release)
869870
)
870-
for release in CONSTRAINT_RELEASES
871+
for release in CONSTRAINT_MUTATION_RATE_RELEASES
871872
},
872873
)
873874

0 commit comments

Comments
 (0)