Trouble with alignment using STAR - unknown error
1
0
Entering edit mode
4 months 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 --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

## 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 \ --genomeDirrefdir \
--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. RNA-seq alignment STAR • 200 views ADD COMMENT 0 Entering edit mode 4 months ago Tiny error: for i in(ls workingdir);


should be:

for i in $(ls$workingdir);

0
Entering edit mode

Hi, Thanks. I've been fiddling with the STAR command and I have changed it to this now:

workingdir=ls *.fastq.gz
for i in $workingdir; do STAR --genomeDir$refdir \
--runThreadN ${SLURM_CPUS_PER_TASK} \ --readFilesIn$workingdir/$i \ --outFileNamePrefix$workingdir/star/\$i. \
--outSAMtype BAM Unsorted \
--outSAMunmapped Within \
--outSAMattributes Standard \
--quantMode GeneCounts \
done


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.