Noob is stuck trying to use samtools fixmate
Entering edit mode
22 months ago
cromcruach ▴ 70

Hi there I'm trying to follow the instructions here

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>
  -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

samtools • 2.0k views
Entering edit mode

From what I see, you stripped -O also off the BAM keyword, which is required. Might it be only that?

Entering edit mode

Thanks, I read it defaulted to bam without the keyword but following your advice I tried

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

It tells me that 'm' is an invalid option.

When I query samtools fixmate /? it says the only options are -r -p -c and -O

I ran samtools --version and it tells me I'm on 1.3.1 which I see is a version from 2016

I'll see if I can get the latest version installed and try again. Thanks.

Entering edit mode
22 months ago
cromcruach ▴ 70

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!


Login before adding your answer.

Traffic: 2884 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6