Skip to content

Commit cc50910

Browse files
authored
Fix field references (#827)
* Fix field references * Fix test * Fix test * Update tests * Fix annotation
1 parent c49b0fa commit cc50910

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+21
-20
lines changed

v03_pipeline/lib/methods/relatedness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def call_relatedness(
3030
# - brew install lz4
3131
# - CXXFLAGS='-I/opt/homebrew/include/' HAIL_COMPILE_NATIVES=1 make -C hail install
3232
# Hail issue here: https://discuss.hail.is/t/noclassdeffounderror-could-not-initialize-class-is-hail-methods-ibsffi/2453
33-
kin_ht = hl.identity_by_descent(mt, maf=mt.info.AF[0], min=0.10, max=1.0)
33+
kin_ht = hl.identity_by_descent(mt, maf=mt['info.AF'][0], min=0.10, max=1.0)
3434
kin_ht = kin_ht.key_by('i', 'j')
3535
return kin_ht.select(
3636
ibd0=kin_ht.ibd.Z0,

v03_pipeline/lib/misc/vets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
def annotate_vets(mt: hl.MatrixTable) -> hl.MatrixTable:
10-
if not hasattr(mt, 'info') or not hasattr(mt.info, 'CALIBRATION_SENSITIVITY'):
10+
if not hasattr(mt, 'info.CALIBRATION_SENSITIVITY'):
1111
return mt
1212
return mt.annotate_rows(
1313
filters=hl.bind(
@@ -34,6 +34,6 @@ def annotate_vets(mt: hl.MatrixTable) -> hl.MatrixTable:
3434
)
3535
),
3636
hl.is_snp(mt.alleles[0], mt.alleles[1]),
37-
hl.parse_float(mt.info.CALIBRATION_SENSITIVITY[mt.a_index - 1]),
37+
hl.parse_float(mt['info.CALIBRATION_SENSITIVITY'][mt.a_index - 1]),
3838
),
3939
)

v03_pipeline/lib/misc/vets_test.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ def test_annotate_vets(self) -> None:
7777
hl.empty_set(hl.tstr),
7878
hl.set(['NO_HQ_GENOTYPES']),
7979
],
80-
'info': [
81-
hl.Struct(CALIBRATION_SENSITIVITY=['0.999']),
82-
hl.Struct(CALIBRATION_SENSITIVITY=['0.995']),
83-
hl.Struct(CALIBRATION_SENSITIVITY=['0.999']),
84-
hl.Struct(CALIBRATION_SENSITIVITY=['0.98']),
85-
hl.Struct(CALIBRATION_SENSITIVITY=['0.99']),
86-
hl.Struct(CALIBRATION_SENSITIVITY=['0.991']),
80+
'info.CALIBRATION_SENSITIVITY': [
81+
['0.999'],
82+
['0.995'],
83+
['0.999'],
84+
['0.98'],
85+
['0.99'],
86+
['0.991'],
8787
],
8888
},
8989
cols={'s': ['sample_1']},

v03_pipeline/lib/tasks/write_relatedness_check_table_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def setUp(self) -> None:
5858
# Force imported callset to be complete
5959
ht = import_vcf(TEST_VCF, ReferenceGenome.GRCh38)
6060
ht = ht.annotate_globals(sample_type=SampleType.WGS.value)
61+
ht = ht.annotate_rows(**{'info.AF': ht.info.AF})
6162
ht.write(
6263
imported_callset_path(
6364
ReferenceGenome.GRCh38,
Binary file not shown.
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
This folder comprises a Hail (www.hail.is) native Table or MatrixTable.
2-
Written with version 0.2.128-eead8100a1c1
3-
Created at 2024/03/13 11:46:28
2+
Written with version 0.2.130-bea04d9c79b5
3+
Created at 2024/07/01 14:46:50
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
This folder comprises a Hail (www.hail.is) native Table or MatrixTable.
2-
Written with version 0.2.128-eead8100a1c1
3-
Created at 2024/03/13 11:46:28
2+
Written with version 0.2.130-bea04d9c79b5
3+
Created at 2024/07/01 14:46:50
Binary file not shown.
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
This folder comprises a Hail (www.hail.is) native Table or MatrixTable.
2-
Written with version 0.2.128-eead8100a1c1
3-
Created at 2024/03/13 11:46:28
2+
Written with version 0.2.130-bea04d9c79b5
3+
Created at 2024/07/01 14:46:50
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
This folder comprises a Hail (www.hail.is) native Table or MatrixTable.
2-
Written with version 0.2.128-eead8100a1c1
3-
Created at 2024/03/13 11:46:28
2+
Written with version 0.2.130-bea04d9c79b5
3+
Created at 2024/07/01 14:46:50
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
This folder comprises a Hail (www.hail.is) native Table or MatrixTable.
2-
Written with version 0.2.128-eead8100a1c1
3-
Created at 2024/03/13 11:46:28
2+
Written with version 0.2.130-bea04d9c79b5
3+
Created at 2024/07/01 14:46:50
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)