55import hail as hl
66from hail import Table
77
8+ from gnomad .resources .config import (
9+ GnomadPublicResourceSource ,
10+ gnomad_public_resource_configuration ,
11+ )
812from gnomad .resources .grch37 .reference_data import _import_gtex_rsem
913from gnomad .resources .resource_utils import (
1014 DBSNP_B154_CHR_CONTIG_RECODING ,
@@ -46,7 +50,12 @@ def _import_clinvar(**kwargs) -> hl.Table:
4650 clinvar = clinvar .filter (
4751 hl .len (clinvar .alleles ) > 1
4852 ) # Get around problematic single entry in alleles array in the clinvar vcf
53+ _curr_source = gnomad_public_resource_configuration .source
54+ gnomad_public_resource_configuration .source = (
55+ GnomadPublicResourceSource .GOOGLE_CLOUD_PUBLIC_DATASETS
56+ )
4957 clinvar = vep_or_lookup_vep (clinvar , reference = "GRCh38" )
58+ gnomad_public_resource_configuration .source = _curr_source
5059 return clinvar
5160
5261
@@ -208,8 +217,20 @@ def _import_ensembl_interval(path) -> hl.Table:
208217)
209218
210219clinvar = VersionedTableResource (
211- default_version = "20190923 " ,
220+ default_version = "20250504 " ,
212221 versions = {
222+ "20250504" : GnomadPublicTableResource (
223+ path = "gs://gnomad-public-requester-pays/resources/grch38/clinvar/clinvar_20250504.ht" ,
224+ import_func = _import_clinvar ,
225+ import_args = {
226+ "path" : "gs://gcp-public-data--gnomad/resources/grch38/clinvar/clinvar_20250504.vcf.gz" ,
227+ "force_bgz" : True ,
228+ "contig_recoding" : NO_CHR_TO_CHR_CONTIG_RECODING ,
229+ "skip_invalid_loci" : True ,
230+ "min_partitions" : 100 ,
231+ "reference_genome" : "GRCh38" ,
232+ },
233+ ),
213234 "20190923" : GnomadPublicTableResource (
214235 path = "gs://gnomad-public-requester-pays/resources/grch38/clinvar/clinvar_20190923.ht" ,
215236 import_func = _import_clinvar ,
@@ -221,7 +242,7 @@ def _import_ensembl_interval(path) -> hl.Table:
221242 "min_partitions" : 100 ,
222243 "reference_genome" : "GRCh38" ,
223244 },
224- )
245+ ),
225246 },
226247)
227248
0 commit comments