Getting a consensus sequence with bcftools
0
0
Entering edit mode
5.9 years ago
owenz ▴ 20

I am trying to update a script for using on Hep C viral data. I have used bwa and samtools to align to reference and create a VCF file with mpileup.

What I am trying to do is to create a consensus FASTA sequence file with bcftools consensus command. This does not work.

bcftools consensus -f HCV1.fasta all_snps.vcf.gz >consensus.fa

I am not sure what to input as part of the -s flag. I am not sure I am understanding the biology behind it.

Thanks

next-gen sequencing software error • 3.1k views
ADD COMMENT
0
Entering edit mode

This does not work.

What happens? You don't get a consensus?

ADD REPLY
0
Entering edit mode

I get the following msg

Note: the --sample option not given, applying all records

I am not sure what to add as part of the --sample flag

ADD REPLY
0
Entering edit mode

If you file has a single sample then that is just an informational message.

ADD REPLY
0
Entering edit mode

The original script was written to take more than one file. BUt I guess I should create a new script for the consensus part to take up one file only?

The consensus file is being created but it is empty

ADD REPLY
0
Entering edit mode

If the file is empty then that is a different problem. Are the chromosome names matching in your VCF and the reference?

VCF's can have more than one sample (when the -s option would become relevant) so it is not about script per se.

ADD REPLY
0
Entering edit mode

Yes the VCF and the reference fasta have matching chromosome names

ADD REPLY
0
Entering edit mode

Hi owenz,

There is no need to delete threads.
Thank you,

Wouter

ADD REPLY
0
Entering edit mode

Hi Wouter,

Thanks for letting me know. I am new here.

Owen

ADD REPLY

Login before adding your answer.

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