This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vcf from sorted bam

I am using bcftools to make vcf from sorted bam using:

bcftools mpileup -Ov -f ref.fa sorted.bam | bcftools call -mv -o sample.vcf

But I want to make a single vcf from multiple sorted bam files using bcftools with SNPs from each sorted bam. Thanks!

snp

1 answer

What is the question? You want to run your pileup on multiple bam files? Run the pileup on all the bam files and then do the SNP calling. As answered by Pierre in the link at the bottom.

bcftools mpileup [OPTIONS] -f ref.fa in.bam [in2.bam […]]

-b, --bam-list FILE
List of input alignment files, one file per line [null]

If this is answered your question... please try in the future to use the search function. https://www.biostars.org/p/372801/

Thanks! But I am looking for making a vcf file for multiple sorted bam files where the vcf has ALT bases like this:

POS Genotype 1  Genotype 2  Genotype n
1.     A                         T
2      G          G              C
n      A          T

Is there any way to do the same with vcftools!

Log in to answer this question.