Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully handle loading consequences not in enumeration #22

Open
grosscol opened this issue Feb 20, 2023 · 0 comments
Open

Gracefully handle loading consequences not in enumeration #22

grosscol opened this issue Feb 20, 2023 · 0 comments
Labels
triage Landing area for issues discovered during development.

Comments

@grosscol
Copy link
Collaborator

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.

@grosscol grosscol added the triage Landing area for issues discovered during development. label Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Landing area for issues discovered during development.
Projects
None yet
Development

No branches or pull requests

1 participant