Merge different VCFs from multiple individuals including singletons
1
0
Entering edit mode
3.6 years ago
Mari ▴ 30

Hi.

I want to have a VCF file with multiple individuals from individually genotyped each sample. However, as I genotyped them separately, loci with 0|0 genotypes (in reality) in an individual are not recorded in the vcf file.

Can I incorporate polymorphic regions with 0|0 genotypes in some individuals? (not 0|0 in all individuals, of course).

When I tried naively it with VCFtools (0.1.16),

vcf-merge  indivi1.SNVs.vcf.gz indivi2.SNVs.vcf.gz indivi3.SNVs.vcf.gz | bgzip -c > merge.SNV.vcf.gz

0|0 locus (in reality) was recorded as ./. (in output.vcf), but I want to convert (or re-genotype, restore) ./. into 0|0 if they are likely to be 0|0, not low-quality locus (not genotyped) in that individual.

The original individual vcf files have quality information (as below). I also have BAM files and ref.fa.

#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE
ssa01 38352 . C T 696 . . GT:GQ:DP:AF:PS 1|0:696:2:0.5:38352
ssa01 106281 . A G 720 . . GT:GQ:DP:AF:PS 0|1:720:4:0.25:38352
ssa01 106522 . C T 789 . . GT:GQ:DP:AF:PS 0|1:789:4:0.25:38352

Thank you very much.

VCFTools Genomics • 1.1k views
ADD COMMENT
2
Entering edit mode
3.6 years ago
Ram 44k

VCFTools is not actively maintained, I think. Try bcftools merge instead.

ADD COMMENT
0
Entering edit mode

It worked! Thank you very much! (I am sorry, I am not sure how to make a post "closed" or "solved")

bcftools merge -l SNVvcf.list --force-samples --missing-to-ref -Oz -o bcfmergeSNV.vcf.gz
ADD REPLY
0
Entering edit mode

I've moved my comment to an answer. Please accept it to mark the post as solved.

ADD REPLY
0
Entering edit mode

To accept an answer, please click the gray check mark on the left of the answer.

Upvote-Bookmark-Accept

ADD REPLY

Login before adding your answer.

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