Hi all. I've noticed that in the latest update (v3...
# rnaseq
g
Hi all. I've noticed that in the latest update (v3.21) QUANTIFY_RSEM workflow is run with ch_transcriptome_bam instead of ch_strand_inferred_filtered_fastq (= FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS.out.reads). The pipeline now fails on RSEM_CALCULATEEXPRESSIONS process on the same samples that were run successfully on the previous v3.20. @Maxime Garcia what was the reason for changing this and is there a workaround? I understand we now have a support for running the pipeline with bam files, but why omitting support for fastqs? Thanks!
m
@Jonathan Manning any pointers on that 🙏 ?
j
Up to now, we were letting RSEM run STAR, which had issues for visibility and was blocking for the bam input pathway we wanted to implement. We separated out the alignment step. Detail here: https://github.com/nf-core/rnaseq/pull/1604, but maybe there's a lingering bug as part of that. But that's why the reads aren't passed- we run star separately and pass the alignments. @gordond could you file a bug please? Ideally something I can reproduce https://github.com/nf-core/rnaseq/issues
g
@Jonathan Manning RSEM_CALCULATEEXPRESSION module is still a part of the QUANTIFY_RSEM subworkflow, and inside the subworkflow it is called the same way as before. However, there's a difference how this QUANTIFY_RSEM subworkflow is called inside the RNASEQ workflow. In the previous version(s) it was called like this (Here's the link): QUANTIFY_RSEM ( ch_strand_inferred_filtered_fastq, ch_rsem_index, ch_fasta.map { [ [:], it ] }, params.use_sentieon_star ) Whereas in the latest version it is called like this (The link): QUANTIFY_RSEM ( ch_transcriptome_bam, ch_rsem_index, params.use_sentieon_star ) Even though the process itself supports both fastq and bam files, only bam files can be passed to the process in the main workflow .
j
Yes, I know, I wrote it 😉 QUANTIFY_RSEM can be passed FASTQ files or BAM files. We used to pass it FASTQ files and RSEM would call STAR. Now we call STAR ourselves and pass RSEM the resulting alignments.
But it is new functionality, so as I say, if you want to file a bug with the actual errors you're seeing, ideally something I can reproduce, I'll help you figure out what's gone wrong and we'll fix it.
g
The error message is:
The exit status of the task that caused the workflow execution to fail was: 2
Error executing process > 'NFCORE_RNASEQ:RNASEQ:QUANTIFY_RSEM:RSEM_CALCULATEEXPRESSION (cells_9)'
Caused by:
Essential container in task exited.
And in the process Execution log:
... --star-output-genome-bam cannot be set if input is SAM/BAM/CRAM format!
Unfortunately, I can't share more details (client's data) and there's nothing more in the log that points out to the error. What I noticed is when I change the input to the QUANTIFY_RSEM from
ch_transcriptome_bam
to
ch_strand_inferred_filtered_fastq
, everything works as expected. I'm trying to understand in which step (or line of code) in the latest version are fastqs passed to the ch_transcriptome_bam channel so they can be passed to the RSEM_CALCULATEEXPRESSION process.
m
Could you share an anonymised samplesheet to help us reproduce the error?
and command line
g
It is a standard samplesheet with test data that worked well on both 3.12 and 3.20 versions and it is run on Seqera Cloud platform. And all of the files are on client's laptop so I don't have direct access to them from this one.
And like I said, when I changed back the input for QUANTIFY_RSEM to ch_strand_inferred_filtered_fastq everything worked fine.
I understand this is a new feature to support bam as an input, but don't see it in the code how fastqs are passed to this process.
...aligner is star_rsem
j
Again, FASTQ files will not now be passed to this process, even with FASTQ input to the workflow. The only reason they were passed to the process previously was to allow RSEM to run STAR internally. That is no longer happening because the workflow will run STAR external to RSEM_CALCULATEEXPRESSION (though in exactly the same way that RSEM did it). I suspect mis-configuration.
--star-output-genome-bam
should no longer be passed to RSEM- I removed it from pipeline config (it used to be here: https://github.com/nf-core/rnaseq/blob/b971ba18d0f01dcc93a0597f8115cd55aeaa62a0/subworkflows/local/quantify_rsem/nextflow.config#L6). Are you passing custom config?
g
"I suspect mis-configuration.
--star-output-genome-bam
should no longer be passed to RSEM- I removed it from pipeline config (it used to be here" Yes, this might be due to the custom config. "Again, FASTQ files will not now be passed to this process, even with FASTQ input to the workflow." In that case why it says they are supported in the input of the RSEM_CALCULATEEXPRESSIONS process:
input:
tuple val(meta), path(reads)  // FASTQ files or BAM file for --alignments mode
j
Because the module supports both kinds of inputs. But that's not how the pipeline implements it.
g
So if I want to run the process with fastqs (as requested), I can either change back the input channel or have a failed process. This is a big change for those who are using rsem_calculateexpressions to process fastq files.
Also, this introduces confusion that fastq files are still supported by the pipeline:
input:
tuple val(meta), path(reads)  // FASTQ files or BAM file for --alignments mode
j
The current logic is functionally equivalent to the old, and FASTQ files are still supported by the pipeline. In the original iteration STAR was running and RSEM was taking STAR alignments to perform quantification. That is still the case. I went to quite some length to make sure that we run STAR externally the same way that RSEM runs it internally (see differential config logic here: https://github.com/nf-core/rnaseq/blob/9738a2df4225401cc2080c47684b171bb272e1b7/subworkflows/local/align_star/nextflow.config#L18). It just makes the STAR logic more explicit, and allowed us to provide the BAM input pathway. RSEM should working in exactly the same way, we're just doing some of its work for it in advance. The last release was a very thin one, pretty much just for that BAM input functionality. So there's no cost for you to stick with 3.20.0 if you object to these changes. It's important to understand that nf-core modules exist independently of workflows. That comment on the module is to help module users deploy it, it's not part of workflow documentation.
g
Okay, I see the logic behind this. So the missing part is in the config file. Great, thanks for clarification.
j
No worries!