variant calling samtools

Hello, I am having trouble when doing variant calling with samtools. I am getting only the header an no variants. If I would instead use Freebayes, I do get a lot of variables, and with Gatk, I get just a few. What can the problem be? Do I have to use different formats of bam input files, or different reference genome formats?

This is the command I am running:

samtools mpileup -go output/"$r1"/BWA_samtools_"$r1".bcf -f “$Re1” output/"$r1"/"$r1"RG_bwa.bam
bcftools call -vmO v -o output/"$r1"/BWA_samtools
"$r1".vcf output/"$r1"/BWA_samtools_"$r1".bcf

and this is the empty header I am getting:


thank you very much in advance!

Are you developing a tool for galaxy? Your question looks like a more general bioinformatics question and not galaxy related. On a bio-it forum you would get a better and much faster answer.

Nevertheless, as far as my knowledge goes your command is not correct. You are missing a reference (-f) for mpileup. (I was blind or something :upside_down_face:)

Also try to use bcftools mpileup because samtools mpileup is deprecated.

Have you seen this page already? Variant calling

Thank you for your response! I am using a -f “$Re1” for a hg38 reference genome. I have seen that page, but it does not give me a hint on why is my command leading to no variants being found :frowning:

1 Like

You may need to add the parameter -A to the mpileup command.

1 Like

great! Now I have one variant! Should I have more? with Freebayes I have around 20.
On another note, what does that flag do?

Thank you!

You can find the parameters and settings here:

There are some differences between freebayes and samtools in default settings like minimum quality, minimum depth etc. You would need to compare it and play around with it to get the desired result. Also dont necessarily expect the same output, it are two different tools.

I personally only have used freebayes and can’t help you much more with it. Maybe someone else can give an better answer but this forum is pretty galaxy specific so you may get an better answer somewhere else.

1 Like