nf-core / crisprseq

A pipeline for the analysis of CRISPR edited data. It allows the evaluation of the quality of gene editing experiments using targeted next generation sequencing (NGS) data (`targeted`) as well as the discovery of important genes from knock-out or activation CRISPR-Cas9 screens using CRISPR pooled DNA (`screening`).
https://nf-co.re/crisprseq
MIT License
25 stars 25 forks source link

No such variable CUTADAPT (v.2.2.0) #180

Closed joannakraw closed 2 weeks ago

joannakraw commented 1 month ago

Description of the bug

Problem description:

I encountered an error while running the pipeline with the cutadapt option, specifically when passing adapter sequences using the five_prime_adapterand three_prime_adapterparameters. The pipeline execution fails with the following error message:

ERROR ~ No such variable: CUTADAPT

 -- Check script '/pod-data/pipelines/new_crisprseq/with_error/crisprseq/./workflows/crisprseq_screening.nf' at line: 89 or see '.nextflow.log' file for more details

Workaround:

I have resolved this issue locally by making the following changes:

Modified code

In the workflows/crisprseq_screening.nf:

        //set adapter seq to null to make it compatible with crispr targeted
        ch_cutadapt = ch_input.combine(Channel.value([[]]))
        if(params.five_prime_adapter) {
            CUTADAPT_FIVE_PRIME(
                ch_cutadapt
            )
            CUTADAPT_FIVE_PRIME.out.reads.combine(Channel.value([[]])).set { ch_cutadapt }
            ch_cutadapt.map{ meta, fastq, proto  ->
                meta.id = "${meta.id}_trim"
                [meta, fastq, proto]
            }.set { ch_cutadapt }

            ch_multiqc_files = ch_multiqc_files.mix(CUTADAPT_FIVE_PRIME.out.log.collect{it[1]})
            ch_versions = ch_versions.mix(CUTADAPT_FIVE_PRIME.out.versions)
        }

        if(params.three_prime_adapter) {
            CUTADAPT_THREE_PRIME(
                ch_cutadapt
            )
            ch_cutadapt = CUTADAPT_THREE_PRIME.out.reads.combine(Channel.value([[]]))
            ch_multiqc_files = ch_multiqc_files.mix(CUTADAPT_THREE_PRIME.out.log.collect{it[1]})
            ch_versions = ch_versions.mix(CUTADAPT_THREE_PRIME.out.versions)
        }

Command used and terminal output

nextflow run main.nf -profile k8s,docker -params-file parameters.json

ERROR ~ No such variable: CUTADAPT

 -- Check script '/pod-data/pipelines/new_crisprseq/with_error/crisprseq/./workflows/crisprseq_screening.nf' at line: 89 or see '.nextflow.log' file for more details

Relevant files

No response

System information

Nextflow info:

LaurenceKuhl commented 1 month ago

Hi @joannakraw thank you so much!! Would you actually mind opening a PR with your contribution? If you're unsure how to go about it i would be happy to help! Laurence

joannakraw commented 1 month ago

Hi @LaurenceKuhl, thanks for such a quick reply! I will try to do this, and let you know in case of any problems. Best, Joanna

LaurenceKuhl commented 1 month ago

Hi Joanna,

Thanks!! don't hesitate to just open it and tag me if you have any questions :)

LaurenceKuhl commented 2 weeks ago

Hi @joannakraw, could you let me know why you re opened this? thanks!

joannakraw commented 2 weeks ago

Hi @LaurenceKuhl, I've clicked close by mistake, so I've reopened it again. I didn't know if I'm supposed to close this issue or you, sorry for the confusion!

LaurenceKuhl commented 2 weeks ago

All good :D I'll close it again, unless you are still experiencing issues even with your bug fix then please re-open it :)