How can I use trim_galore with ruffus. The problem I'm facing is that the value of the output in trim_galore is a path to a directory but in transform decorator in ruffus the output should be a file name! How can I specify the output for trim_galore in transform to be a path to a directory?
# Trim paired end reads in FASTQ to the reference producing a BAM file
pipeline.transform(
task_func=stages.trim_galore,
name='trim_galore',
input=output_from('original_fastqs'),
filter=formatter('.+/(?P<sample>[a-zA-Z0-9]+)_R1.fastq.gz'),
add_inputs=add_inputs('{path[0]}/{sample[0]}_R2.fastq.gz'),
output=r"{path[0]}/" # This is causing the problem!
)