Entering edit mode
3.4 years ago
foxiw
▴
10
Hi.
I'm having trouble aligning my reads with STAR. I've gone over my code and I can't find anything wrong with it, however when I send it to the queue it instantly fails. For some reason, the script doesn't produce an error or out file, so I don't even know what's wrong... This is my script:
#SBATCH --partition=defq # the requested queue
#SBATCH --nodes=1 # number of nodes to use
#SBATCH --tasks-per-node=1 # for parallel distributed jobs
#SBATCH --cpus-per-task=4 # for multi-threaded jobs
#SBATCH --mem-per-cpu=4G # in megabytes, unless unit explicitly stated
#SBATCH --error=logs/%J.err # redirect stderr to this file
#SBATCH --output=logs/%J.out # redirect stdout to this file
## Load star module
module load star-2.7.6a-gcc-8.3.1-r6xot7y
## Create shortcuts for STAR command
export workingdir=/mnt/scratch/c1818206/fastqs/merged_files/trimmedfiles/trimmedfiles_final
export refdir=/mnt/scratch/c1818206/fastqs/merged_files/trimmedfiles/trimmedfiles_final/genomeDir
# Run star command
for i in $(ls workingdir);
do
STAR \
--runMode alignReads \
--genomeDir $refdir \
--runThreadN ${SLURM_CPUS_PER_TASK} \
--readFilesIn $workingdir/$i\2.fastq.gz \
--outFileNamePrefix $workingdir/star/$i. \
--outSAMtype BAM Unsorted \
--outSAMunmapped Within \
--outSAMattributes Standard \
--quantMode GeneCounts \
--readFilesCommand gunzip -c
done;
The only thing I can think of is that my list is wrong, or that I'm trying to align zipped files (although the readFilesCommand should sort that), or that the order of the STAR parameters is incorrect. Any help would be much appreciated. Thanks.
Hi, Thanks. I've been fiddling with the STAR command and I have changed it to this now:
However, it still doesn't work and what's most frustrating is that it doesn't produce an error file, so I can't even check the error logs.