What does the seperate "-" in bowtie2 command mean?

Hello.
In the MPA3 run_bowtie2 function, bowtie2 would be used like this:
gzip -d -c test.fa.gz | bowtie2 --quite --no-unal --very-sensitive -S - -x /db/metaphlan/mpa_v30/mpa_v30_CHOCOPhlAn_201901 -U - -f
Correlated codes in MPA3:

bowtie2_cmd = [exe if exe else 'bowtie2', "--quiet", "--no-unal", "--{}".format(preset),
             "-S", "-", "-x", bowtie2_db]

if int(nproc) > 1:
  bowtie2_cmd += ["-p", str(nproc)]

bowtie2_cmd += ["-U", "-"]  # if not stat.S_ISFIFO(os.stat(fna_in).st_mode) else []

if file_format == "fasta":
  bowtie2_cmd += ["-f"]

p = subp.Popen(bowtie2_cmd, stdout=subp.PIPE, stdin=readin.stdout)

There are two single “-” in command. the one before “-x” and the one in the end of command.
I want to know the function of the two single “-” in the command, and would it be the same if I use the following commands :
gzip -d -c test.fa.gz > test.fa
bowtie2 --quite --no-unal --very-sensitive -S -x /db/metaphlan/mpa_v30/mpa_v30_CHOCOPhlAn_201901 -U -f test.fa ?

I ask this because when I delete that “-” or merge the “-” with the “-x”, the command does not work.
:blush:

Specifying the -S and the -U parameters as - will output the sam file by standard output and get the input fasta from the standard input, respectively

1 Like