Hi there I'm trying to follow the instructions here 

[https://www.htslib.org/workflow/fastq.html][1]

However when I get to the second step and input:

    samtools fixmate -O bam,level=1 -m my.sam fixmate.bam

It tells me that level is an unknown option.

I tried stripping that part of the command so it ran

    samtools fixmate -O -m my.sam fixmate.bam

However it just tells me:

    Usage: samtools fixmate <in.nameSrt.bam> <out.nameSrt.bam>
    Options:
      -r           Remove unmapped reads and secondary alignments
      -p           Disable FR proper pair check
      -c           Add template cigar ct tag
          --input-fmt-option OPT[=VAL]
                   Specify a single input file format option in the form
                   of OPTION or OPTION=VALUE
      -O, --output-fmt FORMAT[,OPT[=VAL]]...
                   Specify output format (SAM, BAM, CRAM)
          --output-fmt-option OPT[=VAL]
                   Specify a single output file format option in the form
                   of OPTION or OPTION=VALUE
          --reference FILE
                   Reference sequence FASTA FILE [null]
    
    As elsewhere in samtools, use '-' as the filename for stdin/stdout. The input
    file must be grouped by read name (e.g. sorted by name). Coordinated sorted
    input is not accepted.

I tried transposing the -O and -m switches out of desperation but that doesn't run either.

Does anybody perhaps know what I'm doing wrong? Thanks


  [1]: https://www.htslib.org/workflow/fastq.html
So my problem was that I'd installed samtools from the universe repository and it was a really old version.

Now I installed the latest version manually the instructions I was following actually work fine.

Damn you universe repository guy!

