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

fix: avoid adding duplicate CSQ/ANN fields via --retain-ann #366

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dlaehnemann
Copy link

We have cases where we want to ensure that certain ANN columns are in the MAF file, and we generate that list programmatically in a workflow. Currently, this leads to a duplication of any field requested via --retain-ann, that is already in the default list at:

vcf2maf/vcf2maf.pl

Lines 545 to 552 in 0d3f514

my @ann_cols = qw( Allele Gene Feature Feature_type Consequence cDNA_position CDS_position
Protein_position Amino_acids Codons Existing_variation ALLELE_NUM DISTANCE STRAND_VEP SYMBOL
SYMBOL_SOURCE HGNC_ID BIOTYPE CANONICAL CCDS ENSP SWISSPROT TREMBL UNIPARC RefSeq SIFT PolyPhen
EXON INTRON DOMAINS AF AFR_AF AMR_AF ASN_AF EAS_AF EUR_AF SAS_AF AA_AF EA_AF CLIN_SIG SOMATIC
PUBMED MOTIF_NAME MOTIF_POS HIGH_INF_POS MOTIF_SCORE_CHANGE IMPACT PICK VARIANT_CLASS TSL
HGVS_OFFSET PHENO MINIMISED GENE_PHENO FILTER flanking_bps vcf_id vcf_qual gnomADe_AF gnomADe_AFR_AF
gnomADe_AMR_AF gnomADe_ASJ_AF gnomADe_EAS_AF gnomADe_FIN_AF gnomADe_NFE_AF gnomADe_OTH_AF gnomADe_SAS_AF
);

So this solutions filters out any --retain-add-specified fields that are already in @ann_cols and avoids pushing them onto the column array.

I just looked up all the syntax and tried it in some online perl compiler. So feel free to adjust it to whichever style you might prefer. And obviously to fix any mistakes I might have made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant