rust-bio / rust-bio-tools

A set of command line utilities based on Rust-Bio.
MIT License
182 stars 24 forks source link

feat: Make annotation header available for customized reports #238

Closed fxwiegand closed 2 years ago

fxwiegand commented 2 years ago

As @FelixMoelder pointed out accessing annotation fields via their index is getting very cumbersome since VEP mixes their order up now and then with new updates. This PR makes the header description available as a js array. This should make it easy to access every field without relying on VEPs ordering. Example:

const ANN_DESCRIPTION = ["Allele","Consequence","IMPACT","SYMBOL","Gene","Feature_type","Feature","BIOTYPE","EXON","INTRON","HGVSc","HGVSp","cDNA_position","CDS_position","Protein_position","Amino_acids","Codons","Existing_variation","DISTANCE","STRAND","FLAGS","SYMBOL_SOURCE","HGNC_ID","SOURCE","HGVS_OFFSET","HGVSg","LoFtool","problematic-sites.vcf.gz","annotation.gff.gz"];