Skip to content

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

Merged
ckandoth merged 1 commit intomskcc:mainfrom
dlaehnemann:patch-1
Aug 1, 2025
Merged

fix: avoid adding duplicate CSQ/ANN fields via --retain-ann#366
ckandoth merged 1 commit intomskcc:mainfrom
dlaehnemann:patch-1

Conversation

@dlaehnemann
Copy link
Contributor

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.

@dlaehnemann
Copy link
Contributor Author

I can't directly ask for a review via the interface, so I'll try by pinging in @ckandoth, who seems to have been the main maintainer.

@ckandoth
Copy link
Collaborator

Thanks for the PR, and sorry for the delay. Will review and merge shortly.

@ckandoth ckandoth merged commit cf9ac00 into mskcc:main Aug 1, 2025
@ckandoth ckandoth self-assigned this Aug 1, 2025
@dlaehnemann dlaehnemann deleted the patch-1 branch August 1, 2025 09:56
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.

2 participants

Comments