This is a test version of Biostars. For the public version, visit https://www.biostars.org.
STAR alignment error: Genome_genomeGenerate.cpp:208:genomeGenerate: exiting because of *OUTPUT FILE* error: could not create output file ./GenomeDir/

I'm trying to run STAR alignment software on macOS Sierra to index the genome. The command is:

STAR --runThreadN 4 --runMode genomeGenerate --genomeFastaFiles $GENOME --sjdbGTFfile $ANOTATION --sjdbOverhang 99

And it gives the error:

Jun 28 15:21:51 ..... started STAR run
Jun 28 15:21:51 ... starting to generate Genome files
Genome_genomeGenerate.cpp:208:genomeGenerate: exiting because of *OUTPUT FILE* error: could not create output file ./GenomeDir//chrName.txt
Solution: check that the path exists and you have write permission for this file

I have 'read and write' permissions for both input files. As suggested somewhere, I have tried to reduce the number of threads, and to increase the limit number of files that can be open at the same time with:

ulimit 10000000
ulimit -n

Nothing worked. Any ideas?

rna-seq star

2 answers

At a minimum add --genomeDir some_dir that you actually have write permissions to write to, so a specific location is available to store the indexes.

you were right. it was missing

It occurred to me, too. I specified --genomeDir some_dir, but did not create the directory prior to executing the command, and it still through the same error. it turns out you need to have an existing directory. The command can not create the directory for you!

Log in to answer this question.