How to filter out duplicate records in a vcf with bcftools?
1
0
Entering edit mode
8.3 years ago
vitor.aguiar ▴ 10

Is there a bcftools command to remove duplicate records in a vcf file?

If a variant has duplicate records, I'd like to remove all entries of such variant in the vcf.

bcftools vcf • 6.8k views
ADD COMMENT
0
Entering edit mode
8.3 years ago
Brice Sarver ★ 3.8k

Exactly duplicated records?

If the records are truly identical, sort the file and use uniq.

Make sure the vcf isn't compressed before you pass or pipe!

Edit: I should clarify that you don't need to use BCFtools for this. So, use good-old regular uniq not bcftools uniq; that doesn't exist.

ADD COMMENT

Login before adding your answer.

Traffic: 2085 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6