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
462 stars 150 forks source link

Output file name after trimming #17

Closed divy-kangeyan closed 6 years ago

divy-kangeyan commented 6 years ago

Hi, After trimming, trimGalore returns the following extension for paired end sequencing _val_1.fq.gz and val_2.fq.gz. Is there a way to specify the base name for the output files.

Thank you, Divy

FelixKrueger commented 6 years ago

Trim Galore doesn't have a specific setting to name the output files, but since its names are derived from the input file you can use a quick rename command afterwards to change them to something you like more, e.g.:

rename _val_1.fq.gz trimmed_R1.fq.gz *

I hope this helps.

divy-kangeyan commented 6 years ago

I was just wondering if there is a direct way to do it in TrimGalore before I rename the file, I will rename the file then. Thank you for the reply!

TBradley27 commented 6 years ago

Hello there,

Firstly, I would just like to say - great tool! It has been very handy for me.

Sorry to comment on this closed issue - but I would just like to add, is that I have tried renaming the output files. However, if you use the --fastqc option with trim_galore, then fastqc will generate its reports using the old file names (i.e. _val_1.fq, _val_2.fq).

In my workflow, I would then typically run MultiQC on a range of fastQC reports (and reports from other tools), in which case MultiQC will display the old file names.

As a result, in my current workflow, I am running trim_galore without the --fastqc option, renaming the files, and then running fastqc independently from trim_galore.

Thanks, Thomas

ibwoo commented 5 years ago

I have the same issue as @TBradley27, the tool is great but this naming issue could be such an easy and useful fix!

FelixKrueger commented 5 years ago

Heya, maybe it would be an idea to rename the files just before kicking off the FastQC process? Say we we would allow an option --basename <favourite_name>, the files would then be called: favourite_name_trimmed.fq.gz for single-end data, or favourite_name_val_1.fq.gz and favourite_name_val_2.fq.gz for paired-end data.

Do you think that would help?

hkeward commented 5 years ago

@FelixKrueger I would appreciate this change - it seems like an easy addon feature and it would simplify things measurably.

FelixKrueger commented 5 years ago

Hi Heather,

I have tried to add a new option --basename PREFERRED_NAME to rename the files (in #43). Is this what you were after? Just clone the dev version and let me know.