I am trying to run the command
samtools sort -@ 12 in.bam -O bam in_sorted using samtools version 1.1.
However this gives me the error:
Legacy usage: samtools sort [options...] <in.bam> <out.prefix> Options: -f Use <out.prefix> as full final filename rather than prefix -o Write final output to stdout rather than <out.prefix>.bam -l,m,n,@ Similar to corresponding options above 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 -o FILE Write final output to FILE rather than standard output -O FORMAT Write output as FORMAT ('sam'/'bam'/'cram') (either -O or -T PREFIX Write temporary files to PREFIX.nnnn.bam -T is required) -@ INT Set number of sorting and compression threads 
Should I not use -O and -@ with this version of samtools to specify that I want to use 12 threads and my output to be a bam file?
Thank you in advance for your help!