Issue or current state
Reading vcfs into mongo backing data will throw errors if newer version of VEP is used with consequences that are not enumerated in snv_consequence2code:
|
snv_consequence2code = { name: i for i, name in enumerate(reversed([ |
|
'transcript_ablation', |
|
'splice_acceptor_variant', |
|
'splice_donor_variant', |
|
'stop_gained', |
|
'frameshift_variant', |
|
'stop_lost', |
|
'start_lost', |
|
'transcript_amplification', |
|
'inframe_insertion', |
|
'inframe_deletion', |
|
'missense_variant', |
|
'protein_altering_variant', |
|
'splice_region_variant', |
|
'incomplete_terminal_codon_variant', |
|
'start_retained_variant', |
|
'stop_retained_variant', |
|
'synonymous_variant', |
|
'coding_sequence_variant', |
|
'mature_miRNA_variant', |
|
'5_prime_UTR_variant', |
|
'3_prime_UTR_variant', |
|
'non_coding_transcript_exon_variant', |
|
'intron_variant', |
|
'NMD_transcript_variant', |
|
'non_coding_transcript_variant', |
|
'upstream_gene_variant', |
|
'downstream_gene_variant', |
|
'TFBS_ablation', |
|
'TFBS_amplification', |
|
'TF_binding_site_variant', |
|
'regulatory_region_ablation', |
|
'regulatory_region_amplification', |
|
'feature_elongation', |
|
'regulatory_region_variant', |
|
'feature_truncation', |
|
'intergenic_variant' |
|
]), 1)} |
The error will crop up here:
|
consequences = sorted(effect['Consequence'].split('&'), key = lambda x: snv_consequence2code[x], reverse = True) |
Resolved when
A graceful method of handling consequences is implemented and demonstrated functioning with unit tests.
Issue or current state
Reading vcfs into mongo backing data will throw errors if newer version of VEP is used with consequences that are not enumerated in
snv_consequence2code:bravo_api/bravo_api/models/readers.py
Lines 49 to 86 in 7a52032
The error will crop up here:
bravo_api/bravo_api/models/readers.py
Line 103 in 7a52032
Resolved when
A graceful method of handling consequences is implemented and demonstrated functioning with unit tests.