Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hanars committed Mar 18, 2024
1 parent 4d8ca4d commit 4879c39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions seqr/views/apis/report_api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
'participant': {
'internal_project_id': {'data_type': 'reference'},
'prior_testing': {'data_type': 'enumeration'},
'proband_relationship': {'required': True},
'proband_relationship': {'required': 'CONDITIONAL (sex = Male)'},
'reported_race': {'enumerations': ['Asian', 'White', 'Black']},
'age_at_enrollment': {'data_type': 'date'}
},
Expand Down Expand Up @@ -717,7 +717,7 @@ def test_gregor_export(self, mock_subprocess, mock_temp_dir, mock_open, mock_dat
] + [
'The following tables are required in the data model but absent from the reports: subject, dna_read_data_set',
] + [
'The following entries are missing required "proband_relationship" in the "participant" table: Broad_HG00732, Broad_HG00733, Broad_NA19678, Broad_NA19679, Broad_NA20870, Broad_NA20872, Broad_NA20874, Broad_NA20875, Broad_NA20876, Broad_NA20881, Broad_NA20888',
'The following entries are missing required "proband_relationship" in the "participant" table: Broad_HG00732, Broad_NA19678, Broad_NA20870, Broad_NA20872, Broad_NA20874, Broad_NA20875, Broad_NA20876, Broad_NA20881',
'The following entries have invalid values for "reported_race" in the "participant" table. Allowed values: Asian, White, Black. Invalid values: Broad_NA19675_1 (Middle Eastern or North African)',
'The following entries have invalid values for "age_at_enrollment" in the "participant" table. Allowed values have data type date. Invalid values: Broad_NA19675_1 (18)',
'The following entries have invalid values for "reference_assembly" (from Airtable) in the "aligned_dna_short_read" table. Allowed values have data type integer. Invalid values: NA20888 (GRCh38), VCGS_FAM203_621_D2 (GRCh38)',
Expand Down Expand Up @@ -1126,7 +1126,7 @@ def test_family_metadata(self):
'consanguinity': 'Unknown',
'condition_id': 'OMIM:615123',
'known_condition_name': '',
'condition_inheritance': '',
'condition_inheritance': 'Unknown',
})

# Test empty project
Expand Down
2 changes: 1 addition & 1 deletion seqr/views/utils/anvil_metadata_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,5 +565,5 @@ def _format_omim_conditions(conditions):
'known_condition_name': '|'.join(sorted({o['phenotype_description'] for o in conditions if o.get('phenotype_description')})),
'condition_inheritance': '|'.join(sorted({
MIM_INHERITANCE_MAP.get(i, i) for o in conditions if o.get('phenotype_inheritance') for i in o['phenotype_inheritance'].split(', ')
}))
})) or 'Unknown',
}

0 comments on commit 4879c39

Please sign in to comment.