Don't think you'd get that error if he hadn't piped - it would just hang waiting for some input - Devon is right - incorrect versions of tools mixed together
you're definitely right. if not piping is the problem, then bcftools would be waiting for the input and no error message would be thrown out. Devon already stated that a couple of years ago.
EDIT: there are posts already out there (like this one or even this one) that state that an "invalid BCF2 magic string" error is due to incompatible versions of samtools/bcftools/htslib. this answer below is then just informative.
in several tools, when you use a command such as
bcftools call -mv - > Sequence.vcf
the - character is used to indicate that the input comes from STDOUT. if you're not piping this command to the previous mpileup then it doesn't make sense for bcftools.
Odds are very good that you're mixing versions of bcftools.
odds are that he's not piping this command
Don't think you'd get that error if he hadn't piped - it would just hang waiting for some input - Devon is right - incorrect versions of tools mixed together
you're definitely right. if not piping is the problem, then bcftools would be waiting for the input and no error message would be thrown out. Devon already stated that a couple of years ago.
I used samtools mpileup 0.1.18 and bcftools 1.3.1 what combination should I use instead? Thanks!
Either mpileup 0.1.18 + bcftools 0.1.18 or mpileup 1.3.1 + bcftools 1.3.1.