FelixKrueger / TrimGalore

A wrapper around Cutadapt and FastQC to consistently apply adapter and quality trimming to FastQ files, with extra functionality for RRBS data
GNU General Public License v3.0
467 stars 151 forks source link

specify output file for pipelines ? #102

Closed colindaven closed 4 years ago

colindaven commented 4 years ago

Hi,

using this to trim Nextera transposase seqs, which works great, I found it very strange that I can't specify an output file.

This is not great for a pipeline which I am adding it to (or did I overlook something?).

Is there any reason an output file / files option would be unworkable ?

Thanks

FelixKrueger commented 4 years ago

Hi Colin,

Instead of allowing users to specify completely arbitrary names, you can choose to use a basename instead of letting Trim Galore derive the name from the input filenames. This is from the --help:

--basename <PREFERRED_NAME>

Use PREFERRED_NAME as the basename for output files, instead of deriving the filenames from the input files.
Single-end data would be called PREFERRED_NAME_trimmed.fq(.gz), or PREFERRED_NAME_val_1.fq(.gz) and
PREFERRED_NAME_val_2.fq(.gz) for paired-end data. --basename only works when 1 file (single-end) or 2
files (paired-end) are specified, but not for longer lists.

Since the filenames are completely predicable, this behaviour should be fairly easy to implement in a pipeline, or simply use rename afterwards. I hope this is acceptable?

colindaven commented 4 years ago

Hi Felix,

thanks for the prompt reply. I prefer to have complete control over the name to keep is short. I solved this with an additional mv command in the pipeline.

Colin