STAR output
1
0
Entering edit mode
12 months ago
sansan96 ▴ 130

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 • 1.8k views
ADD COMMENT
2
Entering edit mode

STAR is bad at sorting BAM. Either generate BAM Unsorted or use --limitBAMsortRAM and set it to something like 48000000000.

ADD REPLY
1
Entering edit mode

Agree with using the --limitBAMsortRAM flag, never ran STAR without it.

ADD REPLY
0
Entering edit mode

Thanks for the recommendations, I'm trying something like this:

#!/bin/bash
#PBS -N STAR_mapping_2
#PBS -l nodes=1:ppn=16,vmem=64gb,walltime=10:00:00
#PBS -o STAR_output2.log
#PBS -e STAR_error2.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 Unsorted \
--readFilesCommand zcat
--limitBAMsortRAM 48000000000
ADD REPLY
0
Entering edit mode

One more question, the process finished but nothing was generated, why is this?

Nov 17 15:02:39 ..... started STAR run
Nov 17 15:02:39 ..... loading genome
Nov 17 15:02:51 ..... started mapping
Nov 17 15:19:50 ..... finished mapping
Nov 17 15:19:51 ..... finished successfully

+---------------------------------------------------------------------+
|                        JOB INFORMATION                              |
+---------------------------------------------------------------------+
|
|  Date      : Fri Nov 17 15:19:51 CST 2023
|  Hostname  : node6
|  Job ID    : 289667.mazorka
|  Username  : epola
|  Group     : epola
|  Job Name  : STAR_mapping_2
|  Session   : 11849
|  Limits    : neednodes=1:ppn=16,nodes=1:ppn=16,vmem=64gb,walltime=10:00:00
|  Resources : cput=02:09:30,energy_used=0,mem=25133628kb,vmem=25798068kb,walltime=00:17:12
|  Queue     : default
|  Exit code : 127




[epola@mazorka alig]$ ls
STAR_error2.log  STAR_output2.log  prueba.sh
ADD REPLY
1
Entering edit mode

Have you checked the STAR log files? What do they contain?

ADD REPLY
0
Entering edit mode

It has already started generating the bam file with the indication of Ram.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Thanks, I already checked my directories:

[epola@mazorka project_2023]$ ls -l
total 32
-rw------- 1 epola epola  149 Nov 16 01:23 STAR_error.log
-rw------- 1 epola epola 1452 Nov 16 01:45 STAR_output.log
drwxrwxr-x 2 epola epola 4096 Nov 17 14:14 alignment_STAR
drwxrwxr-x 2 epola epola 4096 Nov 16 00:27 genome_maize
drwxrwxr-x 2 epola epola 4096 Nov 16 01:45 index_STAR
drwxrwxr-x 3 epola epola 4096 Aug 16 12:31 raw_data
-rw-rw-r-- 1 epola epola  521 Nov 16 01:23 star_index.sh
drwxrwxr-x 3 epola epola 4096 Nov 16 18:24 trimming_data

ADD REPLY
1
Entering edit mode

More than likely the issue is one noted by @Ram above. Use the suggested solution.

ADD REPLY
0
Entering edit mode

I followed the suggestions and the process finished but nothing was generated.

Nov 17 15:02:39 ..... started STAR run
Nov 17 15:02:39 ..... loading genome
Nov 17 15:02:51 ..... started mapping
Nov 17 15:19:50 ..... finished mapping
Nov 17 15:19:51 ..... finished successfully

+---------------------------------------------------------------------+
|                        JOB INFORMATION                              |
+---------------------------------------------------------------------+
|
|  Date      : Fri Nov 17 15:19:51 CST 2023
|  Hostname  : node6
|  Job ID    : 289667.mazorka
|  Username  : epola
|  Group     : epola
|  Job Name  : STAR_mapping_2
|  Session   : 11849
|  Limits    : neednodes=1:ppn=16,nodes=1:ppn=16,vmem=64gb,walltime=10:00:00
|  Resources : cput=02:09:30,energy_used=0,mem=25133628kb,vmem=25798068kb,walltime=00:17:12
|  Queue     : default
|  Exit code : 127
|
[---------------------------------------------------------------------]


[epola@mazorka alig]$ ls
STAR_error2.log  STAR_output2.log  prueba.sh
ADD REPLY
2
Entering edit mode
12 months ago
Ram 44k

That's weird. Do you see directories named *_STARtmp, *_STARgenome etc while STAR is in the mapping step?

Can you also try giving the full path + prefix to the --outFileNamePrefix argument please? Just run sed -i "s|outFileNamePrefix|outFileNamePrefix $PWD/|" prueba.sh and then qsub prueba.sh.

ADD COMMENT
0
Entering edit mode

With what you tell me, information began to be generated:

[epola@mazorka alig]$ ls -l
total 1355824
-rw-rw-r-- 1 epola epola 1388314624 Nov 17 15:49 SRR22164928Aligned.out.bam
-rw-rw-r-- 1 epola epola      30348 Nov 17 15:47 SRR22164928Log.out
-rw-rw-r-- 1 epola epola        354 Nov 17 15:48 SRR22164928Log.progress.out
drwx------ 2 epola epola       4096 Nov 17 15:47 SRR22164928_STARtmp
-rw-rw-r-- 1 epola epola        532 Nov 17 15:47 prueba.sh


[epola@mazorka alig]$ ls -l
total 1388592
-rw-rw-r-- 1 epola epola 1421869056 Nov 17 15:49 SRR22164928Aligned.out.bam
-rw-rw-r-- 1 epola epola      30348 Nov 17 15:47 SRR22164928Log.out
-rw-rw-r-- 1 epola epola        354 Nov 17 15:48 SRR22164928Log.progress.out
drwx------ 2 epola epola       4096 Nov 17 15:47 SRR22164928_STARtmp
-rw-rw-r-- 1 epola epola        532 Nov 17 15:47 prueba.sh
ADD REPLY
1
Entering edit mode

I'll move my comment to an answer, please accept it to provide closure to your post. Also, please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. If your code has long lines with a single command, break those lines into multiple lines with proper escape sequences so they're easier to read and still run when copy-pasted. I've done it for you this time.
code_formatting

ADD REPLY
0
Entering edit mode

Thank you very much for all the help. Super accurate.

ADD REPLY
1
Entering edit mode

upvote_bookmark_accept

ADD REPLY

Login before adding your answer.

Traffic: 2314 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6