Hello, I am trying to map with STAR but it is not clear to me why I am not getting the SAM/BAM mapping file, could you help me?
[epola@mazorka alignment_STAR]$ ls -lh
total 13M
-rw-rw-r-- 1 epola epola 13M Nov 17 12:34 SRR22164928SJ.out.tab
-rw------- 1 epola epola 0 Nov 17 12:37 STAR_error.log
-rw------- 1 epola epola 885 Nov 17 12:37 STAR_output.log
-rw-rw-r-- 1 epola epola 453 Nov 17 12:26 star_mapping.sh
My code:
#!/bin/bash
#PBS -N STAR_splice
#PBS -l nodes=1:ppn=16,vmem=64gb,walltime=10:00:00
#PBS -o STAR_output.log
#PBS -e STAR_error.log
# Carga el módulo de STAR
module load STAR/2.7.5a
STAR --genomeDir /LUSTRE/usuario/epola/project_2023/index_STAR \
--runThreadN 16 \
--readFilesIn /LUSTRE/usuario/epola/project_2023/trimming_data/SRR22164928_T.fastq.gz \
--outFileNamePrefix SRR22164928 \
--outSAMtype BAM SortedByCoordinate \
--readFilesCommand zcat
My output file:
Nov 17 12:26:53 ..... started STAR run
Nov 17 12:26:53 ..... loading genome
Nov 17 12:27:14 ..... started mapping
Nov 17 12:36:58 ..... finished mapping
Nov 17 12:36:59 ..... started sorting BAM
+---------------------------------------------------------------------+
| JOB INFORMATION |
+---------------------------------------------------------------------+
|
| Date : Fri Nov 17 12:37:00 CST 2023
| Hostname : node6
| Job ID : 289662.mazorka
| Username : epola
| Group : epola
| Job Name : STAR_mapping
| Session : 11125
| Limits : neednodes=1:ppn=16,nodes=1:ppn=16,vmem=64gb,walltime=10:00:00
| Resources : cput=01:58:53,energy_used=0,mem=25124744kb,vmem=25805380kb,walltime=00:10:07
| Queue : default
| Exit code : 1
|
[---------------------------------------------------------------------]
STAR is bad at sorting BAM. Either generate
BAM Unsorted
or use--limitBAMsortRAM
and set it to something like 48000000000.Agree with using the
--limitBAMsortRAM
flag, never ran STAR without it.Thanks for the recommendations, I'm trying something like this:
One more question, the process finished but nothing was generated, why is this?
Have you checked the
STAR
log files? What do they contain?It has already started generating the bam file with the indication of Ram.
You have write permissions to the directory where you are running this from? It looks like the mapping does work since there is 10 min spent in that. "Exit code 1" for PBS shows job failed before files.
Thanks, I already checked my directories:
More than likely the issue is one noted by @Ram above. Use the suggested solution.
I followed the suggestions and the process finished but nothing was generated.