Entering edit mode
2.9 years ago
vinishavvenugopal
▴
30
Hi,
I'm trying to run STAR on multiple samples. I used the following code:
lis=$(ls *R1_001_out.fastq)
for file in $lis
do
base=${file%R1*}
echo $base
read1=/home/vinisha/globus/Nadine/Tgen_choroid_samples/transcriptomic_analysis/unzip/${base}R1_001_out.fastq
read2=/home/vinisha/globus/Nadine/Tgen_choroid_samples/transcriptomic_analysis/unzip/${base}R2_001_out.fastq
/home/vinisha/STAR-2.5.2b/source/STAR-2.5.2b --genomeDir /home/vinisha/STAR-2.5.2b/source \
--readFilesIn $read1 $read2 \
--runThreadN 9 \
--sjdbGTFfile /home/vinisha/STAR-2.5.2b/source/Homo_sapiens.GRCh37.75_new.gtf \
--outFileNamePrefix /home/vinisha/globus/TGEN_STAR/${base}/out_ \
--runMode alignReads \
--outSAMtype BAM Unsorted \
--outSAMmode Full \
--outSAMstrandField intronMotif \
--outFilterType BySJout \
--outSAMunmapped Within \
--outSAMmapqUnique 255 \
--outFilterMultimapNmax 20 \
--outFilterMismatchNmax 999 \
--outFilterMismatchNoverLmax 0.1 \
--alignMatesGapMax 1000000 \
--seedSearchStartLmax 50 \
--alignIntronMin 20 \
--alignIntronMax 1000000 \
--alignSJoverhangMin 18 \
--alignSJDBoverhangMin 18 \
--chimSegmentMin 18 \
--chimJunctionOverhangMin 18 \
--outSJfilterOverhangMin 18 18 18 18 \
--alignTranscriptsPerReadNmax 50000 \
--limitBAMsortRAM 31000000000
done;
It runs for the first sample, the second one starts but it gets killed. Did anyone experience the same?
Thanks,
Vinisha
What's the error message?
I don't get any error. The log file is clean but it stops right after thread 8.
Last few lines of log file:
put
echo
before /home/vinisha/STAR-2.5.2b/source/STAR-2.5.2b to debug and see what's happening. And use a workflow manager.I run the code in a script. I added a log file, and it looks like:
It stops here.
Print all variables before you run the code. In addition, in the loop, do (middle arguments before done) must end with
;
. I do not see that. Is it copy/paste problem?The variables are good, I checked them. The thing is sometimes it executes for two iterations and then stops during the third and most of the times it stops in the second iteration. I run it on a CentOS server which has 32gb RAM, I connect via putty. Is there any other reason that it gets terminated?
probably, your ssh session is getting timed out. try using screen or tmux to keep the process in background. Even if it disconnects from the server, it would be still running in the back ground. Check also the system resources you have allocated for this process, for eg threads (9 out of ?), RAM (31gb for bam IO). Some times it could be heating problem. Delay the loop by 30s or 1 min.