diff --git a/seqr/utils/search/elasticsearch/constants.py b/seqr/utils/search/elasticsearch/constants.py index 34929f2f1c..231c9ae3f7 100644 --- a/seqr/utils/search/elasticsearch/constants.py +++ b/seqr/utils/search/elasticsearch/constants.py @@ -112,7 +112,13 @@ 'AC': 'helix_AC_het', 'AF': 'helix_AF_het', 'max_hl': 'helix_max_hl', - } + }, + 'ourdna_exomes': { + 'filter_AF': 'AF', + }, + 'ourdna_genomes': { + 'filter_AF': 'AF', + }, } POPULATION_FIELD_CONFIGS = { diff --git a/seqr/utils/search/elasticsearch/es_utils_tests.py b/seqr/utils/search/elasticsearch/es_utils_tests.py index 52017fa44f..311009f3c4 100644 --- a/seqr/utils/search/elasticsearch/es_utils_tests.py +++ b/seqr/utils/search/elasticsearch/es_utils_tests.py @@ -869,6 +869,22 @@ def call_request_json(self, index=-1): 'topmed_AF', 'topmed_AN', 'topmed_ID', + 'ourdna_exomes_max_hl', + 'ourdna_exomes_Hemi', + 'ourdna_exomes_Het', + 'ourdna_exomes_Hom', + 'ourdna_exomes_AC', + 'ourdna_exomes_ID', + 'ourdna_exomes_AF', + 'ourdna_exomes_AN', + 'ourdna_genomes_max_hl', + 'ourdna_genomes_Hemi', + 'ourdna_genomes_Het', + 'ourdna_genomes_Hom', + 'ourdna_genomes_AC', + 'ourdna_genomes_ID', + 'ourdna_genomes_AF', + 'ourdna_genomes_AN', 'gnomad_genomes_FAF_AF', 'rg37_locus', 'rg37_locus_end', diff --git a/seqr/views/apis/variant_search_api.py b/seqr/views/apis/variant_search_api.py index 5d97ee7913..5c7ea41372 100644 --- a/seqr/views/apis/variant_search_api.py +++ b/seqr/views/apis/variant_search_api.py @@ -209,6 +209,8 @@ def _get_variant_main_transcript_field_val(parsed_variant): {'header': 'gnomad_genomes_freq', 'value_path': 'populations.gnomad_genomes.af'}, {'header': 'gnomad_exomes_freq', 'value_path': 'populations.gnomad_exomes.af'}, {'header': 'topmed_freq', 'value_path': 'populations.topmed.af'}, + {'header': 'ourdna_exomes_freq', 'value_path': 'populations.ourdna_exomes.af'}, + {'header': 'ourdna_genomes_freq', 'value_path': 'populations.ourdna_genomes.af'}, {'header': 'cadd', 'value_path': 'predictions.cadd'}, {'header': 'revel', 'value_path': 'predictions.revel'}, {'header': 'eigen', 'value_path': 'predictions.eigen'}, diff --git a/seqr/views/apis/variant_search_api_tests.py b/seqr/views/apis/variant_search_api_tests.py index 49cba12669..051cc69071 100644 --- a/seqr/views/apis/variant_search_api_tests.py +++ b/seqr/views/apis/variant_search_api_tests.py @@ -406,26 +406,26 @@ def test_query_variants(self, mock_get_variants, mock_get_gene_counts, mock_erro self.assertEqual(response.status_code, 200) expected_content = [ ['chrom', 'pos', 'ref', 'alt', 'gene', 'worst_consequence', 'callset_freq', 'exac_freq', 'gnomad_genomes_freq', - 'gnomad_exomes_freq', 'topmed_freq', 'cadd', 'revel', 'eigen', 'splice_ai', 'polyphen', 'sift', 'muttaster', 'fathmm', + 'gnomad_exomes_freq', 'topmed_freq', 'ourdna_genomes_freq', 'ourdna_exomes_freq', 'cadd', 'revel', 'eigen', 'splice_ai', 'polyphen', 'sift', 'muttaster', 'fathmm', 'rsid', 'hgvsc', 'hgvsp', 'clinvar_clinical_significance', 'clinvar_gold_stars', 'filter', 'family_id_1', 'tags_1', 'notes_1', 'family_id_2', 'tags_2', 'notes_2', 'sample_1', 'num_alt_alleles_1', 'gq_1', 'ab_1', 'sample_2', 'num_alt_alleles_2', 'gq_2', 'ab_2', 'sample_3', 'num_alt_alleles_3', 'gq_3', 'ab_3'], - ['21', '3343400', 'GAGA', 'G', 'WASH7P', 'missense_variant', '0.13', '', '0.007', '', '', '', '', '', '', '', '', '', + ['21', '3343400', 'GAGA', 'G', 'WASH7P', 'missense_variant', '0.13', '', '0.007', '', '', '', '', '', '', '', '', '', '', '', '', 'ENST00000623083.3:c.1075G>A', 'ENSP00000485442.1:p.Gly359Ser', '', '', '', '1', 'Tier 1 - Novel gene and phenotype (None)|Review (None)', '', '2', '', '', 'NA19675', '1', '46.0', '0.702127659574', 'NA19679', '0', '99.0', '0.0', '', '', '', ''], - ['3', '835', 'AAAG', 'A', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + ['3', '835', 'AAAG', 'A', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1', '', '', '', '', '', 'NA19679', '0', '99.0', '0.0', '', '', '', '', '', '', '', ''], - ['12', '48367227', 'TC', 'T', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + ['12', '48367227', 'TC', 'T', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2', 'AIP (None)|Known gene for phenotype (None)|Excluded (None)', 'a later note (None)|test n\xf8te (None)', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], ['1', '38724419', 'T', 'G', 'ENSG00000177000', 'missense_variant', '0.31111112236976624', '0.29499998688697815', '0', - '0.28899794816970825', '0.24615199863910675', '20.899999618530273', '0.19699999690055847', + '0.28899794816970825', '0.24615199863910675', '', '20.899999618530273', '0.19699999690055847', '2.000999927520752', '0.0', '0.1', '0.05', '', '', 'rs1801131', 'ENST00000383791.8:c.156A>C', 'ENSP00000373301.3:p.Leu52Phe', 'Conflicting_classifications_of_pathogenicity', '1', '', '2', '', '', '', '', '', 'HG00731', '2', '99', '1.0', 'HG00732', '1', '99', '0.625', 'HG00733', '0', '40', '0.0'], ['1', '91502721', 'G', 'A', 'ENSG00000097046', 'intron_variant', '0.6666666865348816', '0.0', '0.38041073083877563', '0.0', - '0.36268100142478943', '2.753999948501587', '', '1.378000020980835', '0.009999999776482582', '', '', '', + '0.36268100142478943', '', '2.753999948501587', '', '1.378000020980835', '0.009999999776482582', '', '', '', '', 'rs13447464', 'ENST00000234626.11:c.-63-251G>A', '', '', '', '', '2', '', '', '', '', '', 'HG00731', '1', '99', '1.0', 'HG00732', '0', '99', '0.4594594594594595', 'HG00733', '1', '99', '0.4074074074074074'], ] @@ -437,29 +437,29 @@ def test_query_variants(self, mock_get_variants, mock_get_gene_counts, mock_erro self.assertEqual(response.status_code, 200) expected_content = [ ['chrom', 'pos', 'ref', 'alt', 'gene', 'worst_consequence', 'callset_freq', 'exac_freq', 'gnomad_genomes_freq', - 'gnomad_exomes_freq', 'topmed_freq', 'cadd', 'revel', 'eigen', 'splice_ai', 'polyphen', 'sift', 'muttaster', 'fathmm', + 'gnomad_exomes_freq', 'topmed_freq', 'ourdna_genomes_freq', 'ourdna_exomes_freq', 'cadd', 'revel', 'eigen', 'splice_ai', 'polyphen', 'sift', 'muttaster', 'fathmm', 'rsid', 'hgvsc', 'hgvsp', 'clinvar_clinical_significance', 'clinvar_gold_stars', 'filter', 'family_id_1', 'tags_1', 'notes_1', 'sample_1', 'num_alt_alleles_1', 'gq_1', 'ab_1', 'sample_2', 'num_alt_alleles_2', 'gq_2', 'ab_2', 'sample_3', 'num_alt_alleles_3', 'gq_3', 'ab_3'], - ['21', '3343400', 'GAGA', 'G', 'WASH7P', 'missense_variant', '0.13', '', '0.007', '', '', '', '', '', '', '', '', '', '', + ['21', '3343400', 'GAGA', 'G', 'WASH7P', 'missense_variant', '0.13', '', '0.007', '', '', '', '', '', '', '', '', '', '', '', '', 'ENST00000623083.3:c.1075G>A', 'ENSP00000485442.1:p.Gly359Ser', '', '', '', '1', 'Tier 1 - Novel gene and phenotype (None)|Review (None)', '', 'NA19675', '1', '46.0', '0.702127659574', '', '', '', '', '', '', '', '',], - ['21', '3343400', 'GAGA', 'G', 'WASH7P', 'missense_variant', '0.13', '', '0.007', '', '', '', '', '', '', '', '', '', '', + ['21', '3343400', 'GAGA', 'G', 'WASH7P', 'missense_variant', '0.13', '', '0.007', '', '', '', '', '', '', '', '', '', '', '', '', 'ENST00000623083.3:c.1075G>A', 'ENSP00000485442.1:p.Gly359Ser', '', '', '', '2', '', '', 'NA19679', '0', '99.0', '0.0', '', '', '', '', '', '', '', '',], - ['3', '835', 'AAAG', 'A', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + ['3', '835', 'AAAG', 'A', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1', '', '', 'NA19679', '0', '99.0', '0.0', '', '', '', '', '', '', '', '',], - ['12', '48367227', 'TC', 'T', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + ['12', '48367227', 'TC', 'T', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2', 'AIP (None)|Known gene for phenotype (None)|Excluded (None)', 'a later note (None)|test n\xf8te (None)', '', '', '', '', '', '', '', '', '', '', '', '',], ['1', '38724419', 'T', 'G', 'ENSG00000177000', 'missense_variant', '0.31111112236976624', '0.29499998688697815', '0', - '0.28899794816970825', '0.24615199863910675', '20.899999618530273', '0.19699999690055847', + '0.28899794816970825', '0.24615199863910675', '', '20.899999618530273', '0.19699999690055847', '2.000999927520752', '0.0', '0.1', '0.05', '', '', 'rs1801131', 'ENST00000383791.8:c.156A>C', 'ENSP00000373301.3:p.Leu52Phe', 'Conflicting_classifications_of_pathogenicity', '1', '', '2', '', '', 'HG00731', '2', '99', '1.0', 'HG00732', '1', '99', '0.625', 'HG00733', '0', '40', '0.0'], ['1', '91502721', 'G', 'A', 'ENSG00000097046', 'intron_variant', '0.6666666865348816', '0.0', '0.38041073083877563', '0.0', - '0.36268100142478943', '2.753999948501587', '', '1.378000020980835', '0.009999999776482582', '', '', + '0.36268100142478943', '', '2.753999948501587', '', '1.378000020980835', '0.009999999776482582', '', '', '', '', 'rs13447464', 'ENST00000234626.11:c.-63-251G>A', '', '', '', '', '2', '', '', 'HG00731', '1', '99', '1.0', 'HG00732', '0', '99', '0.4594594594594595', 'HG00733', '1', '99', '0.4074074074074074'], diff --git a/seqr/views/utils/test_utils.py b/seqr/views/utils/test_utils.py index e1692c3070..d27bd3866c 100644 --- a/seqr/views/utils/test_utils.py +++ b/seqr/views/utils/test_utils.py @@ -1104,6 +1104,10 @@ def _get_list_param(call, param): 'filter_af': 0.0009151523074911753, 'het': 0, 'id': None, 'max_hl': None}, 'topmed': {'an': 125568, 'ac': 21, 'hom': 0, 'af': 0.00016724, 'hemi': 0, 'filter_af': None, 'het': None, 'id': None, 'max_hl': None}, + 'ourdna_exomes': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, + 'het': None, 'id': None, 'max_hl': None}, + 'ourdna_genomes': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, + 'het': None, 'id': None, 'max_hl': None}, 'sv_callset': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, 'het': None, 'id': None, 'max_hl': None}, 'gnomad_svs': {'ac': None, 'af': None, 'an': None, 'filter_af': None, 'hemi': None, 'hom': None, @@ -1187,6 +1191,10 @@ def _get_list_param(call, param): 'filter_af': 0.00016269686320447742, 'het': 0, 'id': None, 'max_hl': None}, 'topmed': {'an': 0, 'ac': 0, 'hom': 0, 'af': 0.0, 'hemi': 0, 'filter_af': None, 'het': None, 'id': None, 'max_hl': None}, + 'ourdna_exomes': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, + 'het': None, 'id': None, 'max_hl': None}, + 'ourdna_genomes': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, + 'het': None, 'id': None, 'max_hl': None}, 'sv_callset': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, 'het': None, 'id': None, 'max_hl': None}, 'gnomad_svs': {'ac': None, 'af': None, 'an': None, 'filter_af': None, 'hemi': None, 'hom': None, @@ -1272,6 +1280,10 @@ def _get_list_param(call, param): 'id': None, 'max_hl': None}, 'topmed': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, 'het': None, 'id': None, 'max_hl': None}, + 'ourdna_exomes': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, + 'het': None, 'id': None, 'max_hl': None}, + 'ourdna_genomes': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, + 'het': None, 'id': None, 'max_hl': None}, 'sv_callset': {'an': 10088, 'ac': 7, 'hom': None, 'af': 0.000693825, 'hemi': None, 'filter_af': None, 'het': None, 'id': None, 'max_hl': None}, 'gnomad_svs': {'ac': 0, 'af': 0.0, 'an': 0, 'filter_af': None, 'hemi': 0, 'hom': 0, 'het': 0, 'id': None, @@ -1357,6 +1369,10 @@ def _get_list_param(call, param): 'id': None, 'max_hl': None}, 'topmed': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, 'het': None, 'id': None, 'max_hl': None}, + 'ourdna_exomes': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, + 'het': None, 'id': None, 'max_hl': None}, + 'ourdna_genomes': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, + 'het': None, 'id': None, 'max_hl': None}, 'sv_callset': {'an': 10088, 'ac': 7, 'hom': None, 'af': 0.000693825, 'hemi': None, 'filter_af': None, 'het': None, 'id': None, 'max_hl': None}, 'gnomad_svs': {'ac': 22, 'af': 0.00679, 'an': 3240, 'filter_af': None, 'hemi': 0, 'hom': 0, 'het': 0, @@ -1457,6 +1473,10 @@ def _get_list_param(call, param): 'hemi': None, 'het': None, 'hom': None, 'id': None, 'max_hl': None}, 'topmed': {'ac': None, 'af': None, 'an': None, 'filter_af': None, 'hemi': None, 'het': None, 'hom': None, 'id': None, 'max_hl': None}, + 'ourdna_exomes': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, + 'het': None, 'id': None, 'max_hl': None}, + 'ourdna_genomes': {'an': None, 'ac': None, 'hom': None, 'af': None, 'hemi': None, 'filter_af': None, + 'het': None, 'id': None, 'max_hl': None}, 'callset_heteroplasmy': {'ac': 1, 'af': 0.0003968253968253968, 'an': 2520, 'filter_af': None, 'hemi': None, 'het': None, 'hom': None, 'id': None, 'max_hl': None}, 'gnomad_mito_heteroplasmy': {'ac': 3, 'af': 5.317169e-05, 'an': 56421, 'filter_af': None, 'hemi': None, 'het': None, diff --git a/ui/shared/components/panel/search/constants.js b/ui/shared/components/panel/search/constants.js index a045a020bb..db315cdcfd 100644 --- a/ui/shared/components/panel/search/constants.js +++ b/ui/shared/components/panel/search/constants.js @@ -432,6 +432,18 @@ export const SNP_FREQUENCIES = [ homHemi: true, labelHelp: 'Filter by allele count (AC) or by allele frequency (AF) among the samples in this family plus the rest of the samples that were joint-called as part of variant calling for this project.', }, + { + name: 'ourdna_exomes', + label: 'OurDNA exomes', + homHemi: true, + labelHelp: 'Filter by allele count (AC) or allele frequency (AF) in OurDNA exomes', + }, + { + name: 'ourdna_genome', + label: 'OurDNA genomes', + homHemi: true, + labelHelp: 'Filter by allele count (AC) or allele frequency (AF) in OurDNA genomes', + }, ] export const MITO_FREQUENCIES = [ diff --git a/ui/shared/components/panel/variants/Frequencies.jsx b/ui/shared/components/panel/variants/Frequencies.jsx index 60195b32fb..d3cb0d273b 100644 --- a/ui/shared/components/panel/variants/Frequencies.jsx +++ b/ui/shared/components/panel/variants/Frequencies.jsx @@ -213,6 +213,18 @@ const POPULATIONS = [ queryParams: { [GENOME_VERSION_37]: 'dataset=gnomad_sv_r2_1' }, helpMessage: GNOMAD_SV_CRITERIA_MESSAGE, }, + { + field: 'ourdna_exomes', + fieldTitle: 'OurDNA exomes', + precision: 3, + urls: { [GENOME_VERSION_38]: 'ourdna-dev.popgen.rocks', }, + }, + { + field: 'ourdna_genomes', + fieldTitle: 'OurDNA genomes', + precision: 3, + urls: { [GENOME_VERSION_38]: 'ourdna-dev.popgen.rocks', }, + }, ] const CALLSET_HET_POP = { diff --git a/ui/shared/utils/constants.js b/ui/shared/utils/constants.js index 0d2ce7b70d..dd232eb507 100644 --- a/ui/shared/utils/constants.js +++ b/ui/shared/utils/constants.js @@ -1616,6 +1616,8 @@ export const VARIANT_EXPORT_DATA = [ { header: 'gnomad_genomes_freq', getVal: getPopAf('gnomad_genomes') }, { header: 'gnomad_exomes_freq', getVal: getPopAf('gnomad_exomes') }, { header: 'topmed_freq', getVal: getPopAf('topmed') }, + { header: 'ourdna_exomes_freq', getVal: getPopAf('ourdna_exomes') }, + { header: 'ourdna_genomes_freq', getVal: getPopAf('ourdna_genomes') }, { header: 'cadd', getVal: variant => (variant.predictions || {}).cadd }, { header: 'revel', getVal: variant => (variant.predictions || {}).revel }, { header: 'eigen', getVal: variant => (variant.predictions || {}).eigen },