Hi <#C0493FQQZ3P|>, I have a question about usage...
# rnasplice
m
Hi #C0493FQQZ3P, I have a question about usage of genome (reference fasta, gtf, and STAR index) for my
nf-core
rnasplice
analysis. Is the run utilizing my indicated genome files path (see below) or AWS iGenomes. The reason why I am asking this because I did not specify
--igenomes_ignore \
and
--genome null \
Additionally, I see a
salmon
folder in my output, is this using my my indicated genome files path or AWS iGenomes? My interest is to obtain the transcript level (
ENSTxxxxxxxxxxx
) level data values. Does it makes to run
--aligner star
or
--aligner star_salmon
Copy code
nextflow run /projects/toufim/nfcore_rnasplice/1_0_4/rnasplice \
--input /flashscratch/toufim/23_Palucka_003_004_samplesheet.csv \
--contrasts /flashscratch/toufim/23_Palucka_003_004_Contrastsheet.csv \
--outdir /flashscratch/toufim/ \
--fasta /projects/toufim/GENCODE/GRCh38.p14_Release_47/GRCh38.primary_assembly.genome.fa \
--gtf /projects/toufim/GENCODE/GRCh38.p14_Release_47/gencode.v47.primary_assembly.annotation.gtf \
--star_index /projects/STAR_INDEX/STAR_Index_GENCODE/hg38_sjdbOver_150_merged_gtf/ref/ \
--aligner star \
--gencode \
--gtf_extra_attributes gene_id \
--rmats_paired_stats false \
--rmats_read_len 151 \
--sashimi_plot false \
--dexseq_dtu false \
-resume
Output files:
Copy code
[tf@sm-log4 RNAsplice_23pal003004]$ ll
total 592
-rw-r--r-- 1 tf jx 238277 Nov 20 14:42 23Pal003004_RNAsplice_mergedgtf_19NOV2024.txt
-rw-r--r-- 1 tf jx     50 Nov 19 11:16 23_Palucka_003_004_Contrastsheet.csv
-rw-r--r-- 1 tf jx    981 Nov 19 11:16 23_Palucka_003_004_samplesheet.csv
drwxr-xr-x 2 tf jx     41 Nov 19 21:31 contrastsheet
drwxr-xr-x 2 tf jx    760 Nov 19 21:56 fastqc
drwxr-xr-x 2 tf jx    311 Nov 24 00:29 Isoform_Analysis
drwxr-xr-x 4 tf jx     98 Nov 20 14:42 multiqc
drwxr-xr-x 2 tf jx    359 Nov 20 14:42 pipeline_info
-rw-r--r-- 1 tf jx   1289 Nov 19 21:18 runBatch_rnasplice.sh
drwxr-xr-x 8 tf jx    381 Nov 20 01:33 salmon
drwxr-xr-x 8 tf jx    535 Nov 20 09:39 star
drwxr-xr-x 3 tf jx    544 Nov 19 23:45 trimgalore
[tf@sm-log4 RNAsplice_23pal003004]$ ll salmon/tximport/
total 331648
-rw-r--r-- 1 tf jx  3263624 Nov 20 01:33 salmon.merged.gene_counts_length_scaled.tsv
-rw-r--r-- 1 tf jx  3264672 Nov 20 01:33 salmon.merged.gene_counts_scaled.tsv
-rw-r--r-- 1 tf jx  2012423 Nov 20 01:33 salmon.merged.gene_counts.tsv
-rw-r--r-- 1 tf jx  2369960 Nov 20 01:33 salmon.merged.gene_tpm_length_scaled.tsv
-rw-r--r-- 1 tf jx  2369960 Nov 20 01:33 salmon.merged.gene_tpm_scaled.tsv
-rw-r--r-- 1 tf jx  2369960 Nov 20 01:33 salmon.merged.gene_tpm.tsv
-rw-r--r-- 1 tf jx  3626705 Nov 20 01:33 salmon.merged.gi.ls.rds
-rw-r--r-- 1 tf jx  3154303 Nov 20 01:33 salmon.merged.gi.rds
-rw-r--r-- 1 tf jx  3620829 Nov 20 01:33 salmon.merged.gi.s.rds
-rw-r--r-- 1 tf jx 28140526 Nov 20 01:33 salmon.merged.transcript_counts_dtu_scaled.tsv
-rw-r--r-- 1 tf jx 28139852 Nov 20 01:33 salmon.merged.transcript_counts_length_scaled.tsv
-rw-r--r-- 1 tf jx 28141518 Nov 20 01:33 salmon.merged.transcript_counts_scaled.tsv
-rw-r--r-- 1 tf jx 21359817 Nov 20 01:33 salmon.merged.transcript_counts.tsv
-rw-r--r-- 1 tf jx 22686120 Nov 20 01:33 salmon.merged.transcript_tpm_dtu_scaled.tsv
-rw-r--r-- 1 tf jx 22686120 Nov 20 01:33 salmon.merged.transcript_tpm_length_scaled.tsv
-rw-r--r-- 1 tf jx 22686120 Nov 20 01:33 salmon.merged.transcript_tpm_scaled.tsv
-rw-r--r-- 1 tf jx 22686120 Nov 20 01:33 salmon.merged.transcript_tpm.tsv
-rw-r--r-- 1 tf jx 20635785 Nov 20 01:33 salmon.merged.txi.dtu.rds
-rw-r--r-- 1 tf jx 20640359 Nov 20 01:33 salmon.merged.txi.ls.rds
-rw-r--r-- 1 tf jx 17915132 Nov 20 01:33 salmon.merged.txi.rds
-rw-r--r-- 1 tf jx 20614134 Nov 20 01:33 salmon.merged.txi.s.rds
-rw-r--r-- 1 tf jx 14682446 Nov 20 01:33 suppa_tpm.txt
-rw-r--r-- 1 tf jx 14494034 Nov 20 01:33 tximport.tx2gene.tsv
t
It should be using your FASTA, GTF, and STAR index. You don't have to supply the
--igenomes_ignore
, that's mostly there if you suspect that something from iGenomes is getting loaded and is somehow interfering. You can check the
execution_report_*.html
or the
.nextflow.log
for the work directories of the STAR processes, and if you go to one of those, you should find a symlink (most likely) to your STAR index, for example. The #C0493FQQZ3P pipeline has several tools that can work at the transcript level and analyze "differential transcript usage" (DTU). I am not entirely sure what the difference between the
--aligner
options is, I suspect
star_salmon
will run Salmon on top of STAR to quantify the transcripts, like the default workflow in #CE8SSJV3N. You could then use that output to do your statistics (including gene expression).
m
@Thomas Danhorn Thank you for the reply. I input
hg38.fa
and
LUAD_v3.gencode_v44.merged.gtf
In addition, I do see
NFCORE_RNASPLICE:RNASPLICE:PREPARE_GENOME:SALMON_INDEX (genome.transcripts.fa)
( execution_report_*.html (attached). I am not sure where this file is coming from:
genome.transcripts.fa
t
This shows that it spent some time making a FASTA file with the transcripts (which Salmon needs, and probably other tools as well) from the genome FASTA and the GTF you supplied. This is expected and good, because if it were taking things from iGenomes, that would probably already be there.
👍 1
m
@Thomas Danhorn I have information about the transcripts from a long-read PacBio experiment, and I would like to use those as the gene annotation for the short reads. I am interested in performing isoform/transcript analysis to determine the extent of their presence. Hence, I was concerned whether the genome files (FASTA/GTF/index) were indeed picked from my files or from iGenomes. Now, it’s clear. Now, I want to understand the difference between the
--aligner
options when set to
--aligner star
or
--aligner star_salmon
. The details on the nf-core rnasplice are not clear. It seems the
rnasplice
pipeline offers the use of STAR (i.e., -
-aligner star
) to map raw FastQ reads to a reference genome and to project the alignments onto the transcriptome. It says downstream quantification can also be performed following STAR alignment with Salmon when
--aligner star_salmon
is chosen. This option aligns with STAR and quantifies using Salmon (
--aligner star_salmon
). I initiated two different runs by setting: Both generates
salmon
result folder (see below). 1. `--aligner star`: Generates
salmon
result folder 2. `--aligner star_salmon`: Generates both
star_salmon
and
salmon
result folder Is there a way to turn off the generation of
salmon
folder? Is this because of the
--pseudo_aligner salmon
parameter?
Copy code
./RNAsplice_23pal003004_aligner_star_salmon:
total 480K
drwxr-xr-x  9 tf jx  430 Nov 26 16:21 .
drwxr-xr-x  4 tf jx  149 Nov 26 15:50 ..
-rw-r--r--  1 tf jx  42K Nov 26 17:07 23Pal003004_RNAsplice_mergedgtf_26NOV2024_v2.txt
-rw-r--r--  1 tf jx   50 Nov 26 15:50 23_Palucka_003_004_Contrastsheet.csv
-rw-r--r--  1 tf jx  981 Nov 26 15:50 23_Palucka_003_004_samplesheet.csv
drwxr-xr-x  2 tf jx   41 Nov 26 15:58 contrastsheet
drwxr-xr-x  2 tf jx  760 Nov 26 16:27 fastqc
drwxr-xr-x  4 tf jx   69 Nov 26 15:58 .nextflow
-rw-r--r--  1 tf jx 127K Nov 26 17:23 .nextflow.log
drwxr-xr-x  2 tf jx   96 Nov 26 15:58 pipeline_info
-rw-r--r--  1 tf jx 1.4K Nov 26 15:57 runBatch_rnasplice.sh
drwxr-xr-x  3 tf jx   23 Nov 26 16:00 salmon
drwxr-xr-x  4 tf jx   54 Nov 26 16:00 star_salmon
drwxr-xr-x 25 tf jx  471 Nov 26 16:00 work

./RNAsplice_23pal003004_v1:
total 456K
drwxr-xr-x  9 tf jx  420 Nov 26 17:25 .
drwxr-xr-x  4 tf jx  149 Nov 26 15:50 ..
-rw-r--r--  1 tf jx  33K Nov 26 16:35 23Pal003004_RNAsplice_mergedgtf_26NOV2024.txt
-rw-r--r--  1 tf jx   50 Nov 26 15:44 23_Palucka_003_004_Contrastsheet.csv
-rw-r--r--  1 tf jx  981 Nov 26 15:44 23_Palucka_003_004_samplesheet.csv
drwxr-xr-x  2 tf jx   41 Nov 26 15:48 contrastsheet
drwxr-xr-x  2 tf jx  760 Nov 26 16:14 fastqc
drwxr-xr-x  4 tf jx   69 Nov 26 15:48 .nextflow
-rw-r--r--  1 tf jx 110K Nov 26 17:23 .nextflow.log
drwxr-xr-x  2 tf jx   96 Nov 26 15:48 pipeline_info
-rw-r--r--  1 tf jx 1.3K Nov 26 15:47 runBatch_rnasplice.sh
drwxr-xr-x  3 tf jx   23 Nov 26 15:50 salmon
drwxr-xr-x  3 tf jx   31 Nov 26 15:49 star
drwxr-xr-x 23 tf jx  431 Nov 26 15:50 work
t
Is there a way to turn off the generation of
salmon
folder? Is this because of the
--pseudo_aligner salmon
parameter?
I'm pretty sure it is. This runs Salmon as a pseudo-aligner, i.e. it just aligns reads to the transcriptome (nothing to introns or intergenic regions). STAR aligns to the whole genome, and with
star_salmon
to then takes these alignments and quantifies the ones that map the transcriptome using Salmon (that's basically what the rnaseq pipeline does by default).
m
@Thomas Danhorn Thank you. I am interested to retrieve the
salmon.merged.transcript_counts_scaled.tsv
file for downstream transcript isoform analysis from my custom GTF file. If I don’t turn off the
--pseudo_aligner salmon
then from which location does it makes to retrieve the transcript_counts_scaled file?
/star_salmon/tximport/
OR
/salmon/
directory? Here is the example from the nf-core rnasplice output results: https://nf-co.re/rnasplice/1.0.4/results/rnasplice/results-1d0494ae3402d1a46e0adadad24f81a0ff855c77/
t
The one from
star_salmon/tximport/
is from
--aligner star_salmon
, the other one from the
--pseudoaligner salmon
. You can compare and see if there are major differences, but I would hope not. I would be inclined to trust the first one more, but if there are large differences, it might make sense to investigate what is going on.
👍 1
m
@Thomas Danhorn thank you for the guidance.
👍 1
@Thomas Danhorn there’s a minor difference, maybe between
salmon/tximport/salmon.merged.transcript_counts_scaled.tsv
and
star_salmon/tximport/salmon.merged.transcript_counts_scaled.tsv
👍 1
t
That looks very similar to me. Note that Salmon seems to have a stochastic component, so even if you run it twice on the same data, there is will be differences.
👍 1
m
@Thomas Danhorn another related question, I got this email message indicating the process was killed for my 4 samples, however the submitted job was completed I am not sure if there’s something incomplete. I have also attached the execution report.
Copy code
A process running under your user ID has been terminated by the system because it attempted to use more memory than requested or allowed.
 
When:       Nov 27 at 12:39 AM
Node:       sumner063
User:       toufim (63623)  Mohammed Toufiq
Program:    salmon
PID:        3371005
 
Job ID:     3117297    OUT_OF_MEMORY
Job Name:   nf-NFCORE_RNASPLICE_RNASPLICE_SALMON_QUANT_STAR_(DD21_progenitors)
Partition:  compute
QOS:        batch
Requested:  36G Memory  [6 CPUs]
Elapsed:    1 hrs, 46 mins, 13 secs
 
Memory:     Limit: 36G       Used: 36G
Swap:       Limit: 1.8G      Used: 1.8G
 
Command:    sbatch .command.run
t
If the process was killed because it ran out of memory, something is almost certainly incomplete and needs to be rerun. Have a look at the
.nextflow.log
(or maybe the
execution_report_*.html
) and search for a
jobID
of
3117297
, there should be a non-zero exit code (on a cluster typically
137
for OOM). If you get a
0
exit code for some reason, triple-check the output of the process to make sure that everything is like it should be, because that seems very unlikely. The solution, of course is, to allocate more RAM. Normally the pipeline is set up to repeat failed processes with certain exit codes (including
137
) with double the resources (but limited to the maxima you set with
max_{cpus,memory,time}
). This is controlled by
errorStrategy
and
maxRetries
, which you can set in a config file. You can also use
withName
in a
process
clause and set
memory = '72 GB'
(or whatever you need). Note this fixes the
memory
allocation to this value, so it would not be increased by a rerun, unless you incorporate that explicitly.
👍 1
m
@Thomas Danhorn thanks much.
👍 1