Invalid Value: ' ' is not a writable directory --Help!

Hi everyone!

I'm new to both bioinformatics and Qiime, and I've been running into an issue that's stopped me in my tracks! I've been working on a project with mycobiome samples and when I try to run either qiime itsxpress, qiime feature-classifier, and qiime cutadapt, it tells me that my output value is incorrect. My goal is to trim the sequences I have so I can make a feature table and create a list of taxonomy. Most recently, I've been working with cutadapt so I'll be focusing on that line of code. I try to run the following line:

qiime cutadapt trim-single 
--i-demultiplexed-sequences Forward-single-end-demux.qza 
--o-trimmed-sequences Forward-demux-trimmed-single.qza

And I get the following error message:

(1/1) Invalid value for '--o-trimmed-sequences': ' ' is not a writable directory, cannot write output to it.

I'm using qiime2-2022.2, and installed it via conda. This is on a server that I recently gained permissions for. From my understanding, all that --o-trimmed-sequences is asking for is a new file name for it to write to, so I don't know why the code doesn't work! This only happens for the lines of code I try to write––I worked through the Fungal ITS tutorial and it works there.

I've also taken a look at this post, this post, and this post and nothing has worked! Any help would be greatly appreciated!

Katherine Benjamin

Hello Katherine,

You are so close!

When you did this tutorial, where were you writing the output files? I ask because you could try running your new data set in the same location and see if it works.

We could also look at the directory permission to see if you can write to your current working directory.

(base) [email protected]:~$ pwd # Get current directory
(base) [email protected]:~$ ls -la # list directory (Long & All)
total 113244
drwxr-xr-x 1 biouser biouser      512 Jun 16 22:36 .
drwxr-xr-x 1 root    root         512 Jan 26  2021 ..
^            d for directory
 ^^^         owner permissions
    ^^^      group permissions
       ^^^   global/other permissions

r is read
w is write
x is eXecute
so rwx is all three and r-x is read and execute (but not write)

Using ls -al, what are the permission in your current working directory?

1 Like

Thank you for the reply, Colin!

I was writing the tutorial files in a directory I created within our shared folder. All of the other work I do is in folders created by other people within my team. Something interesting I noticed when checking these folders was that the one I made (fungal-its-tutorial) seems different because it doesn't have the unhbiol411 tag like all the others do––I'm not sure what that would mean.

I checked the permissions within the folder I'm working on (FPIES_Children_mycobiome) and as long as I'm part of the group, I have read/write/execute permissions for everything within the file. Global permissions are only set to read. Because of this, it must have to do with that keenekbenjamin/unhbiol114 issue.

When I check my group using the command 'groups', I'm under keenekbenjamin––could it be that I'm not part of the group? So it's giving me global permissions instead of group ones?

Thanks for telling me more about your setup. Sounds like that directory should work well, including your group settings.

Mike pointed out part of the error I missed:

That looks like an empty string '' is being passed as the output path, which would cause issues. Are you copy/pasting these commands from a word processor that adds white spaces? Can you try that command again and make sure there are no extra spaces hiding inside?

I'm typing them directly into my terminal. I tried it with the itsxpress command (with the same issue) and this is exactly what I put into the terminal:

qiime itsxpress trim-single 
--i-per-sample-sequences Forward-single-end-demux.qza 
--p-region ITS1 
--p-taxa F 
--o-trimmed Forward-single-end-demux-trimmed.qza

It spit out the same message:

There was a problem with the command:                     
(1/1) Invalid value for '--o-trimmed': '' is not a writable directory, cannot
write output to it.
1 Like

I wonder if this is a permissions issue after all... :thinking:

Can you rerun one of those commands, add in the --verbose flag, and post the full message. This wordy error message will give us more details to see what's going on.


I ran the same command as my last message (itsxpress) with the --verbose flag and this is what I get:

Usage: qiime itsxpress trim-single [OPTIONS]
ITSxpress trimSingle is used for qza types with SquencesWithQuality or
JoinedSequencesWithQuality. This means the qza must be in the
SingleLanePerSampleSingleEndFastqDirFmt, and only contain one fastq file.
The taxa list and variable for it:
A = Alveolata
B = Bryophyta
C = Bacillariophyta
D = Amoebozoa
E = Euglenozoa
F = Fungi
G = Chlorophyta (green algae)
H = Rhodophyta (red algae)
I = Phaeophyceae (brown algae)
L = Marchantiophyta (liverworts)
M = Metazoa
O = Oomycota
P = Haptophyceae (prymnesiophytes)
Q = Raphidophyceae
R = Rhizaria
S = Synurophyceae
T = Tracheophyta (higher plants)
U = Eustigmatophyceae
ALL = All
--i-per-sample-sequences ARTIFACT SampleData[SequencesWithQuality]
The artifact that contains the sequence file(s).
Either Joined Paired or just a single fastq. One file
sequences in the qza data folder. [required]
--p-region TEXT Choices('ITS2', 'ITS1', 'ALL')
The regions ITS2, ITS1, and ALL that can be selected
from. [required]
--p-taxa TEXT Choices('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'L',
'M', 'ALL', 'O', 'P', 'Q', 'R', 'S', 'T', 'U')
The selected taxonomic group sequenced that can be
selected from. [default: 'F']
--p-threads INTEGER The number of processor threads to use in the run.
[default: 1]
--p-cluster-id NUMBER Range(0.97, 1.0, inclusive_end=True)
The percent identity for clustering reads, set to 1
for exact dereplication. [default: 0.995]
--o-trimmed ARTIFACT SampleData[SequencesWithQuality]
The trimmed sequences from ITSxpress. [required]
--output-dir PATH Output unspecified results to a directory
--verbose / --quiet Display verbose output to stdout and/or stderr
during execution of this action. Or silence output if
execution is successful (silence is golden).
--example-data PATH Write example data and exit.
--citations Show citations and exit.
--help Show this message and exit.

There was a problem with the command:
(1/1) Invalid value for '--o-trimmed': '' is not a writable directory, cannot write output to it.

I notice now that I've put the text into the preformatted HTML, there is no space like you were talking about in the above post:

In my block of text, it's formatted as '' but looks like ' '.

I also wonder if what the message talks about with "SingleLanePerSampleSingleEndFastqDirFmt" is important. I'm not sure what format the file I have is in, but I know it is SampleData[SequencesWithQuality] so it should work.

I also wanted to include the bash report, since this was something interesting I noticed as well. I run it with bash -x to troubleshoot, and got this:

I'm not sure which line would be line 4, but something seems to be stopping my code from running in the first place. And this makes me think it might be a permissions issue as well––is line 4 the --i-per-sample-sequences command? It could be something to do with not reading my file in the first place––but since it's the right file type, I have no clue why that would be!

This is all so weird!! Thank you again for all of your continued help on this.

1 Like

I think you may be right. Let's investigate this more.

When you tried to write to the fpies_children_micobiome directory, you were not part of the unhbiol411 group. And since the global permissions are set to read-only, it makes sense that you can't write to a specified output file (hence, the error message: is not a writable directory).

Can you try adding your user (keenebenjamin) to the unhbiol411 group as described here? You may find you can't run these commands, and will need to email a system admin to run these commands for you. They will definitely be able to add your user account to a group.

1 Like

I contacted my admin and they added me to the correct group! Looks like my commands run, and I was able to make some visualizations! Thanks so much for your help!

Katherine Benjamin