diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1809eaf3..d9e783ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,7 @@ jobs: profile: "conda" - isMaster: false profile: "singularity" + fail-fast: false # run all tests even if one fails steps: - name: Check out pipeline code @@ -88,4 +89,4 @@ jobs: - name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}" run: | - nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results_${{ matrix.test_name }} + nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results_${{ matrix.test_name }}_${{ matrix.profile }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 29bb29f3..e53dde61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Make output of FluteMLE optional as when some pathways produce bugs some channels are then empty ([#190](https://github.com/nf-core/crisprseq/pull/190)) - Fix a typo in crisprcleanr/normalize, when a user inputs a file ([#192](https://github.com/nf-core/crisprseq/pull/192)) +### General + +- Run pipeline tests with docker, singularity and conda on CI ([#185](https://github.com/nf-core/crisprseq/pull/185)) + ## [v2.2.1 Romarin Curie - patch](https://github.com/nf-core/crisprseq/releases/tag/2.2.1) - [23.07.2024] ### Fixed diff --git a/README.md b/README.md index 3b6be505..e55f34a9 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,10 @@ nextflow run nf-core/crisprseq --input samplesheet.csv --analysis [!WARNING] > Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files). +> [!WARNING] +> Since Nextflow 23.07.0, Nextflow no longer mounts the host's HOME directory when using Apptainer or Singularity. MAGeCKFlute needs HOME directory write access. As a workaround, you can revert to the old behavior by setting the environment variable NXF_APPTAINER_HOME_MOUNT or NXF_SINGULARITY_HOME_MOUNT to true in the machine from which you launch the pipeline. +> `export NXF_SINGULARITY_HOME_MOUNT=true; nextflow run nf-core/crisprseq --input samplesheet.csv --analysis screening --outdir -profile ` + For more details and further functionality, please refer to the [usage documentation](https://nf-co.re/crisprseq/usage) and the [parameter documentation](https://nf-co.re/crisprseq/parameters). ## Pipeline output diff --git a/conf/modules.config b/conf/modules.config index 2078be96..12cb3fe4 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -317,7 +317,7 @@ process { } withName: MEDAKA { - ext.args = '-m r941_min_high_g303' + ext.args = { "-m ${model}" } ext.prefix = { "${reads.baseName}_medakaConsensus" } } diff --git a/modules.json b/modules.json index b4762749..ae97beb5 100644 --- a/modules.json +++ b/modules.json @@ -95,7 +95,8 @@ "racon": { "branch": "master", "git_sha": "f5ed3ac0834b68e80a00a06a61d04ce8e896f275", - "installed_by": ["modules"] + "installed_by": ["modules"], + "patch": "modules/nf-core/racon/racon.diff" }, "samtools/index": { "branch": "master", diff --git a/modules/local/mageck/flutemle.nf b/modules/local/mageck/flutemle.nf index e620c446..a95775a0 100644 --- a/modules/local/mageck/flutemle.nf +++ b/modules/local/mageck/flutemle.nf @@ -3,10 +3,10 @@ process MAGECK_FLUTEMLE { tag "$prefix" label 'process_high' - conda "bioconda::bioconductor-mageckflute=2.2.0" + conda "bioconda::bioconductor-mageckflute==2.6.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bioconductor-mageckflute:2.2.0--r42hdfd78af_0': - 'biocontainers/bioconductor-mageckflute:2.2.0--r42hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/bioconductor-mageckflute:2.6.0--r43hdfd78af_0': + 'biocontainers/bioconductor-mageckflute:2.6.0--r43hdfd78af_0' }" input: tuple val(meta), path(gene_summary) diff --git a/modules/local/mageck/graphrra.nf b/modules/local/mageck/graphrra.nf index 69f48ae7..b22dfcee 100644 --- a/modules/local/mageck/graphrra.nf +++ b/modules/local/mageck/graphrra.nf @@ -2,10 +2,10 @@ process MAGECK_GRAPHRRA { tag "$meta.treatment" label 'process_single' - conda "bioconda::bioconductor-mageckflute=2.2.0" + conda "bioconda::bioconductor-mageckflute==2.6.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mageckflute:2.2.0--r42hdfd78af_0': - 'biocontainers/bioconductor-mageckflute:2.2.0--r42hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/bioconductor-mageckflute:2.6.0--r43hdfd78af_0': + 'biocontainers/bioconductor-mageckflute:2.6.0--r43hdfd78af_0' }" input: tuple val(meta), path(gene_summary) diff --git a/modules/local/matricescreation.nf b/modules/local/matricescreation.nf index 9470b5da..55f77e3b 100644 --- a/modules/local/matricescreation.nf +++ b/modules/local/matricescreation.nf @@ -1,7 +1,7 @@ process MATRICESCREATION { label 'process_single' - conda 'r-ggplot2=3.4.3 bioconductor-shortread=1.58.0 r-ggpubr=0.6.0 r-ggmsa=1.0.2 r-seqmagick=0.1.6 r-tidyr=1.3.0 r-ggseqlogo=0.1 r-cowplot=1.1.1 r-seqinr=4.2_30 r-optparse=1.7.3 r-dplyr=1.1.2 r-plyr=1.8.8 r-stringr=1.5.0 r-plotly=4.10.2' + conda 'conda-forge::r-base==4.0' container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-6de07928379e6eface08a0019c4a1d6b5192e805:0d77388f37ddd923a087f7792e30e83ab54c918c-0' : 'biocontainers/mulled-v2-6de07928379e6eface08a0019c4a1d6b5192e805:0d77388f37ddd923a087f7792e30e83ab54c918c-0' }" diff --git a/modules/local/orient_reference.nf b/modules/local/orient_reference.nf index 28ec7641..5e176368 100644 --- a/modules/local/orient_reference.nf +++ b/modules/local/orient_reference.nf @@ -2,7 +2,8 @@ process ORIENT_REFERENCE { tag "$meta.id" label 'process_single' - conda "r-seqinr=4.2_16 bioconductor-biostrings=2.62.0 bioconductor-shortread=1.52.0" + // jpeg is required in the conda container to fix a "libjpeg.so.9: No such file or directory" error + conda "r-seqinr=4.2_16 bioconductor-biostrings=2.62.0 bioconductor-shortread=1.52.0 jpeg=9d" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-63136bce0d642de81864be727b6b42a26026e33b:d3ce5caf7bcbf6cecedcf51b0135646831c01e77-0' : 'biocontainers/mulled-v2-63136bce0d642de81864be727b6b42a26026e33b:d3ce5caf7bcbf6cecedcf51b0135646831c01e77-0' }" diff --git a/modules/local/venndiagram.nf b/modules/local/venndiagram.nf index c9cab983..13675f1c 100644 --- a/modules/local/venndiagram.nf +++ b/modules/local/venndiagram.nf @@ -3,7 +3,7 @@ process VENNDIAGRAM { label 'process_low' - conda "bioconda::r-venndiagram=1.6.16" + conda "conda-forge::r-ggvenn=0.1.10" container "ghcr.io/qbic-pipelines/rnadeseq:dev" input: diff --git a/modules/nf-core/medaka/environment.yml b/modules/nf-core/medaka/environment.yml index 20e2cbbe..4f200e1e 100644 --- a/modules/nf-core/medaka/environment.yml +++ b/modules/nf-core/medaka/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::medaka=1.4.4 + - bioconda::medaka=1.11.3 # Updating version due to unable to find tensorflow with the previous version diff --git a/modules/nf-core/medaka/main.nf b/modules/nf-core/medaka/main.nf index a092aeb3..3afefba9 100644 --- a/modules/nf-core/medaka/main.nf +++ b/modules/nf-core/medaka/main.nf @@ -4,11 +4,12 @@ process MEDAKA { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/medaka:1.4.4--py38h130def0_0' : - 'biocontainers/medaka:1.4.4--py38h130def0_0' }" + 'https://depot.galaxyproject.org/singularity/medaka:1.11.3--py38h2e44183_0' : + 'biocontainers/medaka:1.11.3--py38h2e44183_0' }" input: tuple val(meta), path(reads), path(assembly) + path model output: tuple val(meta), path("*_medakaConsensus.fasta"), emit: assembly diff --git a/modules/nf-core/medaka/medaka.diff b/modules/nf-core/medaka/medaka.diff index 7f8752ac..7f161da7 100644 --- a/modules/nf-core/medaka/medaka.diff +++ b/modules/nf-core/medaka/medaka.diff @@ -1,4 +1,13 @@ Changes in module 'nf-core/medaka' +--- modules/nf-core/medaka/environment.yml ++++ modules/nf-core/medaka/environment.yml +@@ -4,4 +4,4 @@ + - bioconda + - defaults + dependencies: +- - bioconda::medaka=1.4.4 ++ - bioconda::medaka=1.11.3 # Updating version due to unable to find tensorflow with the previous version + --- modules/nf-core/medaka/main.nf +++ modules/nf-core/medaka/main.nf @@ -11,8 +11,8 @@ diff --git a/modules/nf-core/racon/main.nf b/modules/nf-core/racon/main.nf index de29e355..7cff3057 100644 --- a/modules/nf-core/racon/main.nf +++ b/modules/nf-core/racon/main.nf @@ -11,8 +11,8 @@ process RACON { tuple val(meta), path(reads), path(assembly), path(paf) output: - tuple val(meta), path('*_assembly_consensus.fasta.gz') , emit: improved_assembly - path "versions.yml" , emit: versions + tuple val(meta), path('*_assembly_consensus.fasta.gz'), emit: improved_assembly + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -21,11 +21,11 @@ process RACON { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - racon -t "$task.cpus" \\ - "${reads}" \\ - "${paf}" \\ + racon -t $task.cpus \\ + ${reads} \\ + ${paf} \\ $args \\ - "${assembly}" > \\ + ${assembly} > \\ ${prefix}_assembly_consensus.fasta gzip -n ${prefix}_assembly_consensus.fasta diff --git a/modules/nf-core/racon/racon.diff b/modules/nf-core/racon/racon.diff new file mode 100644 index 00000000..27994bdb --- /dev/null +++ b/modules/nf-core/racon/racon.diff @@ -0,0 +1,32 @@ +Changes in module 'nf-core/racon' +--- modules/nf-core/racon/main.nf ++++ modules/nf-core/racon/main.nf +@@ -11,8 +11,8 @@ + tuple val(meta), path(reads), path(assembly), path(paf) + + output: +- tuple val(meta), path('*_assembly_consensus.fasta.gz') , emit: improved_assembly +- path "versions.yml" , emit: versions ++ tuple val(meta), path('*_assembly_consensus.fasta.gz'), emit: improved_assembly ++ path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when +@@ -21,11 +21,11 @@ + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ +- racon -t "$task.cpus" \\ +- "${reads}" \\ +- "${paf}" \\ ++ racon -t $task.cpus \\ ++ ${reads} \\ ++ ${paf} \\ + $args \\ +- "${assembly}" > \\ ++ ${assembly} > \\ + ${prefix}_assembly_consensus.fasta + + gzip -n ${prefix}_assembly_consensus.fasta + +************************************************************ diff --git a/modules/nf-core/vsearch/cluster/main.nf b/modules/nf-core/vsearch/cluster/main.nf index 0aca4446..ce74abeb 100644 --- a/modules/nf-core/vsearch/cluster/main.nf +++ b/modules/nf-core/vsearch/cluster/main.nf @@ -11,19 +11,19 @@ process VSEARCH_CLUSTER { tuple val(meta), path(fasta) output: - tuple val(meta), path('*.aln.gz') , optional: true, emit: aln - tuple val(meta), path('*.biom.gz') , optional: true, emit: biom - tuple val(meta), path('*.mothur.tsv.gz') , optional: true, emit: mothur - tuple val(meta), path('*.otu.tsv.gz') , optional: true, emit: otu - tuple val(meta), path('*.bam') , optional: true, emit: bam - tuple val(meta), path('*.out.tsv.gz') , optional: true, emit: out - tuple val(meta), path('*.blast.tsv.gz') , optional: true, emit: blast - tuple val(meta), path('*.uc.tsv.gz') , optional: true, emit: uc - tuple val(meta), path('*.centroids.fasta.gz') , optional: true, emit: centroids - tuple val(meta), path('*.clusters.fasta*.gz') , optional: true, emit: clusters - tuple val(meta), path('*.profile.txt.gz') , optional: true, emit: profile - tuple val(meta), path('*.msa.fasta.gz') , optional: true, emit: msa - path "versions.yml" , emit: versions + tuple val(meta), path('*.aln.gz') , optional: true, emit: aln + tuple val(meta), path('*.biom.gz') , optional: true, emit: biom + tuple val(meta), path('*.mothur.tsv.gz') , optional: true, emit: mothur + tuple val(meta), path('*.otu.tsv.gz') , optional: true, emit: otu + tuple val(meta), path('*.bam') , optional: true, emit: bam + tuple val(meta), path('*.out.tsv.gz') , optional: true, emit: out + tuple val(meta), path('*.blast.tsv.gz') , optional: true, emit: blast + tuple val(meta), path('*.uc.tsv.gz') , optional: true, emit: uc + tuple val(meta), path('*.centroids.fasta.gz'), optional: true, emit: centroids + tuple val(meta), path('*_clusters*') , optional: true, emit: clusters + tuple val(meta), path('*.profile.txt.gz') , optional: true, emit: profile + tuple val(meta), path('*.msa.fasta.gz') , optional: true, emit: msa + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -41,7 +41,7 @@ process VSEARCH_CLUSTER { args3.contains("--biomout") ? "biom" : args3.contains("--blast6out") ? "blast.tsv" : args3.contains("--centroids") ? "centroids.fasta" : - args3.contains("--clusters") ? "clusters.fasta" : + args3.contains("--clusters") ? "clusters" : args3.contains("--mothur_shared_out") ? "mothur.tsv" : args3.contains("--msaout") ? "msa.fasta" : args3.contains("--otutabout") ? "otu.tsv" : @@ -54,7 +54,7 @@ process VSEARCH_CLUSTER { """ vsearch \\ $args2 $fasta \\ - $args3 ${prefix}.${out_ext} \\ + $args3 ${prefix}_${out_ext} \\ --threads $task.cpus \\ $args diff --git a/modules/nf-core/vsearch/cluster/vsearch-cluster.diff b/modules/nf-core/vsearch/cluster/vsearch-cluster.diff index 8f1977e4..df715174 100644 --- a/modules/nf-core/vsearch/cluster/vsearch-cluster.diff +++ b/modules/nf-core/vsearch/cluster/vsearch-cluster.diff @@ -1,7 +1,56 @@ Changes in module 'nf-core/vsearch/cluster' --- modules/nf-core/vsearch/cluster/main.nf +++ modules/nf-core/vsearch/cluster/main.nf -@@ -60,7 +60,7 @@ +@@ -11,19 +11,19 @@ + tuple val(meta), path(fasta) + + output: +- tuple val(meta), path('*.aln.gz') , optional: true, emit: aln +- tuple val(meta), path('*.biom.gz') , optional: true, emit: biom +- tuple val(meta), path('*.mothur.tsv.gz') , optional: true, emit: mothur +- tuple val(meta), path('*.otu.tsv.gz') , optional: true, emit: otu +- tuple val(meta), path('*.bam') , optional: true, emit: bam +- tuple val(meta), path('*.out.tsv.gz') , optional: true, emit: out +- tuple val(meta), path('*.blast.tsv.gz') , optional: true, emit: blast +- tuple val(meta), path('*.uc.tsv.gz') , optional: true, emit: uc +- tuple val(meta), path('*.centroids.fasta.gz') , optional: true, emit: centroids +- tuple val(meta), path('*.clusters.fasta*.gz') , optional: true, emit: clusters +- tuple val(meta), path('*.profile.txt.gz') , optional: true, emit: profile +- tuple val(meta), path('*.msa.fasta.gz') , optional: true, emit: msa +- path "versions.yml" , emit: versions ++ tuple val(meta), path('*.aln.gz') , optional: true, emit: aln ++ tuple val(meta), path('*.biom.gz') , optional: true, emit: biom ++ tuple val(meta), path('*.mothur.tsv.gz') , optional: true, emit: mothur ++ tuple val(meta), path('*.otu.tsv.gz') , optional: true, emit: otu ++ tuple val(meta), path('*.bam') , optional: true, emit: bam ++ tuple val(meta), path('*.out.tsv.gz') , optional: true, emit: out ++ tuple val(meta), path('*.blast.tsv.gz') , optional: true, emit: blast ++ tuple val(meta), path('*.uc.tsv.gz') , optional: true, emit: uc ++ tuple val(meta), path('*.centroids.fasta.gz'), optional: true, emit: centroids ++ tuple val(meta), path('*_clusters*') , optional: true, emit: clusters ++ tuple val(meta), path('*.profile.txt.gz') , optional: true, emit: profile ++ tuple val(meta), path('*.msa.fasta.gz') , optional: true, emit: msa ++ path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when +@@ -41,7 +41,7 @@ + args3.contains("--biomout") ? "biom" : + args3.contains("--blast6out") ? "blast.tsv" : + args3.contains("--centroids") ? "centroids.fasta" : +- args3.contains("--clusters") ? "clusters.fasta" : ++ args3.contains("--clusters") ? "clusters" : + args3.contains("--mothur_shared_out") ? "mothur.tsv" : + args3.contains("--msaout") ? "msa.fasta" : + args3.contains("--otutabout") ? "otu.tsv" : +@@ -54,13 +54,13 @@ + """ + vsearch \\ + $args2 $fasta \\ +- $args3 ${prefix}.${out_ext} \\ ++ $args3 ${prefix}_${out_ext} \\ + --threads $task.cpus \\ + $args if [[ $args3 == "--clusters" ]] then diff --git a/nextflow.config b/nextflow.config index 76f078ee..5946cb46 100644 --- a/nextflow.config +++ b/nextflow.config @@ -43,7 +43,7 @@ params { // UMI parameters umi_bin_size = 1 - medaka_model = 'r941_min_high_g303' + medaka_model = 'https://github.com/nanoporetech/medaka/raw/master/medaka/data/r941_min_high_g303_model.hdf5' // Vsearch options vsearch_minseqlength = 55 diff --git a/nextflow_schema.json b/nextflow_schema.json index 4b775892..a495b414 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -88,7 +88,7 @@ }, "medaka_model": { "type": "string", - "default": "r941_min_high_g303", + "default": "https://github.com/nanoporetech/medaka/raw/master/medaka/data/r941_min_high_g303_model.hdf5", "fa_icon": "fas fa-font", "description": "Medaka model (-m) to use according to the basecaller used." } diff --git a/templates/template_fluteMLE.R b/templates/template_fluteMLE.R index 7aea697d..38abcdb0 100644 --- a/templates/template_fluteMLE.R +++ b/templates/template_fluteMLE.R @@ -4,6 +4,14 @@ #### #### graphs mageck MLE + # Required to fix corrupted cache from Singularity container + library(BiocFileCache) + bfc <- BiocFileCache("~/.cache/R/ExperimentHub") + res <- bfcquery(bfc, "experimenthub.index.rds", field="rname", exact=TRUE) + bfcremove(bfc, rids=res\$rid) + library(ExperimentHub) + eh = ExperimentHub() + library(MAGeCKFlute) library(clusterProfiler) library(ggplot2) diff --git a/workflows/crisprseq_targeted.nf b/workflows/crisprseq_targeted.nf index 55a88f51..c584fe24 100644 --- a/workflows/crisprseq_targeted.nf +++ b/workflows/crisprseq_targeted.nf @@ -507,7 +507,8 @@ workflow CRISPRSEQ_TARGETED { // MEDAKA ( ch_clusters_sequence - .join(RACON_2.out.improved_assembly) + .join(RACON_2.out.improved_assembly), + Channel.value( file(params.medaka_model) ) ) ch_versions = ch_versions.mix(MEDAKA.out.versions.first())