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

Trim-galore fails at quality check for some samples but not others #131

Closed bonzay36 closed 2 years ago

bonzay36 commented 2 years ago

Dear Felix,

I love the program and as a novice in bioinformatics, I find it relatively easy to understand and run. I wrote a script and the following code works just fine for the first sample,

mkdir "~/path/to/output/folder" donors="sample" for donor in $donors do trim_galore -q 28 --fastqc_args "--outdir ~/path/to/output/folder" --illumina --max_n 1 --trim-n -o trimmed_fastqc --clip_R1 8 --clip_R2 8 --paired "~/path/to/${donor}_R1_001.fastq.gz" "~/path/to/${donor}_R2_001.fastq.gz" done

but I get the following error report when it moves to the second sample. sample.fastq.gz_trimming_report.txt

Any suggestions would be greatly appreciated. Thanks!

FelixKrueger commented 2 years ago

This is an error thrown by Cutadapt (rather than by Trim Galore itself), and I am currently unsure where this is coming from.

May I suggest you you simply move to the folder containing your input files, and try out a command such as this:

cd /path/to/input/
trim_galore -q 28 --trim-n --clip_R1 8 --clip_R2 8 --paired *.fastq.gz

This should then tell you if Trim Galore/Cutadapt work from a technical point of view.

bonzay36 commented 2 years ago

You're right of course, my apolgies. It's an error by cutadpat.

I've previously run the script in the same location as the file itself, and that didn't work either. However, I tried the script on a different file in the meantime, and it worked just fine. I'm assuming there might be something wrong with that particular input file, although I'm not sure what it could be since I get a trimmed file, and I can run quality control with fastq manually on that trimmed file.

FelixKrueger commented 2 years ago

That makes sense, Maybe you can re-download the failing file? So I'll just close this issue for the moment. Good luck!