Entering edit mode
9.8 years ago
jz6002
▴
10
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:
- use TMAP to get the .sam file
- use samtools to convert sam file to bam file
- use samtools to sort the bam file
- use samtools to remove duplicates
- use bamaddrg to add read group
- use picard to reorder the bam file
- use samtools to sort the reordered bam file
- 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?
Thank you
Try 1, 2 3, 5, 4, 8 and freebayes.
But in the manual of freebayes, they suggested to remove the duplicates. Why skip this step? Thank you.
Sorry, I shouldn't have omitted it, typo. I corrected answer.
I have followed your suggested steps, got the same error:
Is freebayes able to analysis bam files of different samples together?