trim_galore: Unable to create directory File exists
0
0
Entering edit mode
4 months ago
olechnwin ▴ 30

Hi All,

I'm hoping someone can help me. I'm running trim_galore in a pipeline to automate trimming multiple fastq files. It works for some paired fastq files but then failed with "Unable to create directory <directory_name> File exists". This is the code I ran trim_galore:

trim_galore -q 20 --length 20 --illumina -o trim --paired  fastq_pair1 fastq_pair2 --fastqc --fastqc_args '--outdir fastqc_rslt'

Example of fastq_pair1 is

../fastq/D9_20-0658_563R2/D9_20-0658_563R2_S68_L002_R1_001.sub.fastq.gz

and fastq_pair2 is

../fastq/D9_20-0658_563R2/D9_20-0658_563R2_S68_L002_R1_001.sub.fastq.gz

It supposed to run trim_galore for each pair and put them in trim directory. trim_galore works for other pairs but will fail for some and generates "Unable to create directory trim/ File exists" error. I should add that if I ran the same code to process the same fastq files, trim_galore will fail for different pairs.

I'm puzzled. I already checked that the filenames are unique and trimmed file D9_20-0658_563R2_S68_L002_R1_001 is not yet in the trim directory.

Anyone has any idea how to fix this? Trim_galore version is 0.6.6

Thanks in advance for your help.

next-gen trim_galore RNA-Seq ChIP-Seq • 210 views
ADD COMMENT
0
Entering edit mode

The output directory already exists or created by trim_galore? Also, have you tried to run the script without specifying the output directory?

ADD REPLY
0
Entering edit mode

Thanks for your reply. That's what I thought at first that it failed because trim directory already exist. However, trim_galore was ran for 20 paired fastq files and it will randomly fail for some but not all of them. So, it tries to create trim directory every time and and no error for the other pairs. I'm going to try run the script without specifying the output directory now.

ADD REPLY
0
Entering edit mode

Please show the script that runs it on all files.

ADD REPLY
0
Entering edit mode

I've been getting consistently no error when I run the script without specifying the output directory. It seems to be the answer for now. I'll wait until I've ran several more samples to be sure the error doesn't happen again.

ADD REPLY

Login before adding your answer.

Traffic: 1595 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6