What is the "-" option of samtools?
1
0
Entering edit mode
5.4 years ago
vw ▴ 40

Hi all,

I saw a command line:

samtools view -u alignment.sam | samtools sort -@ 4 - output_prefix

from samtools (conversion from .sam to .bam) and sorting of .bam file

I don't know the function of the - before the output_prefix. I cannot find it in the manual book.

Could you help me figure out it?

Thank you!

samtools • 1.6k views
ADD COMMENT
2
Entering edit mode
5.4 years ago

'-' just means stdin/standard input

http://www.htslib.org/doc/samtools-1.2.html

Samtools is designed to work on a stream. It regards an input file - as the standard input (stdin) and an output file - as the standard output (stdout).

ADD COMMENT
0
Entering edit mode

Thank you! You solved my question.

ADD REPLY

Login before adding your answer.

Traffic: 1632 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