STAR alignment EXITING because of FATAL ERROR: could not create output file
2
1
Entering edit mode
4.9 years ago
gnomee ▴ 50

I am trying to align RNA-Seq data using STAR. However, STAR does not start the alignment, but exits with the following error:

   EXITING because of FATAL ERROR: could not create output file: /home/c479e/ANTCoN_analysis/STAR/65312-RNA-FFPE_L001_Log.out
Check if the path /home/c479e/ANTCoN_analysis/STAR/65312-RNA-FFPE_L001_ exists and you have permissions to write there

However, I do have permissions for writing in the directory.

My command was the following:

STAR --genomeDir hg_GRCh38/indexes/STAR/STAR_2.5.3a_Gencode32_100bp_completep \
    --sjdbGTFfile hg_GRCh38/gencode32/gencode.v32.annotation.gtf \
    --readFilesIn 65312-RNA-FFPE_S12_L001_R1_001_trimmed.fastq.gz 65312-RNA-FFPE_S12_L001_R1_001_trimmed.fastq.gz\
    --outFileNamePrefix /home/c479e/ANTCoN_analysis/STAR/65312-RNA-FFPE_L001_ \
    --runThreadN 12 --outSAMtype BAM SortedByCoordinate --outSAMstrandField intronMotif \
    --readFilesCommand zcat --outTmpDir /home/c479e/ANTCoN_analysis

I already tried lowering --runThreadN to 6, and setting ulimit -n to even 100k, but I still get the same error. Does anybody know what could be going wrong here?

STAR RNA-Seq • 9.7k views
ADD COMMENT
2
Entering edit mode
4.9 years ago
caggtaagtat ★ 1.9k

Hi, I think the argument --outFileNamePrefix wants to have a directory as an input, where the results of STAR will be saved.

If you just do this STAR run, I would first create the output directory

mkdir 65312-RNA-FFPE

and then execute STAR with this parameter:

--outFileNamePrefix /home/c479e/ANTCoN_analysis/STAR/65312-RNA-FFPE/

I guess you have paired end reads and the second file should have an R2 in the name? Is this just a spelling error here or also in the script?

--readFilesIn 65312-RNA-FFPE_S12_L001_R1_001_trimmed.fastq.gz 65312-RNA-FFPE_S12_L001_R1_001_trimmed.fastq.gz

should be?

--readFilesIn 65312-RNA-FFPE_S12_L001_R1_001_trimmed.fastq.gz 65312-RNA-FFPE_S12_L001_R2_001_trimmed.fastq.gz
ADD COMMENT
0
Entering edit mode

This solved it! I changed the --outFileNamePrefix to /home/c479e/ANTCoN_analysis/STAR/65312-RNA-FFPE/ as you suggested, and now it runs fine. I thought it was also possible to specify the first bit of the file name with --outFileNamePrefix. The R2 was a spelling error in the post, it is correct in my code. Thank you!

ADD REPLY
0
Entering edit mode
4.9 years ago
Thibault D. ▴ 700

Hi,

STAR error is pretty clear to me:

Check if the path /home/c479e/ANTCoN_analysis/STAR/65312-RNA-FFPE_L001_ exists and you have permissions to write there

Just run: touch /home/c479e/ANTCoN_analysis/STAR/65312-RNA-FFPE_L001_

And if you get errors while touch-ing, try: mkdir --parents /home/c479e/ANTCoN_analysis/STAR/

I often forget to create output directories too, these commands always fix the error or help me to understand real error beneath.

ADD COMMENT
0
Entering edit mode

The touch command worked, which was what puzzled me in he first place.

ADD REPLY

Login before adding your answer.

Traffic: 2503 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