alexdobin / STAR

RNA-seq aligner
MIT License
1.85k stars 506 forks source link

STAR stuck at alignment with error end of input stream, nextChar=-1 #1884

Closed ilya-pangea closed 1 year ago

ilya-pangea commented 1 year ago

Hello, I have installed STAR (along with other tools) in a docker image. When I run STAR from the docker container on our server (where the image was also built), it runs and then gets stuck. If I look in the log file, I find: Thread #4 end of input stream, nextChar=-1 Attached is the log file. When I run the same container on a different server (on AWS), STAR completes. I noticed issue #627 and tried building the image with STAR dynamic, static and from source. All gave the same result. I assume this has something to do with working with the docker container?

Log.out.txt

alexdobin commented 1 year ago

Hi @ilya-pangea

that message may indicate a problem with input. What is your command line for STAR?

ilya-pangea commented 1 year ago

Hi @alexdobin , The command line appears at the beginning of the log I attached in my original post. Here is the relevant part of the log:

STAR version=2.7.10b
STAR compilation time,server,dir=2023-06-20T08:43:58+00:00 :/usr/local/src/STAR-2.7.10b/source
STAR git: 
##### Command Line:
STAR --outSAMtype None --outSAMmode None --genomeDir /opt/enlight/tmppsoa5if1/0.genome --readFilesIn /opt/enlight/tmppsoa5if1/1.cutadapt/UHR_Rep1_ERCC-Mix1_Build37-ErccTranscripts-chr22.read1_trimmed.fastq /opt/enlight/tmppsoa5if1/1.cutadapt/UHR_Rep1_ERCC-Mix1_Build37-ErccTranscripts-chr22.read2_trimmed.fastq --runThreadN 48 --readFilesCommand cat --outFilterMultimapScoreRange 1 --outFilterMultimapNmax 20 --outFilterMismatchNmax 10 --alignIntronMax 500000 --alignMatesGapMax 1000000 --sjdbScore 2 --alignSJDBoverhangMin 1 --genomeLoad NoSharedMemory --outFilterMatchNminOverLread 0.33 --outFilterScoreMinOverLread 0.33 --sjdbOverhang 100 --outSAMstrandField intronMotif

I don't believe the problem is in the input since the same command in the same docker works on the AWS server but gets stuck on our inhouse server.

alexdobin commented 1 year ago

Hi @ilya-pangea

not sure what's going on here, the Log.out actually does not contain anything suspicious, Thread #4 end of input stream, nextChar=-1 message is benign. After threads are "completed", there should be "joined" messages in the Log.out file, which are not there. So this could be an issue with threading libraries. Have you tried running STAR outside of docker?

ilya-pangea commented 1 year ago

In the past, others in our team have tried running outside of docker with similar issues. We need this to work from the docker on any server same as it does on EC2 instances. Thanks, Ilya.

ilya-pangea commented 1 year ago

Hi @alexdobin, I took another look at the logs of a completed (on AWS) and a stuck (on our local server) run. I noticed that in the stuck run some threads are just not completed (1, 2, 3 and 4) and there are no joined messages at all because thread # 1 does not complete. I was hoping to at least find a way to detect when is the run stuck using the log file but I am not sure if the behavior of the threads can be expected to reproduce. We need to either be certain that a run will not be stuck on any machine or a way to catch the case that it did get stuck. Thanks, Ilya.

ilya-pangea commented 1 year ago

So I tried downloading the same files we have on AWS to our server again just to make sure I run the code on the same input. Now it ran to completion. It must have been the genome index that caused the issue because the reads were from new public data. Thank you for your time. Best, Ilya.