bcftools consensus trying to apply the alternative allele if my sample is homozygous or heterozygous alternative for the site
0
0
Entering edit mode
6.7 years ago
shinken123 ▴ 150

Hi all

I am using bcftools consensus to add the alternative SNPs to a fasta file.

I am running it in two ways:

bcftools consensus -i -s sample1 -f reference.fasta file.vcf.gz > pseudoreference.fasta

bcftools consensus -H A -s sample1 -f reference.fasta file.vcf.gz > pseudoreference2.fasta

With my first command line to run bcftools, I get the alternative allele in the new fasta only when my sample is homozygous alternative. Below is an example of that where I show the SNP region and the SNP position highlighted in bold and the vcf line of the SNP with the sample info highlighted in bold also.

position 10:410-420

Reference:            GTAGTTTAATT

Pseudoreference   GTAGTTTAATT

VCF region

10 416 . T C 548.44 PASS AC=2;AF=0.500;AN=4;BaseQRankSum=2.10;ClippingRankSum=0.367;DP=36;ExcessHet=4.7712;FS=32.570;MLEAC=2;MLEAF=0.500;MQ=44.99;MQRankSum=-2.196e+00;QD=15.23;ReadPosRankSum=-1.220e-01;SOR=5.669 GT:AD:DP:GQ:PL 0/1:10,9:19:99:325,0,319 0/1:10,7:17:99:252,0,259

position 10:2820-2830

Reference           TTCCTGCCTTT

Pseudoreference TTCCTTCCTTT

VCF region

10 2825 . G T 253.54 PASS AC=3;AF=0.750;AN=4;BaseQRankSum=-6.840e-01;ClippingRankSum=0.322;DP=12;ExcessHet=3.0103;FS=0.000;MLEAC=3;MLEAF=0.750;MQ=43.74;MQRankSum=-6.840e-01;QD=21.13;ReadPosRankSum=-9.560e-01;SOR=0.495 GT:AD:DP:GQ:PL 1/1:0,4:4:12:164,12,0 0/1:3,5:8:99:119,0,104

I would like to have always the alternative SNP even if the sample is heterozygous so I try the second bcftools script that is above and the result is the next error:

Can't apply 17-th haplotype at 10:416

Do you know how I can add to my fasta always the alternative allele if my sample is heterozygous or homozyguous for the alternative allele?

Best Wishes,

SNP sequence • 2.5k views
ADD COMMENT

Login before adding your answer.

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