This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Indexing human reference genome before STAR Mapping

Hi all,

I want to use STAR for mapping, but first I'm trying to build the indexes of my reference hg (I use Ensembl hg), since it is recommended to build our own indexes I run the following command:

STAR --runThreadN 12 --runMode genomeGenerate --outTmpDir tmp --genomeDir STAR_genome/ --genomeFastaFiles $ref_fa_dir --sjdbGTFfile $ref_gtf_dir --sjdbOverhang 100 --genomeChrBinNbits 15

but I still get this error:

EXITING because of fatal ERROR: could not make temporary directory: tmp
SOLUTION: (i) please check the path and writing permissions 
     (ii) if you specified --outTmpDir, and this directory exists - please remove it before running STAR

What I already tried:

1- run the command without the --outTmpDir option

2- chmod 777 to modify permissions in the current directory

3- create the temp directory in advance, and "chmod" it to 777

But the problem is still here

Any idea, suggestions to fix that error ?

star indexing error mapping

2 answers

The error says if you specified --outTmpDir, and this directory exists - please remove it before running STAR but you said you created the directory. Delete it.

Hi Igor,

I delete it, but I got the same error ().

the output of the following command (without the creation of any folder in advance)

STAR --runThreadN 12 --runMode genomeGenerate --outTmpDir tmp --genomeDir STAR_genome/ --genomeFastaFiles     $ref_fa_dir --sjdbGTFfile $ref_gtf_dir --sjdbOverhang 100 --genomeChrBinNbits 15

is the same like before. But if no --outTmpDir option is specified, I got the same error except the tmp/ directory which is replaced by the default STAR directory.

Finally, I have fixed the problem

Since I perform my STAR job on a cluster, and I submit that job using slurm script in which I specify the number of tasks = 2. I think that what throw the error. I fix the problem by assigning the number of tasks to 1. that's work fine now

have a nice day for all

this was an important bit of information, which you should have given in the beginning.

I have the same problem, could you please explain what you mean by and how you did: "slurm script in which I specify the number of tasks = 2 " thanks!

Log in to answer this question.