How to merge VCF files from multiple samples and remove individual level information
1
0
Entering edit mode
7 weeks ago
Arton • 0

I would like to generate a merged VCF file with variant data (chr, position) from multiple VCF files but remove the individual level information so it can't be traced who has which variant. It's important for me to keep the format as VCF, otherwise this is easily possible if the output was a bed file. For a bed file I use "cut, sort, and uniq". What tool should I use for this purpose to keep the format as VCF but merge all the variants and only keep the unique variants?

VCF • 413 views
ADD COMMENT
0
Entering edit mode

How to calculate coverage of Nanopore long read data?

Don't forget to follow up on your threads, that is bad etiquette. If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one answer if they all work. If an answer was not really helpful or did not work, provide detailed feedback so others know not to use that answer.

Upvote|Bookmark|Accept

ADD REPLY
0
Entering edit mode

Thank you! Didn't know about these rules. Just accepted the response for the other question.

ADD REPLY
3
Entering edit mode
7 weeks ago
bcftools merge --file-list paths.to.vcfs.txt -O u | bcftools view -G -O z -o output.vcf.gz
ADD COMMENT
0
Entering edit mode

Thank you! It worked perfectly.

ADD REPLY

Login before adding your answer.

Traffic: 1683 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