Sample Header Ad - 728x90

Pipe (pass the output of previous command to the next command) with "|" when using "bsub"

3 votes
3 answers
1092 views
Hi I guess this is a very basic question: Is there any specific syntax to do the "piping" when using "bsub"? I am asking that because when I had an issue like this: # try to run the same command successfully ran in another host bsub fastx_trimmer -Q33 -f 1 -l 230 -i myfile.fastq | fastq_quality_trimmer -Q33 -t 18 -l 20 -o Trimmed_file.fastq & but I met an error: fastq_quality_trimmer: input file (-) has unknown file format (not FASTA or FASTQ), first character = J (74) the second command seems not be able find out the output of the first command. # try to run command without using "|" bsub fastx_trimmer -Q33 -f 1 -l 230 -i myfile.fastq -o Trimmed_file.fastq # seemed to work! bsub fastq_quality_trimmer -Q33 -t 18 -l 20 -i Trimmed_file.fastq -o Trimme_file2.fastq & # Also seemed to work! # try to pipe again, did not work... bsub fastx_trimmer -Q33 -f 1 -l 230 -i myfile.fastq | fastq_quality_trimmer -Q33 -t 18 -l 20 -o Trimme_file2.fastq & # when call command without bsub, it seemed to work. fastx_trimmer -Q33 -f 1 -l 230 -i myfile.fastq | fastq_quality_trimmer -Q33 -t 18 -l 20 -o Trimme_file2.fastq & # so the issue seemed to be "bsub" I would like to use bsub because my host is using gate node (the previous host has no gate node, so it does not matter whether I use "bsub" or not), and I do not want to create "traffic jam" by running command in the gate node. Any suggestion?
Asked by Jun (541 rep)
Feb 24, 2017, 02:56 AM
Last activity: Jun 21, 2023, 02:48 PM