samtools warning in sort file bam
1
0
Entering edit mode
4.6 years ago

The script I have is

samtools sort '/home/rasoul/Desktop/tophat_out-16/accepted_hits.bam' accepted_hitssort.bam

the command is not executed

Why?

RNA-Seq • 848 views
ADD COMMENT
1
Entering edit mode
4.6 years ago
wm ▴ 570

you need to check the version of samtools you use, and the help messages (samtools sort arguments changed (like after v0.9?), introduced -o option for output file)

For example, I use version 1.9, and the command line like this:

$ samtools sort -o accepted_hitssort.bam  /home/rasoul/Desktop/tophat_out-16/accepted_hits.bam

Here are the version and help message.

$ samtools --version
samtools 1.9
Using htslib 1.9
Copyright (C) 2018 Genome Research Ltd.

$ samtools sort 
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)
  -o FILE    Write final output to FILE rather than standard output
  -T PREFIX  Write temporary files to PREFIX.nnnn.bam
      --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]
  -@, --threads INT
               Number of additional threads to use [0]
ADD COMMENT

Login before adding your answer.

Traffic: 2521 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6