Hi, this is my first time to use freebayes. I met a problem when I tried to use it to do the variant calling for 2 samples together.
I just use the command
freebayes -f ref.fasta a.bam b.bam > c.vcf.
Then, I got the error msg as : mismatched sort order in b.bam, expected unsorted, but found coordinate. Does this mean it expected b.bam to be unsorted?
I followed the manual , all the bam files have been sorted, marked duplicates, added read groups, reordered and indexed.
The way I used to get the bam files for freebayes are:
1. use TMAP to get the .sam file
2. use samtools to convert sam file to bam file
3. use samtools to sort the bam file
4. use samtools to remove duplicates
5. use bamaddrg to add read group
6. use picard to reorder the bam file
7. use samtools to sort the reordered bam file
8. use samtools to index the sorted reordered bam file
Then, I use the freebayes to do the calling for two files and got the above error.
Can anyone give me some suggestions?