Skip to content

Commit

Permalink
update fixtures (#4563)
Browse files Browse the repository at this point in the history
  • Loading branch information
jklugherz authored Jan 3, 2025
1 parent b79dafe commit ba4f78a
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 31 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This folder comprises a Hail (www.hail.is) native Table or MatrixTable.
Written with version 0.2.130-bea04d9c79b5
Created at 2024/11/04 13:45:23
Written with version 0.2.133-4c60fddb171a
Created at 2025/01/02 12:26:15
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 5 additions & 4 deletions hail_search/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
EXPECTED_SAMPLE_DATA_WITH_SEX, SV_WGS_SAMPLE_DATA_WITH_SEX, VARIANT_LOOKUP_VARIANT, \
MULTI_PROJECT_SAMPLE_TYPES_SAMPLE_DATA, FAMILY_2_BOTH_SAMPLE_TYPE_SAMPLE_DATA, \
VARIANT1_BOTH_SAMPLE_TYPES, VARIANT2_BOTH_SAMPLE_TYPES, FAMILY_2_BOTH_SAMPLE_TYPE_SAMPLE_DATA_MISSING_PARENTAL_WGS, \
VARIANT3_BOTH_SAMPLE_TYPES, VARIANT4_BOTH_SAMPLE_TYPES, VARIANT2_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY, \
VARIANT4_BOTH_SAMPLE_TYPES, VARIANT2_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY, \
VARIANT1_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY, VARIANT3_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY, \
VARIANT4_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY
VARIANT4_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY, VARIANT4_WES_ONLY, VARIANT3_WES_ONLY
from hail_search.web_app import init_web_app, sync_to_async_hail_query
from hail_search.queries.base import BaseHailTableQuery

Expand Down Expand Up @@ -370,10 +370,11 @@ async def test_both_sample_types_search(self):

# Variant 1 is de novo in exome but inherited and homozygous in genome.
# Variant 2 is inherited and homozygous in exome and de novo and homozygous in genome.
# Variant 3 is inherited in both sample types. Variant 4 is de novo in both sample types.
# Variant 3 is inherited in both sample types.
# Variant 4 is de novo in exome, but inherited in genome in the same parent that has variant 3.
inheritance_mode = 'recessive'
await self._assert_expected_search(
[VARIANT1_BOTH_SAMPLE_TYPES, VARIANT2_BOTH_SAMPLE_TYPES, [VARIANT3_BOTH_SAMPLE_TYPES, VARIANT4_BOTH_SAMPLE_TYPES]],
[VARIANT1_BOTH_SAMPLE_TYPES, VARIANT2_BOTH_SAMPLE_TYPES, [VARIANT3_WES_ONLY, VARIANT4_WES_ONLY]],
sample_data=FAMILY_2_BOTH_SAMPLE_TYPE_SAMPLE_DATA, inheritance_mode=inheritance_mode,
**COMP_HET_ALL_PASS_FILTERS
)
Expand Down
45 changes: 20 additions & 25 deletions hail_search/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,27 +380,19 @@
'CAID': 'CA10960369',
}

VARIANT3_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY = deepcopy(VARIANT3)
genotypes = VARIANT3_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY['genotypes']
VARIANT3_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY['genotypes'] = {
'I000004_hg00731': [
genotypes['I000004_hg00731'],
{**genotypes['I000004_hg00731'], 'sampleType': 'WGS'}
],
VARIANT3_WES_ONLY = deepcopy(VARIANT3)
genotypes = VARIANT3_WES_ONLY['genotypes']
VARIANT3_WES_ONLY['genotypes'] = {
'I000004_hg00731': [genotypes['I000004_hg00731']],
'I000005_hg00732': [genotypes['I000005_hg00732']],
'I000006_hg00733': [genotypes['I000006_hg00733']],
}

VARIANT3_BOTH_SAMPLE_TYPES = deepcopy(VARIANT3_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY)
genotypes = VARIANT3_BOTH_SAMPLE_TYPES['genotypes']
VARIANT3_BOTH_SAMPLE_TYPES['genotypes']['I000005_hg00732'] = [
*genotypes['I000005_hg00732'],
{**genotypes['I000005_hg00732'][0], 'sampleType': 'WGS'}
]
VARIANT3_BOTH_SAMPLE_TYPES['genotypes']['I000006_hg00733'] = [
*genotypes['I000006_hg00733'],
{**genotypes['I000006_hg00733'][0], 'sampleType': 'WGS'}
]
VARIANT3_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY = deepcopy(VARIANT3_WES_ONLY)
genotypes = VARIANT3_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY['genotypes']
VARIANT3_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY['genotypes']['I000004_hg00731'].append(
{**genotypes['I000004_hg00731'][0], 'sampleType': 'WGS'}
)

VARIANT4 = {
'variantId': '1-91511686-T-G',
Expand Down Expand Up @@ -475,17 +467,20 @@
'CAID': 'CA341062623',
}

VARIANT4_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY = deepcopy(VARIANT4)
genotypes = VARIANT4_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY['genotypes']
VARIANT4_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY['genotypes'] = {
'I000004_hg00731': [
genotypes['I000004_hg00731'],
{**genotypes['I000004_hg00731'], 'sampleType': 'WGS'}
],
VARIANT4_WES_ONLY = deepcopy(VARIANT4)
genotypes = VARIANT4_WES_ONLY['genotypes']
VARIANT4_WES_ONLY['genotypes'] = {
'I000004_hg00731': [genotypes['I000004_hg00731']],
'I000005_hg00732': [genotypes['I000005_hg00732']],
'I000006_hg00733': [genotypes['I000006_hg00733']],
}

VARIANT4_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY = deepcopy(VARIANT4_WES_ONLY)
genotypes = VARIANT4_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY['genotypes']
VARIANT4_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY['genotypes']['I000004_hg00731'].append(
{**genotypes['I000004_hg00731'][0], 'sampleType': 'WGS'}
)

VARIANT4_BOTH_SAMPLE_TYPES = deepcopy(VARIANT4_BOTH_SAMPLE_TYPES_PROBAND_WGS_ONLY)
genotypes = VARIANT4_BOTH_SAMPLE_TYPES['genotypes']
VARIANT4_BOTH_SAMPLE_TYPES['genotypes']['I000005_hg00732'] = [
Expand All @@ -494,7 +489,7 @@
]
VARIANT4_BOTH_SAMPLE_TYPES['genotypes']['I000006_hg00733'] = [
*genotypes['I000006_hg00733'],
{**genotypes['I000006_hg00733'][0], 'sampleType': 'WGS'}
{**genotypes['I000006_hg00733'][0], 'numAlt': 2, 'sampleType': 'WGS'}
]

VARIANT_LOOKUP_VARIANT = {
Expand Down

0 comments on commit ba4f78a

Please sign in to comment.