This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Sorting bam file in mac OS

Hi,

I don't know why I can't sort my bam files

dhcp179185:unknown$ samtools sort SRR1593424.bam SRR1593424_sorted
[bam_sort] Use -T PREFIX / -o FILE to specify temporary and final output files
Usage: samtools sort [options...] [in.bam]
Options:
  -l INT     Set compression level, from 0 (uncompressed) to 9 (best)
  -m INT     Set maximum memory per thread; suffix K/M/G recognized [768M]
  -n         Sort by read name
  -t TAG     Sort by value of TAG. Uses position as secondary index (or read name if -n is set)
software error rna-seq sequencing

2 answers

Do

samtools sort  -o SRR1593424_sorted SRR1593424.bam

Thank you

Your exact code worked

I've moved the comment to an answer Please accept it, thank you!

Did you read the error message?

Use -T PREFIX / -o FILE to specify temporary and final output files

You did not specify either.

I think you are copying the command written for a specific version of samtools, but the version you have is different and requires slightly different parameters.

Log in to answer this question.