generating multiple outputs

24 views
Skip to first unread message

ben curran

unread,
Sep 9, 2018, 9:10:50 AM9/9/18
to bpipe-discuss
Apologies, this is probably something terribly basic, but I haven't been able to figure this out. I'm trying to set up a pipeline that trims two fastq files using trim_galore and then aligns using bwa.

My trim stage, looks like this:

trim = {
multi "module load TrimGalore",
"trim_galore -q 30 --length 50 --paired $input1.gz $input2.gz > $output.gz",
"rename 's/_val_1.fq.gz/.fastq.trim.gz/' *",
"rename 's/_val_2.fq.gz/.fastq.trim.gz/' *",
}

Given that there are supposed to be two, trimmed output files, my first thought was to use:
"trim_galore -q 30 --length 50 --paired $input1.gz $input2.gz > $output1.gz $output2.gz"
That however, results in the the command not working at all. If I manually run the trim_galore commadn from the command line, it works. If I drop it to a single file in the bpipe command, rather than a paired end, it works.

Just to make matters worse, trim_galore has no means of specifying the output file names, nor does it print to stdout. So I have to rename the output files to the same structure as the bpipe structure would generate. Doing this however, means that (I think) bpipe is only keeping track of one file across stages, so when it hits the align stage, which is expecting two inputs, it falls over, i.e. I get:
"Expected 2 or more inputs but fewer provided"

How does one generate and pass multiple outputs? The only reference to multiple outputs in the documentation that I can see is in the variables section when talking about extension syntax, which mentions it and then talks about $input1, $input2 etc referencing distinct files. i.e. there's nothing in that section that's helping me.

Any thoughts, much appreciated.


Cheers
Ben.

Reply all
Reply to author
Forward
0 new messages