Skip to content

genmod models can give a KeyError with --phasedparameter if some variants lack region annotation #192

@sofiademmou

Description

@sofiademmou

genmod models gives a KeyError when used with multiple samples and --phased flag

Command

 genmod \
    models \
    --whole_gene --temp_dir ./ --phased  \
    --reduced_penetrance reduced_penetrance.tsv \
    --family_file FAM.ped \
    --processes 2 \
    --outfile test_data_chunk.00002.bed_snv_genmod_models_models.vcf \
    test_data_chunk.00002.bed_snv_genmod_annotate_annotate.vcf

Files used

FAM.ped.txt
reduced_penetrance.tsv
test_data_chunk.00002.bed_snv_genmod_annotate_annotate.vcf.txt

Error

> Traceback (most recent call last): 
 > File "/opt/conda/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap 
 > self.run() 
 > File "/opt/conda/lib/python3.11/site-packages/genmod/annotate_models/variant_annotator.py", line 138, in run 
 > check_genetic_models( 
 > File "/opt/conda/lib/python3.11/site-packages/genmod/annotate_models/genetic_models.py", line 195, in check_genetic_models 
 > elif check_compounds(variant_1, variant_2, family, intervals, phased): 
 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
 > File "/opt/conda/lib/python3.11/site-packages/genmod/annotate_models/models/compound_model.py", line 86, in check_compounds 
 > variant_1_interval = intervals[individual_id].find_range( 
 > ~~~~~~~~~^^^^^^^^^^^^^^^ 
 > KeyError: 'HG002'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions