Hi, I'd like to help, but I don't understand what the problem is.
The `bcftools mpileup .. | bcftools call` command calls variants, `bcftools consensus` then creates a fasta consensus sequence. Please read the documentation. http://samtools.github.io/bcftools/howtos/consensus-sequence.html http://samtools.github.io/bcftools/howtos/variant-calling.html http://samtools.github.io/bcftools/bcftools.html#consensus Petr On Thu, 2019-02-14 at 03:56 +0530, Renuka Agarwal wrote: > Hi > Thanks for you previous reply but I am still stuck to the same > probelm. I checked my calls.vcf.gz file and i realized that it has > details of reference fasta file. > I used the following command: > bcftools mpileup -Ou -f reference.fa alignments.bam | bcftools call > -mv -Oz -o calls.vcf.gz > bcftools index calls.vcf.gz > Can you please tell me the problem behind it. Instead of my data > file, the command is doing variant calling for the reference file. I > tried using the command without reference file (given below) but > still the problem didnt get resolved > bcftools mpileup -Ou --no-reference alignments.bam | bcftools call > -mv -Oz -o calls.vcf.gz > bcftools index calls.vcf.gz > > Thank you > Regards > Renuka Agarwal > Graduate student > IISER Mohali > > > On Tue, Feb 12, 2019 at 9:46 PM Petr Danecek <p...@sanger.ac.uk> > wrote: > > Hi, > > > > I don't see anything obviously wrong in your commands. Take a look > > in > > calls.vcf.gz, are there any variants? > > > > Here is a brief documentation, maybe it will give some useful > > pointers > > http://samtools.github.io/bcftools/howtos/consensus-sequence.html > > http://samtools.github.io/bcftools/howtos/variant-calling.html > > > > Best wishes, > > Petr > > > > > > > > > > On Tue, 2019-02-12 at 05:09 +0530, Renuka Agarwal wrote: > > > Hi > > > I am using samtools and bcftools to generate consensus sequences > > for > > > my microbiome data. After generating sorted bam file from > > samtools, I > > > used mpileup command of bcftools. > > > Commands were > > > bcftools mpileup -Ou -f reference.fa alignments.bam | bcftools > > call > > > -mv -Oz -o calls.vcf.gz > > > bcftools index calls.vcf.gz > > > Then for making consensus I used > > > bcftools consensus -f reference.fa calls.vcf.gz > consensus.fa > > > But the file that is being produced is actually my database file, > > > i.e., reference.fa= consensus.fa > > > Can anyone help why is it happening and what is sample file (-s), > > how > > > can i get that. > > > Thank you! > > > > > > Regards > > > Renuka Agarwal > > > PhD Scholar > > > IISER Mohali > > > _______________________________________________ > > > Samtools-help mailing list > > > Samtools-help@lists.sourceforge.net > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.source > > forg > > > e.net_lists_listinfo_samtools- > > > > > 2Dhelp&d=DwICAg&c=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo&r=xdv > > dT > > > > > aAZDWitAtUqWIZL0A&m=Ujv3HP7kyuPZTvvZxIU2n_snvGkskBB_Mgy_bFA6FgE&s=b > > EY > > > e8OcktUAq8FZ0zP1WZf40XwhB49ece4bs5IuZ9G8&e= > > > > > > -- The Wellcome Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help