Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helpful error message when strandedness cannot be infered #1390

Closed
simoxb opened this issue Sep 23, 2024 · 5 comments · Fixed by #1405
Closed

Helpful error message when strandedness cannot be infered #1390

simoxb opened this issue Sep 23, 2024 · 5 comments · Fixed by #1405

Comments

@simoxb
Copy link

simoxb commented Sep 23, 2024

Description of feature

When running the rnaseq workflow wit the infer_strandedness step, it came to my attention that when neither the stranded_threshold nor the unstranded_threshold is reached, the workflow aborts with the following error message:

ERROR ~ No such variable: strandedness

 -- Check script 'rnaseq/workflows/rnaseq/../../subworkflows/local/utils_nfcore_rnaseq_pipeline/../../nf-core/fastq_qc_trim_filter_setstrandedness/main.nf' at line: 38 or see '.nextflow.log' file for more details
ERROR ~ Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting

 -- Check '.nextflow.log' file for details

This is because of the following code snippet in rnaseq/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/main.nf:

        if (forwardProportion >= stranded_threshold) {
            strandedness = 'forward'
        } else if (reverseProportion >= stranded_threshold) {
            strandedness = 'reverse'
        } else if (proportionDifference <= unstranded_threshold) {
            strandedness = 'unstranded'
        }

If neither threshold is reached, the strandedness variable isn't initialized, leading to the workflow crashing. I think a more helpful error message would be great here, or maybe even a standard value of the strandedness variable to prevent the workflow from crashing?

PS: Not sure if this is a bug or a feature request.

@mdozmorov
Copy link

I experienced the same error, for the first time after many successful runs. The error message, No such variable: strandedness, is confusing, would be helpful to have more informative one

@JaeungJayJang
Copy link

JaeungJayJang commented Oct 9, 2024

I just faced this problem as well while using the workflow. I checked the code and found that there is a variabled called library_strandedness that is not called within the file. was this meant to be the default variable for another variabled called strandedness? @pinin4fjords, Can I ask what this variable do?

    def library_strandedness = 'undetermined'

@pinin4fjords
Copy link
Member

Ahh, thanks for flagging this everyone. I'll push a fix ASAP.

@pinin4fjords
Copy link
Member

nf-core/modules#6763

@pinin4fjords
Copy link
Member

Addressed in #1405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants