Question: trim_galore: Unable to create directory File exists
0
gravatar for olechnwin
12 days ago by
olechnwin30
olechnwin30 wrote:

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.

ADD COMMENTlink modified 12 days ago • written 12 days ago by olechnwin30

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

ADD REPLYlink written 12 days ago by Arup Ghosh2.7k

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 REPLYlink modified 12 days ago • written 12 days ago by olechnwin30

Please show the script that runs it on all files.

ADD REPLYlink written 12 days ago by ATpoint44k

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 REPLYlink written 11 days ago by olechnwin30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2314 users visited in the last hour
_