nf-core / viralrecon

Assembly and intrahost/low-frequency variant calling for viral samples
https://nf-co.re/viralrecon
MIT License
111 stars 104 forks source link

primer_set is not taking param #391

Closed svarona closed 3 months ago

svarona commented 10 months ago

Description of the bug

In main.nf primer_set is always artic instead of params.primer_set

https://github.com/nf-core/viralrecon/blob/3731dd3a32a67a2648ea22c2bd980c224abdaee2/main.nf#L27

When it should be:

} else if (params.platform == 'nanopore') {
    primer_set          = params.primer_set

Else, it can give an error when using custom .bed primers

Command used and terminal output

nextflow run nf-core-viralrecon-2.6/workflow/main.nf \
          -c ./viralrecon_sars_nanopore.config \
          -params-file ./viralrecon_sars_params_nanopore.yml \
          --input samplesheet.csv \
          --outdir 20230303_viralrecon \
          --genome 'MN908947.3' \
          --fastq_dir ../../RAW/ESIB_EQA_2023.SARS1/ \
          -resume

Relevant files

viralrecon_sars_nanopore.config:

singularity {
    enabled = true
    autoMounts = true
        runOptions = '-B /data/bi/references/ -B /data/bi/pipelines/artic-ncov2019/'
}

process {
    executor = 'slurm'
    queue = 'middle_idx'
        withName: 'ARTIC_MINION' {
            ext.args = [
                '--normalise 500',
                '--scheme-directory /data/bi/pipelines/artic-ncov2019/primer_schemes/',
                '--medaka'
            ].join(' ').trim()
        }
        withName: 'PANGOLIN' {
            ext.args = '--datadir /data/bi/references/pangolin/20230227/'
            container = 'https://depot.galaxyproject.org/singularity/pangolin:4.2--pyhdfd78af_1'
        }
    withName: 'NEXTCLADE_DATASETGET|NEXTCLADE_RUN' {
        container = 'https://depot.galaxyproject.org/singularity/nextclade:2.9.1--h9ee0642_0'
    }
}
params {
        // Max resource options
    max_memory = 376.GB
    max_cpus = 32
    max_time = '48.h'
}

./viralrecon_sars_params_nanopore.yml:

platform: 'nanopore'
protocol: 'amplicon'
artic_scheme: 'nCoV-2019'
primer_set_version: 5
fasta: '/data/bi/pipelines/artic-ncov2019/primer_schemes/nCoV-2019/V5/ESIB-EQA.reference.fasta'
primer_bed: '/data/bi/pipelines/artic-ncov2019/primer_schemes/nCoV-2019/V5/ESIB-EQA.primer.bed'
primer_fasta: '../../RAW/ESIB_EQA_2023.SARS1/ESIB_EQA_2023.SARS1.primers.fasta'
kraken2_db: '/data/bi/references/eukaria/homo_sapiens/hg38/UCSC/kraken2/kraken2_human.tar.gz'
nextclade_dataset_name: 'sars-cov-2'
nextclade_dataset: false
nextclade_dataset_tag: '2023-02-25T12:00:00Z'
artic_minion_caller: 'medaka'
artic_minion_medaka_model: 'r941_min_fast_g303'

System information