The first link has weird text. Are they using 2 as a stand-in for to? It's crazy seeing such usage on a popular website.
@Bella_p: The sub-headers in the tldp site have text that goes std### 2 file and so on. Please mentally substitute each 2 with a to when you read those sub-headers. It has nothing to do with the actual 2 in that context, which is the file descriptor for stderr (usage like 2>)
Bella_p, I just noticed something: You're using
${samtools}and${bowtie_source}, notsamtoolsandbowtie. Why is that?Because OP is wrapping samtools around a bash script, and wrapping the bash script around python.
Maybe snakemake or nextflow would be useful to OP.