pcingola / SnpSift

Other
34 stars 20 forks source link

How to deal with conflicting INFO field names #73

Open rhdolin opened 2 years ago

rhdolin commented 2 years ago

Thank you for SnpSift, what a powerful useful program! I'm new to SnpSift, and have a basic question - the VCF file I'm starting with already has an INFO.AF field. I want to annotate the VCF file with gnomAD data, particularly gnomAD's INFO.AF field. It looks like the default behavior is to overide INFO.AF where there is a match to gnomAD - leaving me with a mix of INFO.AF fields. Do I need to remove the existing INFO.AF fields first, or is there a way to rename the gnomAD annotation as I pull it in? Thanks.

This is the command I'm running: java -jar SnpSift.jar annotate gnomad.exomes.r2.1.1.sites.liftover_grch38.vcf.bgz -info "AF" myVCF.vcf > myAnnotatedVCF.vcf

rhdolin commented 2 years ago

See also biostars discussion (https://www.biostars.org/p/9529677/), where, in absence of ability of SnpSift to revise field name upon annotation, the suggestion is to use bcftools annotate --rename-annot to rename the field AF before/after snpSift:

AF->old_AF (snpsift) AF->gnomad_AF old_AF->AF