Hi All...
I am trying to sort a .bam file created by STAR. I am trying to use samtools sort. I use the following command...
$ samtools sort *.bam -o *sorted.bam
I get a common error I have seen when you dont use the right arguments for the software...it is pages and pages of gibberish, like....
???????????????ndjsjkbiu2b3odn? >?????????
Hjvbqebdi3n2fonlk??????????????? ?????????
The .bam is not already sorted as when I try to use samtools index it says it is not sorted. I tried the direction arrow (>) instead of -o and it asks me to use -o.
Can someone help me trouble shoot this?
Is the -bam corrupted? Should I go back and redo the alignment with STAR and maybe send out put as a sorted -bam to save time? I already aligned 53 files and would prefer just to do the samtools sort.
Best,
Joe
Sorry. I am not trying to use the wild card. I just stuck that in there....
here is the actual command I try to use....
$ samtools sort XYZ.bam -o XYZ.sorted.bam
I get the error...
I tried..
$ samtools sort XYZ.bam > XYZ.sorted.bam
and the samtools program asks me to use -o.
if I have tried both -o and > and neither work what could be the problem?
Joe