how to get a consensus sequence for each sample in a vcf file using a reference sequence?
0
0
Entering edit mode
2.8 years ago

Good morning everyone.

I have a vcf file containing variants call for 1142 individuals. I also have a reference sequence downloaded from a data base. I wish to get the sequence corresponding to each individuals in one fasta file ( to be able to do a multilpe alignment), those sequence should include the alternative variant at each positions for each individuals.

So far, I tried using bcftools consensus and loop over all the sample name, but I get "Applied 0 variants" and no file written

code used

data=" aa1 aa2 aa3 aa4 aa5"

for sample in $data
do
        cat Anopheles_gambiae_ACE1_sequence.fa | bcftools consensus Aceee.recode.vcf.gz -s $sample > '$sample.fa'
done

Can you please help me troubleshoot it?

Thanks

vcf fasta sequence • 549 views
ADD COMMENT

Login before adding your answer.

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