From 456303828a6db5d2f9fafd400f92aa56ca50d9fe Mon Sep 17 00:00:00 2001 From: Joon Klaps <61584065+Joon-Klaps@users.noreply.github.com> Date: Wed, 29 Mar 2023 09:30:03 +0200 Subject: [PATCH 001/120] New subworkflow: Fastq_fastp_trim_fastqc (#3146) * initial commit * completing tests with docker * fixing prefix and condition fastqc * adressing documentation of emits & input * Fixing tests * removing md5sum * missed a md5sum * [automated] Fix linting with Prettier --------- Co-authored-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Co-authored-by: nf-core-bot --- .../nf-core/fastq_trim_fastp_fastqc/main.nf | 103 +++++++++++ .../nf-core/fastq_trim_fastp_fastqc/meta.yml | 109 +++++++++++ tests/config/pytest_modules.yml | 12 ++ .../nf-core/fastq_trim_fastp_fastqc/main.nf | 147 +++++++++++++++ .../fastq_trim_fastp_fastqc/nextflow.config | 16 ++ .../nf-core/fastq_trim_fastp_fastqc/test.yml | 170 ++++++++++++++++++ 6 files changed, 557 insertions(+) create mode 100644 subworkflows/nf-core/fastq_trim_fastp_fastqc/main.nf create mode 100644 subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml create mode 100644 tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/main.nf create mode 100644 tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/nextflow.config create mode 100644 tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/test.yml diff --git a/subworkflows/nf-core/fastq_trim_fastp_fastqc/main.nf b/subworkflows/nf-core/fastq_trim_fastp_fastqc/main.nf new file mode 100644 index 00000000000..afe51650984 --- /dev/null +++ b/subworkflows/nf-core/fastq_trim_fastp_fastqc/main.nf @@ -0,0 +1,103 @@ +// +// Read QC and trimming +// + +include { FASTQC as FASTQC_RAW } from '../../../modules/nf-core/fastqc/main' +include { FASTQC as FASTQC_TRIM } from '../../../modules/nf-core/fastqc/main' +include { FASTP } from '../../../modules/nf-core/fastp/main' + +// +// Function that parses fastp json output file to get total number of reads after trimming +// +import groovy.json.JsonSlurper + +def getFastpReadsAfterFiltering(json_file) { + def Map json = (Map) new JsonSlurper().parseText(json_file.text).get('summary') + return json['after_filtering']['total_reads'].toInteger() +} + +workflow FASTQ_TRIM_FASTP_FASTQC { + take: + ch_reads // channel: [ val(meta), path(reads) ] + ch_adapter_fasta // channel: [ path(fasta) ] + val_save_trimmed_fail // value: boolean + val_save_merged // value: boolean + val_skip_fastp // value: boolean + val_skip_fastqc // value: boolean + + main: + + ch_versions = Channel.empty() + + ch_fastqc_raw_html = Channel.empty() + ch_fastqc_raw_zip = Channel.empty() + if (!val_skip_fastqc) { + FASTQC_RAW ( + ch_reads + ) + fastqc_raw_html = FASTQC_RAW.out.html + fastqc_raw_zip = FASTQC_RAW.out.zip + ch_versions = ch_versions.mix(FASTQC_RAW.out.versions.first()) + } + + ch_trim_reads = ch_reads + ch_trim_json = Channel.empty() + ch_trim_html = Channel.empty() + ch_trim_log = Channel.empty() + ch_trim_reads_fail = Channel.empty() + ch_trim_reads_merged = Channel.empty() + ch_fastqc_trim_html = Channel.empty() + ch_fastqc_trim_zip = Channel.empty() + if (!val_skip_fastp) { + FASTP ( + ch_reads, + ch_adapter_fasta, + val_save_trimmed_fail, + val_save_merged + ) + ch_trim_reads = FASTP.out.reads + ch_trim_json = FASTP.out.json + ch_trim_html = FASTP.out.html + ch_trim_log = FASTP.out.log + ch_trim_reads_fail = FASTP.out.reads_fail + ch_trim_reads_merged = FASTP.out.reads_merged + ch_versions = ch_versions.mix(FASTP.out.versions.first()) + + // + // Filter empty FastQ files after adapter trimming so FastQC doesn't fail + // + ch_trim_reads + .join(ch_trim_json) + .map { + meta, reads, json -> + if (getFastpReadsAfterFiltering(json) > 0) { + [ meta, reads ] + } + } + .set { ch_trim_reads } + + if (!val_skip_fastqc) { + FASTQC_TRIM ( + ch_trim_reads + ) + ch_fastqc_trim_html = FASTQC_TRIM.out.html + ch_fastqc_trim_zip = FASTQC_TRIM.out.zip + ch_versions = ch_versions.mix(FASTQC_TRIM.out.versions.first()) + } + } + + emit: + reads = ch_trim_reads // channel: [ val(meta), path(reads) ] + trim_json = ch_trim_json // channel: [ val(meta), path(json) ] + trim_html = ch_trim_html // channel: [ val(meta), path(html) ] + trim_log = ch_trim_log // channel: [ val(meta), path(log) ] + trim_reads_fail = ch_trim_reads_fail // channel: [ val(meta), path(fastq.gz) ] + trim_reads_merged = ch_trim_reads_merged // channel: [ val(meta), path(fastq.gz) ] + + fastqc_raw_html = ch_fastqc_raw_html // channel: [ val(meta), path(html) ] + fastqc_raw_zip = ch_fastqc_raw_zip // channel: [ val(meta), path(zip) ] + fastqc_trim_html = ch_fastqc_trim_html // channel: [ val(meta), path(html) ] + fastqc_trim_zip = ch_fastqc_trim_zip // channel: [ val(meta), path(zip) ] + + versions = ch_versions.ifEmpty(null) // channel: [ path(versions.yml) ] +} diff --git a/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml b/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml new file mode 100644 index 00000000000..ccda6574946 --- /dev/null +++ b/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml @@ -0,0 +1,109 @@ +name: "fastq_trim_fastp_fastqc" +description: Read QC, fastp trimming and read qc +keywords: + - qc + - quality_control + - adapters + - trimming + - fastq +modules: + - fastqc + - fastp + +input: + - ch_reads: + type: file + description: | + Structure: [ val(meta), path (reads) ] + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ], List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. If you wish to run interleaved paired-end data, supply as single-end data + but with `--interleaved_in` in your `modules.conf`'s `ext.args` for the module. + - ch_adapter_fasta: + type: file + description: | + Structure: path(adapter_fasta) + File in FASTA format containing possible adapters to remove. + - val_save_trimmed_fail: + type: boolean + description: | + Structure: val(save_trimmed_fail) + Specify true to save files that failed to pass trimming thresholds ending in `*.fail.fastq.gz` + - val_save_merged: + type: boolean + description: | + Structure: val(save_merged) + Specify true to save all merged reads to the a file ending in `*.merged.fastq.gz` + - val_skip_fastqc: + type: boolean + description: | + Structure: val(skip_fastqc) + skip the fastqc process if true + - val_skip_fastp: + type: boolean + description: | + Structure: val(skip_fastp) + skip the fastp process if true + +output: + - meta: + type: value + description: Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + Structure: [ val(meta), path(reads) ] + The trimmed/modified/unmerged fastq reads + - trim_json: + type: file + description: | + Structure: [ val(meta), path(trim_json) ] + Results in JSON format + - trim_html: + type: file + description: | + Structure: [ val(meta), path(trim_html) ] + Results in HTML format + - trim_log: + type: file + description: | + Structure: [ val(meta), path(trim_log) ] + fastq log file + - trim_reads_fail: + type: file + description: | + Structure: [ val(meta), path(trim_reads_fail) ] + Reads the failed the preprocessing + - trim_reads_merged: + type: file + description: | + Structure: [ val(meta), path(trim_reads_merged) ] + Reads that were successfully merged + + - fastqc_raw_html: + type: file + description: | + Structure: [ val(meta), path(fastqc_raw_html) ] + Raw fastQC report + - fastqc_raw_zip: + type: file + description: | + Structure: [ val(meta), path(fastqc_raw_zip) ] + Raw fastQC report archive + - fastqc_trim_html: + type: file + description: | + Structure: [ val(meta), path(fastqc_trim_html) ] + Trimmed fastQC report + - fastqc_trim_zip: + type: file + description: | + Structure: [ val(meta), path(fastqc_trim_zip) ] + Trimmed fastQC report archive + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@Joon-Klaps" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 7a3b9eb176a..9ebb553948c 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3304,6 +3304,18 @@ subworkflows/fastq_subsample_fq_salmon: - subworkflows/nf-core/fastq_subsample_fq_salmon/** - tests/subworkflows/nf-core/fastq_subsample_fq_salmon/** +subworkflows/fastq_trim_fastp_fastqc: + - subworkflows/nf-core/fastq_trim_fastp_fastqc/** + - tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/** + +subworkflows/gatk_create_som_pon: + - subworkflows/nf-core/gatk_create_som_pon/** + - tests/subworkflows/nf-core/gatk_create_som_pon/** + +subworkflows/gatk_tumor_normal_somatic_variant_calling: + - subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/** + - tests/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/** + subworkflows/gatk_tumor_only_somatic_variant_calling: - subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/** - tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/** diff --git a/tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/main.nf b/tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/main.nf new file mode 100644 index 00000000000..346f93f783f --- /dev/null +++ b/tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/main.nf @@ -0,0 +1,147 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { FASTQ_TRIM_FASTP_FASTQC } from '../../../../subworkflows/nf-core/fastq_trim_fastp_fastqc/main.nf' + +// +// Test with single-end data +// +workflow test_fastq_trim_fastp_fastqc_single_end { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + save_trimmed_fail = false + save_merged = false + skip_fastqc = false + skip_fastp = false + + FASTQ_TRIM_FASTP_FASTQC ( input, [], save_trimmed_fail, save_merged, skip_fastp, skip_fastqc ) +} + +// +// Test with paired-end data +// +workflow test_fastq_trim_fastp_fastqc_paired_end { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + save_trimmed_fail = false + save_merged = false + skip_fastqc = false + skip_fastp = false + + FASTQ_TRIM_FASTP_FASTQC ( input, [], save_trimmed_fail, save_merged, skip_fastp, skip_fastqc ) +} + +// +// Test with intereleaved data +// +workflow test_fastq_trim_fastp_fastqc_interleaved { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_interleaved_fastq_gz'], checkIfExists: true) ] + ] + save_trimmed_fail = false + save_merged = false + skip_fastqc = false + skip_fastp = false + + FASTQ_TRIM_FASTP_FASTQC ( input, [], save_trimmed_fail, save_merged, skip_fastp, skip_fastqc ) +} + +// +// Test with single-end data with saving trimming fails +// +workflow test_fastq_trim_fastp_fastqc_single_end_trim_fail { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + save_trimmed_fail = true + save_merged = false + skip_fastqc = false + skip_fastp = false + + FASTQ_TRIM_FASTP_FASTQC ( input, [], save_trimmed_fail, save_merged, skip_fastp, skip_fastqc ) +} + +// +// Test with paired-end data with saving trimming fails +// +workflow test_fastq_trim_fastp_fastqc_paired_end_trim_fail { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + save_trimmed_fail = true + save_merged = false + skip_fastqc = false + skip_fastp = false + + FASTQ_TRIM_FASTP_FASTQC ( input, [], save_trimmed_fail, save_merged, skip_fastp, skip_fastqc ) +} + +// +// Test with paired-end data with merging +// +workflow test_fastq_trim_fastp_fastqc_paired_end_merged { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + save_trimmed_fail = false + save_merged = true + skip_fastqc = false + skip_fastp = false + + FASTQ_TRIM_FASTP_FASTQC ( input, [], save_trimmed_fail, save_merged, skip_fastp, skip_fastqc ) +} + +// +// Test with paired-end data with predefined adapter list +// +workflow test_fastq_trim_fastp_fastqc_paired_end_merged_adapterlist { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + adapter_fasta = file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/fastp/adapters.fasta", checkIfExists: true) + save_trimmed_fail = false + save_merged = true + skip_fastqc = false + skip_fastp = false + + FASTQ_TRIM_FASTP_FASTQC ( input, adapter_fasta, save_trimmed_fail, save_merged, skip_fastp, skip_fastqc ) +} + +// +// Test with paired-end data with skipping fastqc +// +workflow test_fastq_trim_fastp_fastqc_paired_end_skip_fastqc { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + save_trimmed_fail = false + save_merged = false + skip_fastqc = true + skip_fastp = false + + FASTQ_TRIM_FASTP_FASTQC ( input, [], save_trimmed_fail, save_merged, skip_fastp, skip_fastqc ) +} + +// +// Test with paired-end data with skipping fastp +// +workflow test_fastq_trim_fastp_fastqc_paired_end_skip_fastp { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + save_trimmed_fail = false + save_merged = false + skip_fastqc = false + skip_fastp = true + + FASTQ_TRIM_FASTP_FASTQC ( input, [], save_trimmed_fail, save_merged, skip_fastp, skip_fastqc ) +} diff --git a/tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/nextflow.config b/tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/nextflow.config new file mode 100644 index 00000000000..6fb1952b251 --- /dev/null +++ b/tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/nextflow.config @@ -0,0 +1,16 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: '.*interleaved:FASTP' { + ext.args = "--interleaved_in" + } + + withName: '.*FASTQC_RAW' { + ext.prefix = { "${meta.id}_raw" } + } + + withName: '.*FASTQC_TRIM' { + ext.prefix = { "${meta.id}_trim" } + } +} diff --git a/tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/test.yml b/tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/test.yml new file mode 100644 index 00000000000..6e6b62ebbda --- /dev/null +++ b/tests/subworkflows/nf-core/fastq_trim_fastp_fastqc/test.yml @@ -0,0 +1,170 @@ +- name: fastq_trim_fastp_fastqc test_fastq_trim_fastp_fastqc_single_end + command: nextflow run ./tests/subworkflows/nf-core/fastq_trim_fastp_fastqc -entry test_fastq_trim_fastp_fastqc_single_end -c ./tests/config/nextflow.config + tags: + - fastp + - fastqc + - subworkflows + - subworkflows/fastq_trim_fastp_fastqc + files: + - path: output/fastp/test.fastp.fastq.gz + - path: output/fastp/test.fastp.html + - path: output/fastp/test.fastp.json + - path: output/fastp/test.fastp.log + - path: output/fastqc/test_raw_fastqc.html + - path: output/fastqc/test_raw_fastqc.zip + - path: output/fastqc/test_trim_fastqc.html + - path: output/fastqc/test_trim_fastqc.zip + +- name: fastq_trim_fastp_fastqc test_fastq_trim_fastp_fastqc_paired_end + command: nextflow run ./tests/subworkflows/nf-core/fastq_trim_fastp_fastqc -entry test_fastq_trim_fastp_fastqc_paired_end -c ./tests/config/nextflow.config + tags: + - fastp + - fastqc + - subworkflows + - subworkflows/fastq_trim_fastp_fastqc + files: + - path: output/fastp/test.fastp.html + - path: output/fastp/test.fastp.json + - path: output/fastp/test.fastp.log + - path: output/fastp/test_1.fastp.fastq.gz + - path: output/fastp/test_2.fastp.fastq.gz + - path: output/fastqc/test_raw_1_fastqc.html + - path: output/fastqc/test_raw_1_fastqc.zip + - path: output/fastqc/test_raw_2_fastqc.html + - path: output/fastqc/test_raw_2_fastqc.zip + - path: output/fastqc/test_trim_1_fastqc.html + - path: output/fastqc/test_trim_1_fastqc.zip + - path: output/fastqc/test_trim_2_fastqc.html + - path: output/fastqc/test_trim_2_fastqc.zip + +- name: fastq_trim_fastp_fastqc test_fastq_trim_fastp_fastqc_interleaved + command: nextflow run ./tests/subworkflows/nf-core/fastq_trim_fastp_fastqc -entry test_fastq_trim_fastp_fastqc_interleaved -c ./tests/config/nextflow.config + tags: + - fastp + - fastqc + - subworkflows + - subworkflows/fastq_trim_fastp_fastqc + files: + - path: output/fastp/test.fastp.fastq.gz + - path: output/fastp/test.fastp.html + - path: output/fastp/test.fastp.json + - path: output/fastp/test.fastp.log + - path: output/fastqc/test_raw_fastqc.html + - path: output/fastqc/test_raw_fastqc.zip + - path: output/fastqc/test_trim_fastqc.html + - path: output/fastqc/test_trim_fastqc.zip + +- name: fastq_trim_fastp_fastqc test_fastq_trim_fastp_fastqc_single_end_trim_fail + command: nextflow run ./tests/subworkflows/nf-core/fastq_trim_fastp_fastqc -entry test_fastq_trim_fastp_fastqc_single_end_trim_fail -c ./tests/config/nextflow.config + tags: + - fastp + - fastqc + - subworkflows + - subworkflows/fastq_trim_fastp_fastqc + files: + - path: output/fastp/test.fail.fastq.gz + - path: output/fastp/test.fastp.fastq.gz + - path: output/fastp/test.fastp.html + - path: output/fastp/test.fastp.json + - path: output/fastp/test.fastp.log + - path: output/fastqc/test_raw_fastqc.html + - path: output/fastqc/test_raw_fastqc.zip + - path: output/fastqc/test_trim_fastqc.html + - path: output/fastqc/test_trim_fastqc.zip + +- name: fastq_trim_fastp_fastqc test_fastq_trim_fastp_fastqc_paired_end_trim_fail + command: nextflow run ./tests/subworkflows/nf-core/fastq_trim_fastp_fastqc -entry test_fastq_trim_fastp_fastqc_paired_end_trim_fail -c ./tests/config/nextflow.config + tags: + - fastp + - fastqc + - subworkflows + - subworkflows/fastq_trim_fastp_fastqc + files: + - path: output/fastp/test.fastp.html + - path: output/fastp/test.fastp.json + - path: output/fastp/test.fastp.log + - path: output/fastp/test_1.fail.fastq.gz + - path: output/fastp/test_1.fastp.fastq.gz + - path: output/fastp/test_2.fail.fastq.gz + - path: output/fastp/test_2.fastp.fastq.gz + - path: output/fastqc/test_raw_1_fastqc.html + - path: output/fastqc/test_raw_1_fastqc.zip + - path: output/fastqc/test_raw_2_fastqc.html + - path: output/fastqc/test_raw_2_fastqc.zip + - path: output/fastqc/test_trim_1_fastqc.html + - path: output/fastqc/test_trim_1_fastqc.zip + - path: output/fastqc/test_trim_2_fastqc.html + - path: output/fastqc/test_trim_2_fastqc.zip + +- name: fastq_trim_fastp_fastqc test_fastq_trim_fastp_fastqc_paired_end_merged + command: nextflow run ./tests/subworkflows/nf-core/fastq_trim_fastp_fastqc -entry test_fastq_trim_fastp_fastqc_paired_end_merged -c ./tests/config/nextflow.config + tags: + - fastp + - fastqc + - subworkflows + - subworkflows/fastq_trim_fastp_fastqc + files: + - path: output/fastp/test.fastp.html + - path: output/fastp/test.fastp.json + - path: output/fastp/test.fastp.log + - path: output/fastp/test.merged.fastq.gz + - path: output/fastp/test_1.fastp.fastq.gz + - path: output/fastp/test_2.fastp.fastq.gz + - path: output/fastqc/test_raw_1_fastqc.html + - path: output/fastqc/test_raw_1_fastqc.zip + - path: output/fastqc/test_raw_2_fastqc.html + - path: output/fastqc/test_raw_2_fastqc.zip + - path: output/fastqc/test_trim_1_fastqc.html + - path: output/fastqc/test_trim_1_fastqc.zip + - path: output/fastqc/test_trim_2_fastqc.html + - path: output/fastqc/test_trim_2_fastqc.zip + +- name: fastq_trim_fastp_fastqc test_fastq_trim_fastp_fastqc_paired_end_merged_adapterlist + command: nextflow run ./tests/subworkflows/nf-core/fastq_trim_fastp_fastqc -entry test_fastq_trim_fastp_fastqc_paired_end_merged_adapterlist -c ./tests/config/nextflow.config + tags: + - fastp + - fastqc + - subworkflows + - subworkflows/fastq_trim_fastp_fastqc + files: + - path: output/fastp/test.fastp.html + - path: output/fastp/test.fastp.json + - path: output/fastp/test.fastp.log + - path: output/fastp/test.merged.fastq.gz + - path: output/fastp/test_1.fastp.fastq.gz + - path: output/fastp/test_2.fastp.fastq.gz + - path: output/fastqc/test_raw_1_fastqc.html + - path: output/fastqc/test_raw_1_fastqc.zip + - path: output/fastqc/test_raw_2_fastqc.html + - path: output/fastqc/test_raw_2_fastqc.zip + - path: output/fastqc/test_trim_1_fastqc.html + - path: output/fastqc/test_trim_1_fastqc.zip + - path: output/fastqc/test_trim_2_fastqc.html + - path: output/fastqc/test_trim_2_fastqc.zip + +- name: fastq_trim_fastp_fastqc test_fastq_trim_fastp_fastqc_paired_end_skip_fastqc + command: nextflow run ./tests/subworkflows/nf-core/fastq_trim_fastp_fastqc -entry test_fastq_trim_fastp_fastqc_paired_end_skip_fastqc -c ./tests/config/nextflow.config + tags: + - fastp + - fastqc + - subworkflows + - subworkflows/fastq_trim_fastp_fastqc + files: + - path: output/fastp/test.fastp.html + - path: output/fastp/test.fastp.json + - path: output/fastp/test.fastp.log + - path: output/fastp/test_1.fastp.fastq.gz + - path: output/fastp/test_2.fastp.fastq.gz + +- name: fastq_trim_fastp_fastqc test_fastq_trim_fastp_fastqc_paired_end_skip_fastp + command: nextflow run ./tests/subworkflows/nf-core/fastq_trim_fastp_fastqc -entry test_fastq_trim_fastp_fastqc_paired_end_skip_fastp -c ./tests/config/nextflow.config + tags: + - fastp + - fastqc + - subworkflows + - subworkflows/fastq_trim_fastp_fastqc + files: + - path: output/fastqc/test_raw_1_fastqc.html + - path: output/fastqc/test_raw_1_fastqc.zip + - path: output/fastqc/test_raw_2_fastqc.html + - path: output/fastqc/test_raw_2_fastqc.zip From 60035b765c1c9feb18f27443ee0439a1eb94084d Mon Sep 17 00:00:00 2001 From: Adam Taylor Date: Wed, 29 Mar 2023 09:07:12 +0100 Subject: [PATCH 002/120] Add imaging test data in config (#3190) * Add imaging test data in config * Add background subtraction test datasets to config * Fix indentation --- tests/config/test_data.config | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 42309e57ca1..f821fa531fc 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -573,11 +573,33 @@ params { mouse_heart_wga = "${params.test_data_base}/data/imaging/tiff/mindagap.mouse_heart.wga.tiff" } 'ome-tiff' { - cycif_tonsil_channels = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-channels.csv" + cycif_tonsil_channels = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-channels.csv" cycif_tonsil_cycle1 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif" cycif_tonsil_cycle2 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle2.ome.tif" cycif_tonsil_cycle3 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle3.ome.tif" } + 'registration' { + markers = "${params.test_data_base}/data/imaging/registration/markers.csv" + cycle1 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif" + cycle2 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle2.ome.tif" + } + 'segmentation' { + markers = "${params.test_data_base}/data/imaging/segmentation/markers.csv" + image = "${params.test_data_base}/data/imaging/segmentation/cycif_tonsil_registered.ome.tif" + } + 'quantification' { + markers = "${params.test_data_base}/data/imaging/quantification/markers.csv" + image = "${params.test_data_base}/data/imaging/quantification/cycif_tonsil_registered.ome.tif" + mask = "${params.test_data_base}/data/imaging/quantification/cell.ome.tif" + } + 'downstream' { + markers = "${params.test_data_base}/data/imaging/downstream/markers.csv" + cell_feature_array = "${params.test_data_base}/data/imaging/downstream/cycif_tonsil_cell.csv" + } + 'background_subtraction' { + markers = "${params.test_data_base}/data/imaging/background_subtraction/markers.csv" + image = "${params.test_data_base}/data/imaging/background_subtraction/cycif_tonsil_registered.ome.tif" + } } } } From 0591cad3d725d5c21337f72e638507abf709f75e Mon Sep 17 00:00:00 2001 From: "Thiseas C. Lamnidis" Date: Wed, 29 Mar 2023 11:19:01 +0200 Subject: [PATCH 003/120] Update mapdage2 module (#3185) update mapdage2 module --- modules/nf-core/mapdamage2/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/mapdamage2/main.nf b/modules/nf-core/mapdamage2/main.nf index 238b1097868..488444df055 100644 --- a/modules/nf-core/mapdamage2/main.nf +++ b/modules/nf-core/mapdamage2/main.nf @@ -25,7 +25,7 @@ process MAPDAMAGE2 { tuple val(meta), path("results_*/Stats_out_MCMC_post_pred.pdf"), optional: true ,emit: stats_out_mcmc_post_pred tuple val(meta), path("results_*/Stats_out_MCMC_correct_prob.csv"), optional: true ,emit: stats_out_mcmc_correct_prob tuple val(meta), path("results_*/dnacomp_genome.csv"), optional: true ,emit: dnacomp_genome - tuple val(meta), path("results_*/rescaled.bam"), optional: true ,emit: rescaled + tuple val(meta), path("results_*/*rescaled.bam"), optional: true ,emit: rescaled tuple val(meta), path("results_*/5pCtoT_freq.txt"), optional: true ,emit: pctot_freq tuple val(meta), path("results_*/3pGtoA_freq.txt"), optional: true ,emit: pgtoa_freq tuple val(meta), path("results_*/*.fasta"), optional: true ,emit: fasta From 8ce6eaf45e656ae439ceb9a227e7607bc396d84a Mon Sep 17 00:00:00 2001 From: Fynn Freyer Date: Wed, 29 Mar 2023 18:36:18 +0000 Subject: [PATCH 004/120] Chopper (#3174) * add chopper module * implement requested changes for chopper module * Apply suggestions from code review --------- Co-authored-by: James A. Fellows Yates --- modules/nf-core/chopper/main.nf | 42 +++++++++++++++ modules/nf-core/chopper/meta.yml | 53 +++++++++++++++++++ tests/config/pytest_modules.yml | 12 +++-- tests/modules/nf-core/chopper/main.nf | 16 ++++++ tests/modules/nf-core/chopper/nextflow.config | 5 ++ tests/modules/nf-core/chopper/test.yml | 9 ++++ 6 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 modules/nf-core/chopper/main.nf create mode 100644 modules/nf-core/chopper/meta.yml create mode 100644 tests/modules/nf-core/chopper/main.nf create mode 100644 tests/modules/nf-core/chopper/nextflow.config create mode 100644 tests/modules/nf-core/chopper/test.yml diff --git a/modules/nf-core/chopper/main.nf b/modules/nf-core/chopper/main.nf new file mode 100644 index 00000000000..ae6f72a0da6 --- /dev/null +++ b/modules/nf-core/chopper/main.nf @@ -0,0 +1,42 @@ +process CHOPPER { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::chopper=0.3.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/chopper:0.3.0--hd03093a_0': + 'quay.io/biocontainers/chopper:0.3.0--hd03093a_0' }" + + input: + tuple val(meta), path(fastq) + + output: + tuple val(meta), path("*.fastq.gz") , emit: fastq + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + if ("$fastq" == "${prefix}.fastq.gz") error "Input and output names are the same, set prefix in module configuration to disambiguate!" + """ + zcat \\ + $args \\ + $fastq | \\ + chopper \\ + --threads $task.cpus \\ + $args2 | \\ + gzip \\ + $args3 > ${prefix}.fastq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + chopper: \$(chopper --version 2>&1 | cut -d ' ' -f 2) + END_VERSIONS + """ +} diff --git a/modules/nf-core/chopper/meta.yml b/modules/nf-core/chopper/meta.yml new file mode 100644 index 00000000000..787ba1767a5 --- /dev/null +++ b/modules/nf-core/chopper/meta.yml @@ -0,0 +1,53 @@ +name: "chopper" +description: Filter and trim long read data. +keywords: + - filter + - trimming + - fastq + - nanopore + - qc +tools: + - "zcat": + description: "zcat uncompresses either a list of files on the command line or its standard input and writes the uncompressed data on standard output." + documentation: "https://linux.die.net/man/1/zcat" + args_id: "$args" + - "chopper": + description: "A rust command line for filtering and trimming long reads." + homepage: "https://github.com/wdecoster/chopper" + documentation: "https://github.com/wdecoster/chopper" + tool_dev_url: "https://github.com/wdecoster/chopper" + doi: "10.1093/bioinformatics/bty149" + licence: "['MIT']" + args_id: "$args2" + - "gzip": + description: "Gzip reduces the size of the named files using Lempel-Ziv coding (LZ77)." + documentation: "https://linux.die.net/man/1/gzip" + args_id: "$args3" +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: FastQ with reads from long read sequencing e.g. PacBio or ONT + pattern: "*.{fastq.gz}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - fastq: + type: file + description: Filtered and trimmed FastQ file + pattern: "*.{fastq.gz}" + +authors: + - "@FynnFreyer" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 9ebb553948c..a2b99472f2e 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -638,6 +638,10 @@ checkv/updatedatabase: - modules/nf-core/checkv/updatedatabase/** - tests/modules/nf-core/checkv/updatedatabase/** +chopper: + - modules/nf-core/chopper/** + - tests/modules/nf-core/chopper/** + chromap/chromap: - modules/nf-core/chromap/chromap/** - tests/modules/nf-core/chromap/chromap/** @@ -3585,10 +3589,6 @@ whamg: - modules/nf-core/whamg/** - tests/modules/nf-core/whamg/** -wisecondorx/convert: - - modules/nf-core/wisecondorx/convert/** - - tests/modules/nf-core/wisecondorx/convert/** - windowmasker/mk_counts: - modules/nf-core/windowmasker/mk_counts/** - tests/modules/windowmasker/mk_counts/** @@ -3597,6 +3597,10 @@ windowmasker/ustat: - modules/nf-core/windowmasker/ustat/** - tests/modules/windowmasker/ustat/** +wisecondorx/convert: + - modules/nf-core/wisecondorx/convert/** + - tests/modules/nf-core/wisecondorx/convert/** + yahs: - modules/nf-core/yahs/** - tests/modules/nf-core/yahs/** diff --git a/tests/modules/nf-core/chopper/main.nf b/tests/modules/nf-core/chopper/main.nf new file mode 100644 index 00000000000..e3604b5be10 --- /dev/null +++ b/tests/modules/nf-core/chopper/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GUNZIP } from '../../../../modules/nf-core/gunzip/main.nf' +include { CHOPPER } from '../../../../modules/nf-core/chopper/main.nf' + +workflow test_chopper { + + input = [ + [id:'test_out' ], // meta map + file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) + ] + + CHOPPER ( input ) +} diff --git a/tests/modules/nf-core/chopper/nextflow.config b/tests/modules/nf-core/chopper/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/chopper/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/chopper/test.yml b/tests/modules/nf-core/chopper/test.yml new file mode 100644 index 00000000000..4c3b5d52c44 --- /dev/null +++ b/tests/modules/nf-core/chopper/test.yml @@ -0,0 +1,9 @@ +- name: "chopper" + command: nextflow run ./tests/modules/nf-core/chopper -entry test_chopper -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/chopper/nextflow.config + tags: + - "chopper" + files: + - path: "output/chopper/test_out.fastq.gz" + contains: + - "@2109d790-67ec-4fd1-8931-6c7e61908ff3 runid=97ca62ca093ff43533aa34c38a10b1d6325e7e7b read=52274 ch=243 start_time=2021-02-05T23:27:30Z flow_cell_id=FAP51364 protocol_group_id=data sample_id=RN20097 barcode=barcode01 barcode_alias=barcode01" + - path: "output/chopper/versions.yml" From 4321e71830d874a49c6141550c1381c6d243ca63 Mon Sep 17 00:00:00 2001 From: emnilsson Date: Wed, 29 Mar 2023 22:08:32 +0200 Subject: [PATCH 005/120] new module: sourmash/index (#3163) * First creating the module sourmash/index * modifying the main.nf to actually execute the sourmash/index-code * updating tests for the sourmash/index module * Adjusted the meta to fit with the module * updated version and a few other things * Changed so no flags are hardcoded in the main.nf, instead specified what to add in meta.yml and added value to nextflow.config in test * Changed grammar to reflect possibility to use plural signatures and not only single * First creating the module sourmash/index * modifying the main.nf to actually execute the sourmash/index-code * updating tests for the sourmash/index module * Adjusted the meta to fit with the module * updated version and a few other things * Changed so no flags are hardcoded in the main.nf, instead specified what to add in meta.yml and added value to nextflow.config in test * Changed grammar to reflect possibility to use plural signatures and not only single * New attempt to properly add that --ksize is needed in ext.args to run this module * trailing white space identified while linting on github --------- Co-authored-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> --- modules/nf-core/sourmash/index/main.nf | 35 ++++++++++++++ modules/nf-core/sourmash/index/meta.yml | 46 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/sourmash/index/main.nf | 20 ++++++++ .../nf-core/sourmash/index/nextflow.config | 9 ++++ tests/modules/nf-core/sourmash/index/test.yml | 10 ++++ 6 files changed, 124 insertions(+) create mode 100644 modules/nf-core/sourmash/index/main.nf create mode 100644 modules/nf-core/sourmash/index/meta.yml create mode 100644 tests/modules/nf-core/sourmash/index/main.nf create mode 100644 tests/modules/nf-core/sourmash/index/nextflow.config create mode 100644 tests/modules/nf-core/sourmash/index/test.yml diff --git a/modules/nf-core/sourmash/index/main.nf b/modules/nf-core/sourmash/index/main.nf new file mode 100644 index 00000000000..cf79f4bb9ed --- /dev/null +++ b/modules/nf-core/sourmash/index/main.nf @@ -0,0 +1,35 @@ +process SOURMASH_INDEX { + tag "$meta.id" + label 'process_single' + + conda "bioconda::sourmash=4.6.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/sourmash:4.6.1--hdfd78af_0': + 'quay.io/biocontainers/sourmash:4.6.1--hdfd78af_0' }" + + input: + tuple val(meta), path(signatures) + + output: + tuple val(meta), path("*.sbt.zip"), emit: signature_index + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + // --ksize needs to be specified with the desired k-mer size to be selected in ext.args + def args = task.ext.args ?: "" + def prefix = task.ext.prefix ?: "${meta.id}" + """ + sourmash index \\ + $args \\ + '${prefix}.sbt.zip' \\ + $signatures + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sourmash: \$(echo \$(sourmash --version 2>&1) | sed 's/^sourmash //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/sourmash/index/meta.yml b/modules/nf-core/sourmash/index/meta.yml new file mode 100644 index 00000000000..6006d8b4ba7 --- /dev/null +++ b/modules/nf-core/sourmash/index/meta.yml @@ -0,0 +1,46 @@ +name: "sourmash_index" +description: Create a database of sourmash signatures (a group of FracMinHash sketches) to be used as references. +keywords: + - signatures + - sourmash + - genomics + - metagenomics + - mapping + - kmer +tools: + - "sourmash": + description: "Compute and compare FracMinHash signatures for DNA data sets." + homepage: "https://sourmash.readthedocs.io/" + documentation: "https://sourmash.readthedocs.io/" + tool_dev_url: "https://github.com/sourmash-bio/sourmash" + doi: "10.21105/joss.00027" + licence: "['BSD-3-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - signatures: + type: file + description: Files containing signature (hash sketches) of reference genomes + pattern: "*.{sig}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - signature_index: + type: file + description: Database of signatures + pattern: "*.{sbt.zip}" + +authors: + - "@emnilsson" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a2b99472f2e..b4275be69f4 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3108,6 +3108,10 @@ sourmash/gather: - modules/nf-core/sourmash/gather/** - tests/modules/nf-core/sourmash/gather/** +sourmash/index: + - modules/nf-core/sourmash/index/** + - tests/modules/nf-core/sourmash/index/** + sourmash/sketch: - modules/nf-core/sourmash/sketch/** - tests/modules/nf-core/sourmash/sketch/** diff --git a/tests/modules/nf-core/sourmash/index/main.nf b/tests/modules/nf-core/sourmash/index/main.nf new file mode 100644 index 00000000000..d6e6f8c3365 --- /dev/null +++ b/tests/modules/nf-core/sourmash/index/main.nf @@ -0,0 +1,20 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SOURMASH_SKETCH } from '../../../../../modules/nf-core/sourmash/sketch/main.nf' +include { SOURMASH_INDEX } from '../../../../../modules/nf-core/sourmash/index/main.nf' + +workflow test_sourmash_index { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + SOURMASH_SKETCH ( input ) + + SOURMASH_INDEX ( + SOURMASH_SKETCH.out.signatures + ) +} diff --git a/tests/modules/nf-core/sourmash/index/nextflow.config b/tests/modules/nf-core/sourmash/index/nextflow.config new file mode 100644 index 00000000000..afb1bb8822e --- /dev/null +++ b/tests/modules/nf-core/sourmash/index/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName:SOURMASH_INDEX { + ext.args = "--ksize 31" + } + +} diff --git a/tests/modules/nf-core/sourmash/index/test.yml b/tests/modules/nf-core/sourmash/index/test.yml new file mode 100644 index 00000000000..915efde18d0 --- /dev/null +++ b/tests/modules/nf-core/sourmash/index/test.yml @@ -0,0 +1,10 @@ +- name: sourmash index test_sourmash_index + command: nextflow run ./tests/modules/nf-core/sourmash/index -entry test_sourmash_index -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/sourmash/index/nextflow.config + tags: + - sourmash/index + - sourmash + files: + - path: output/sourmash/test.sbt.zip + - path: output/sourmash/test.sig + md5sum: c23a5a251d2b6babba8ae0e3905e8d04 + - path: output/sourmash/versions.yml From 7101db4432d3268b7fcb5b8f75fa0a022dc5561b Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Wed, 29 Mar 2023 18:51:13 -0500 Subject: [PATCH 006/120] nf-test Transition CI (#3191) * build: Init nf-test * test: Run nf-test generate process modules/nf-core/fastqc/main.nf * test(fastqc): Convert first test to nf-test * ci(nf-test): Add initial CI setup This will fail until https://github.com/askimed/nf-test/pull/80 is released * chore: Bump actions/cache to v3 For nodejs 16 --- .github/workflows/nf-core-linting.yml | 4 +- .github/workflows/nf-test.yml | 180 ++++++++++++++++++ .github/workflows/pytest-workflow.yml | 4 +- .gitignore | 1 + .../templates/dumpsoftwareversions.py | 0 nf-test.config | 8 + tests/config/nf-test.config | 46 +++++ tests/config/nftest_modules.yml | 3 + tests/modules/nf-core/fastqc/main.nf | 14 -- tests/modules/nf-core/fastqc/main.nf.test | 32 ++++ tests/modules/nf-core/fastqc/test.yml | 10 - 11 files changed, 274 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/nf-test.yml mode change 100755 => 100644 modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py create mode 100644 nf-test.config create mode 100644 tests/config/nf-test.config create mode 100644 tests/config/nftest_modules.yml create mode 100644 tests/modules/nf-core/fastqc/main.nf.test diff --git a/.github/workflows/nf-core-linting.yml b/.github/workflows/nf-core-linting.yml index 1d2a08d5244..5144dc480a5 100644 --- a/.github/workflows/nf-core-linting.yml +++ b/.github/workflows/nf-core-linting.yml @@ -44,7 +44,7 @@ jobs: with: python-version: "3.x" - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} @@ -75,7 +75,7 @@ jobs: # HACK if: startsWith( matrix.tags, 'subworkflow' ) != true - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: /usr/local/bin/nextflow key: ${{ runner.os }} diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml new file mode 100644 index 00000000000..2b03468b092 --- /dev/null +++ b/.github/workflows/nf-test.yml @@ -0,0 +1,180 @@ +name: nf-test +on: + push: + branches: [master] + pull_request: + branches: [master] + merge_group: + types: [checks_requested] + branches: [master] + +# Cancel if a newer run is started +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + changes: + name: Check for changes + runs-on: ubuntu-latest + outputs: + # Expose matched filters as job 'modules' output variable + modules: ${{ steps.filter.outputs.changes }} + steps: + - uses: actions/checkout@v3 + + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: "tests/config/nftest_modules.yml" + + test: + runs-on: ubuntu-20.04 + + name: ${{ matrix.tags }} ${{ matrix.profile }} + needs: changes + if: needs.changes.outputs.modules != '[]' + strategy: + fail-fast: false + matrix: + tags: ["${{ fromJson(needs.changes.outputs.modules) }}"] + profile: ["docker", "singularity", "conda"] + exclude: + - profile: "conda" + tags: bases2fastq + - profile: "conda" + tags: bcl2fastq + - profile: "conda" + tags: bclconvert + - profile: "conda" + tags: cellranger/count + - profile: "conda" + tags: cellranger/mkfastq + - profile: "conda" + tags: cellranger/mkgtf + - profile: "conda" + tags: cellranger/mkref + - profile: "conda" + tags: deepvariant + - profile: "conda" + tags: ensemblvep/vep + - profile: "conda" + tags: fastk/fastk + - profile: "conda" + tags: fastk/histex + - profile: "conda" + tags: fastk/merge + - profile: "conda" + tags: fcs/fcsadaptor + - profile: "conda" + tags: fcs/fcsgx + - profile: "conda" + tags: gatk4/cnnscorevariants + - profile: "conda" + tags: gatk4/determinegermlinecontigploidy + - profile: "conda" + tags: genescopefk + - profile: "conda" + tags: ilastik/multicut + - profile: "conda" + tags: ilastik/pixelclassification + - profile: "conda" + tags: imputeme/vcftoprs + - profile: "conda" + tags: merquryfk/katcomp + - profile: "conda" + tags: merquryfk/katgc + - profile: "conda" + tags: merquryfk/merquryfk + - profile: "conda" + tags: merquryfk/ploidyplot + - profile: "conda" + tags: sentieon/bwaindex + - profile: "conda" + tags: sentieon/bwamem + - profile: "conda" + tags: universc + - profile: "singularity" + tags: universc + - profile: "conda" + tags: subworkflows/vcf_annotate_ensemblvep + env: + NXF_ANSI_LOG: false + SENTIEON_LICENSE_BASE64: ${{ secrets.SENTIEON_LICENSE_BASE64 }} + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache@v3 + with: + path: /usr/local/bin/nextflow + key: ${{ runner.os }} + restore-keys: | + ${{ runner.os }}-nextflow- + + - name: Install Nextflow + env: + CAPSULE_LOG: none + run: | + wget -qO- get.nextflow.io | bash + sudo mv nextflow /usr/local/bin/ + + - name: Cache nf-test installation + id: cache-software + uses: actions/cache@v3 + with: + path: | + /usr/local/bin/nf-test + /home/runner/.nf-test/nf-test.jar + key: ${{ runner.os }}-nftest + + - name: Install nf-test + if: steps.cache-software.outputs.cache-hit != 'true' + run: | + wget -qO- https://code.askimed.com/install/nf-test | bash + sudo mv nf-test /usr/local/bin/ + + - name: Set up Singularity + if: matrix.profile == 'singularity' + uses: eWaterCycle/setup-singularity@v5 + with: + singularity-version: 3.7.1 + + - name: Set up miniconda + if: matrix.profile == 'conda' + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + channels: conda-forge,bioconda,defaults + python-version: ${{ matrix.python-version }} + + - name: Conda setup + if: matrix.profile == 'conda' + run: | + conda clean -a + conda install -n base conda-libmamba-solver + conda config --set solver libmamba + + # Set up secrets + - name: Set up nextflow secrets + if: env.SENTIEON_LICENSE_BASE64 != null + run: | + nextflow secrets set SENTIEON_LICENSE_BASE64 ${{ secrets.SENTIEON_LICENSE_BASE64 }} + nextflow secrets set SENTIEON_AUTH_MECH_BASE64 ${{ secrets.SENTIEON_AUTH_MECH_BASE64 }} + SENTIEON_ENCRYPTION_KEY=$(echo -n "${{ secrets.ENCRYPTION_KEY_BASE64 }}" | base64 -d) + SENTIEON_LICENSE_MESSAGE=$(echo -n "${{ secrets.LICENSE_MESSAGE_BASE64 }}" | base64 -d) + SENTIEON_AUTH_DATA=$(python tests/modules/nf-core/sentieon/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE") + SENTIEON_AUTH_DATA_BASE64=$(echo -n "$SENTIEON_AUTH_DATA" | base64 -w 0) + nextflow secrets set SENTIEON_AUTH_DATA_BASE64 $SENTIEON_AUTH_DATA_BASE64 + + # Test the module + - name: Run nf-test + run: | + nf-test test \ + --profile=${{ matrix.profile }} \ + --tag ${{ matrix.tags }} \ + --tap=test.tap + + - uses: pcolby/tap-summary@v1 + with: + path: >- + test.tap diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 6793efad929..7f225b3991d 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -109,7 +109,7 @@ jobs: with: python-version: "3.x" - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} @@ -119,7 +119,7 @@ jobs: - name: Install Python dependencies run: python -m pip install --upgrade pip pytest-workflow cryptography - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: /usr/local/bin/nextflow key: ${{ runner.os }} diff --git a/.gitignore b/.gitignore index c773a2d0a7c..2b9d4996156 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ work/ results/ test_output/ +.nf-test/ output/ .DS_Store *.code-workspace diff --git a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py old mode 100755 new mode 100644 diff --git a/nf-test.config b/nf-test.config new file mode 100644 index 00000000000..0b752cdf2ae --- /dev/null +++ b/nf-test.config @@ -0,0 +1,8 @@ +config { + + testsDir "tests" + workDir ".nf-test" + configFile "tests/config/nf-test.config" + profile "" + +} diff --git a/tests/config/nf-test.config b/tests/config/nf-test.config new file mode 100644 index 00000000000..b906ae9845d --- /dev/null +++ b/tests/config/nf-test.config @@ -0,0 +1,46 @@ +params { + outdir = "$outputDir" + publish_dir_mode = "copy" + singularity_pull_docker_container = false + test_data_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules' +} + +process { + cpus = 2 + memory = 3.GB + time = 2.h +} + +profiles { + singularity { + singularity.enabled = true + singularity.autoMounts = true + } + conda { + conda.enabled = true + } + mamba { + conda.enabled = true + conda.useMamba = true + } + podman { + podman.enabled = true + podman.userEmulation = true + podman.runOptions = "--runtime crun --platform linux/x86_64 --systemd=always" + } + docker { + docker.enabled = true + docker.userEmulation = true + docker.runOptions = "--platform linux/x86_64" + } +} + +// Increase time available to build Conda environment +conda { createTimeout = "120 min" } + +// Load test_data.config containing paths to test data +includeConfig 'test_data.config' + +manifest { + nextflowVersion = '!>=22.10.1' +} diff --git a/tests/config/nftest_modules.yml b/tests/config/nftest_modules.yml new file mode 100644 index 00000000000..33e3e2046d9 --- /dev/null +++ b/tests/config/nftest_modules.yml @@ -0,0 +1,3 @@ +fastqc: + - modules/nf-core/fastqc/** + - tests/modules/nf-core/fastqc/** diff --git a/tests/modules/nf-core/fastqc/main.nf b/tests/modules/nf-core/fastqc/main.nf index 049c50d292d..2fcab9dc246 100644 --- a/tests/modules/nf-core/fastqc/main.nf +++ b/tests/modules/nf-core/fastqc/main.nf @@ -4,20 +4,6 @@ nextflow.enable.dsl = 2 include { FASTQC } from '../../../../modules/nf-core/fastqc/main.nf' -// -// Test with single-end data -// -workflow test_fastqc_single_end { - input = [ - [ id:'test', single_end:true ], // meta map - [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) - ] - ] - - FASTQC ( input ) -} - // // Test with paired-end data // diff --git a/tests/modules/nf-core/fastqc/main.nf.test b/tests/modules/nf-core/fastqc/main.nf.test new file mode 100644 index 00000000000..3961de60662 --- /dev/null +++ b/tests/modules/nf-core/fastqc/main.nf.test @@ -0,0 +1,32 @@ +nextflow_process { + + name "Test Process FASTQC" + script "modules/nf-core/fastqc/main.nf" + process "FASTQC" + tag "fastqc" + + test("Single-Read") { + + when { + process { + """ + input[0] = [ + [ id: 'test', single_end:true ], + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assert process.success + assert process.out.html.get(0).get(1) ==~ ".*/test_fastqc.html" + assert path(process.out.html.get(0).get(1)).getText().contains("File typeConventional base calls") + assert process.out.zip.get(0).get(1) ==~ ".*/test_fastqc.zip" + } + + } + +} diff --git a/tests/modules/nf-core/fastqc/test.yml b/tests/modules/nf-core/fastqc/test.yml index b9716836a22..5fbc680b217 100644 --- a/tests/modules/nf-core/fastqc/test.yml +++ b/tests/modules/nf-core/fastqc/test.yml @@ -1,13 +1,3 @@ -- name: fastqc test_fastqc_single_end - command: nextflow run ./tests/modules/nf-core/fastqc -entry test_fastqc_single_end -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/fastqc/nextflow.config - tags: - - fastqc - files: - - path: output/fastqc/test_fastqc.html - contains: - - File typeConventional base calls - - path: output/fastqc/test_fastqc.zip - - name: fastqc test_fastqc_paired_end command: nextflow run ./tests/modules/nf-core/fastqc -entry test_fastqc_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/fastqc/nextflow.config tags: From 138922405f627b7f3136d4d8e19f8728cdbce9eb Mon Sep 17 00:00:00 2001 From: Luke Paul Buttigieg Date: Thu, 30 Mar 2023 02:23:37 +0100 Subject: [PATCH 007/120] Removed -1 in CPU size specification for samtools in BWA module (#3205) Removed -1 in CPU size specification --- modules/nf-core/bwa/sampe/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/bwa/sampe/main.nf b/modules/nf-core/bwa/sampe/main.nf index cfe4529c248..8a6c24d4aad 100644 --- a/modules/nf-core/bwa/sampe/main.nf +++ b/modules/nf-core/bwa/sampe/main.nf @@ -31,7 +31,7 @@ process BWA_SAMPE { $read_group \\ \$INDEX \\ $sai \\ - $reads | samtools sort -@ ${task.cpus - 1} -O bam - > ${prefix}.bam + $reads | samtools sort -@ ${task.cpus} -O bam - > ${prefix}.bam cat <<-END_VERSIONS > versions.yml "${task.process}": From e6adc3b50443f9038478a9f2b7611311e96d6a8d Mon Sep 17 00:00:00 2001 From: Joan Gaztelu <64015341+LlaneroHiboreo@users.noreply.github.com> Date: Thu, 30 Mar 2023 07:09:20 +0200 Subject: [PATCH 008/120] Addition of new module: Issue #3113 Survivor/filter (#3168) * upload survivor filter module * add survivor/filter test * update files * update file test * update files * update files * update files * update files * Update modules/nf-core/survivor/filter/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * upgrade module * upgrade test files * upgrade test files * pretty test files * upgrade to check filenames * fix file name comparison * check linting --------- Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- modules/nf-core/survivor/filter/main.nf | 64 +++++++++++++++++++ modules/nf-core/survivor/filter/meta.yml | 59 +++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/survivor/filter/main.nf | 42 ++++++++++++ .../nf-core/survivor/filter/nextflow.config | 5 ++ .../modules/nf-core/survivor/filter/test.yml | 23 +++++++ 6 files changed, 197 insertions(+) create mode 100644 modules/nf-core/survivor/filter/main.nf create mode 100644 modules/nf-core/survivor/filter/meta.yml create mode 100644 tests/modules/nf-core/survivor/filter/main.nf create mode 100644 tests/modules/nf-core/survivor/filter/nextflow.config create mode 100644 tests/modules/nf-core/survivor/filter/test.yml diff --git a/modules/nf-core/survivor/filter/main.nf b/modules/nf-core/survivor/filter/main.nf new file mode 100644 index 00000000000..84608aa1cd8 --- /dev/null +++ b/modules/nf-core/survivor/filter/main.nf @@ -0,0 +1,64 @@ +process SURVIVOR_FILTER { + tag "$meta.id" + label 'process_single' + + conda "bioconda::survivor=1.0.7" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/survivor:1.0.7--h9a82719_1': + 'quay.io/biocontainers/survivor:1.0.7--h9a82719_1' }" + + input: + tuple val(meta), path(vcf_file), path(bed) // VCF file to filter and BED file with regions to ignore (NA to disable) + val(minsv) // Min SV size (-1 to disable) + val(maxsv) // Max SV size (-1 to disable) + val(minallelefreq) // Min allele frequency (0-1) + val(minnumreads) // Min number of reads support: RE flag (-1 to disable) + + output: + tuple val(meta), path("*.vcf"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def bed_file = bed ? "${bed}" : "NA" + + if( "$vcf_file" == "${prefix}.vcf" ){ + error "Input and output names are the same, set prefix in module configuration to disambiguate!" + } + """ + SURVIVOR \\ + filter \\ + $vcf_file \\ + $bed_file \\ + $minsv \\ + $maxsv \\ + $minallelefreq \\ + $minnumreads \\ + ${prefix}.vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + survivor: \$(echo \$(SURVIVOR 2>&1 | grep "Version" | sed 's/^Version: //')) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def bed_file = bed ? "${bed}" : "NA" + + if( "$vcf_file" == "${prefix}.vcf" ){ + error "Input and output names are the same, set prefix in module configuration to disambiguate!" + } + + """ + touch ${prefix}.vcf + cat <<-END_VERSIONS > versions.yml + "${task.process}": + survivor: \$(echo \$(SURVIVOR 2>&1 | grep "Version" | sed 's/^Version: //')) + END_VERSIONS + """ +} diff --git a/modules/nf-core/survivor/filter/meta.yml b/modules/nf-core/survivor/filter/meta.yml new file mode 100644 index 00000000000..091e13bbc1a --- /dev/null +++ b/modules/nf-core/survivor/filter/meta.yml @@ -0,0 +1,59 @@ +name: "survivor_filter" +description: Filter a vcf file based on size and/or regions to ignore +keywords: + - survivor + - filter + - vcf + - structural variants +tools: + - "survivor": + description: "Toolset for SV simulation, comparison and filtering" + homepage: "https://github.com/fritzsedlazeck/SURVIVOR/wiki" + documentation: "https://github.com/fritzsedlazeck/SURVIVOR/wiki" + tool_dev_url: "https://github.com/fritzsedlazeck/SURVIVOR" + doi: "10.1038/NCOMMS14061" + licence: "['MIT']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file to filter + pattern: "*.{vcf}" + - bed: + type: file + description: BED file with regions to ignore (NA to disable) + - minsv: + type: integer + description: Min SV size (-1 to disable) + - maxsv: + type: integer + description: Max SV size (-1 to disable) + - minallelefreq: + type: float + description: Min allele frequency (0-1) + - minnumreads: + integer: integer + description: Min number of reads support [RE flag (-1 to disable)] + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf: + type: file + description: Filtered VCF file + pattern: "*.{vcf}" + +authors: + - "@LlaneroHiboreo" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index b4275be69f4..46fa3689e2a 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3352,6 +3352,10 @@ subworkflows/vcf_impute_glimpse: - subworkflows/nf-core/vcf_impute_glimpse/** - tests/subworkflows/nf-core/vcf_impute_glimpse/** +survivor/filter: + - modules/nf-core/survivor/filter/** + - tests/modules/nf-core/survivor/filter/** + survivor/merge: - modules/nf-core/survivor/merge/** - tests/modules/nf-core/survivor/merge/** diff --git a/tests/modules/nf-core/survivor/filter/main.nf b/tests/modules/nf-core/survivor/filter/main.nf new file mode 100644 index 00000000000..5a5d4314af5 --- /dev/null +++ b/tests/modules/nf-core/survivor/filter/main.nf @@ -0,0 +1,42 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SURVIVOR_FILTER as SURVIVOR_FILTER_NO_BED} from '../../../../../modules/nf-core/survivor/filter/main.nf' +include { SURVIVOR_FILTER as SURVIVOR_FILTER_BED} from '../../../../../modules/nf-core/survivor/filter/main.nf' + +workflow test_survivor_filter_no_bed { + + input_no_bed = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + [] + ] + + SURVIVOR_FILTER_NO_BED ( + input_no_bed, + 51, + 10001, + 0.01, + 10 + ) + +} + +workflow test_survivor_filter { + + input_bed = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + SURVIVOR_FILTER_BED ( + input_bed, + 51, + 10001, + 0.01, + 10 + ) + +} diff --git a/tests/modules/nf-core/survivor/filter/nextflow.config b/tests/modules/nf-core/survivor/filter/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/survivor/filter/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/survivor/filter/test.yml b/tests/modules/nf-core/survivor/filter/test.yml new file mode 100644 index 00000000000..ebd79f20102 --- /dev/null +++ b/tests/modules/nf-core/survivor/filter/test.yml @@ -0,0 +1,23 @@ +- name: "survivor filter without regions to ignore" + command: nextflow run ./tests/modules/nf-core/survivor/filter -entry test_survivor_filter_no_bed -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/survivor/filter/nextflow.config + tags: + - survivor + - survivor/filter + files: + - path: output/survivor/test.vcf + contains: + - "##fileformat=VCFv4.2" + md5sum: ec23f83ba5bb098d45027e63fab93d05 + - path: output/survivor/versions.yml + md5sum: 9dfd6d01fe01fbcee31c9a6da1c96f9f + +- name: "survivor filter with regions to ignore" + command: nextflow run ./tests/modules/nf-core/survivor/filter -entry test_survivor_filter -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/survivor/filter/nextflow.config + tags: + - survivor + - survivor/filter + files: + - path: output/survivor/test.vcf + md5sum: ec23f83ba5bb098d45027e63fab93d05 + - path: output/survivor/versions.yml + md5sum: 139b0674031a5ec44982107e7674de4f From 15249c96231351c164da35122256921c6a297ee2 Mon Sep 17 00:00:00 2001 From: MarieLataretu <52002068+MarieLataretu@users.noreply.github.com> Date: Thu, 30 Mar 2023 08:06:49 +0200 Subject: [PATCH 009/120] new tool: art_illumina (#3162) * new tool: art_illumina * [automated] Fix linting with Prettier * removed tailing whitespace * changed to md5sum from singularity output for gz files * switched from md5sums to contains for gz files - gzip result has different md5sum for conda and docker/singularity * added args2 to gzip command * added stub - added stub section - added stub tests for singe and paired end * directy stub gz files Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * extended description for optional output files * removed tab should fixe ECLint check --------- Co-authored-by: nf-core-bot Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- modules/nf-core/art/illumina/main.nf | 71 +++++++++++++++++++ modules/nf-core/art/illumina/meta.yml | 61 ++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/art/illumina/main.nf | 31 ++++++++ .../nf-core/art/illumina/nextflow.config | 12 ++++ tests/modules/nf-core/art/illumina/test.yml | 58 +++++++++++++++ 6 files changed, 237 insertions(+) create mode 100644 modules/nf-core/art/illumina/main.nf create mode 100644 modules/nf-core/art/illumina/meta.yml create mode 100644 tests/modules/nf-core/art/illumina/main.nf create mode 100644 tests/modules/nf-core/art/illumina/nextflow.config create mode 100644 tests/modules/nf-core/art/illumina/test.yml diff --git a/modules/nf-core/art/illumina/main.nf b/modules/nf-core/art/illumina/main.nf new file mode 100644 index 00000000000..63dac231db2 --- /dev/null +++ b/modules/nf-core/art/illumina/main.nf @@ -0,0 +1,71 @@ +process ART_ILLUMINA { + + tag "$meta.id" + label 'process_single' + + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + conda "bioconda::art=2016.06.05" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/art:2016.06.05--h589041f_9': + 'quay.io/biocontainers/art:2016.06.05--h589041f_9' }" + + input: + tuple val(meta), path(fasta) + val(sequencing_system) + val(fold_coverage) + val(read_length) + + output: + tuple val(meta), path("*.fq.gz"), emit: fastq + tuple val(meta), path("*.aln"), optional:true , emit: aln + tuple val(meta), path("*.sam"), optional:true , emit: sam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '2016.06.05' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + art_illumina \\ + -ss $sequencing_system \\ + -i $fasta \\ + -l $read_length \\ + -f $fold_coverage \\ + -o $prefix \\ + $args + + gzip \\ + --no-name \\ + $args2 \\ + $prefix*.fq + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + art: $VERSION + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '2016.06.05' + """ + touch ${prefix}.fq.gz + touch ${prefix}1.fq.gz + touch ${prefix}2.fq.gz + touch ${prefix}.aln + touch ${prefix}1.aln + touch ${prefix}2.aln + touch ${prefix}.sam + touch ${prefix}1.sam + touch ${prefix}2.sam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + art: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/art/illumina/meta.yml b/modules/nf-core/art/illumina/meta.yml new file mode 100644 index 00000000000..b44fb2f4632 --- /dev/null +++ b/modules/nf-core/art/illumina/meta.yml @@ -0,0 +1,61 @@ +name: "art_illumina" +description: Simulation tool to generate synthetic Illumina next-generation sequencing reads +keywords: + - fastq + - fasta + - illumina + - simulate +tools: + - "art": + description: "ART is a set of simulation tools to generate synthetic next-generation sequencing reads. ART simulates sequencing reads by mimicking real sequencing process with empirical error models or quality profiles summarized from large recalibrated sequencing data. ART can also simulate reads using user own read error model or quality profiles. " + homepage: "https://www.niehs.nih.gov/research/resources/software/biostatistics/art/index.cfm" + documentation: "" + tool_dev_url: "" + doi: "https://doi.org/10.1093/bioinformatics/btr708" + licence: "GPL version 3 license" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - fasta: + type: file + description: FASTA file of input DNA/RNA reference + pattern: "*.{fasta,fa}" + - sequencing_system: + type: string + description: The name of Illumina sequencing system of the built-in profile used for simulation + - fold_coverage: + type: integer + description: The fold of read coverage to be simulated or number of reads/read pairs generated for each amplicon + - read_length: + type: integer + description: The length of reads to be simulated + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: Simulated reads + pattern: "*.fq.gz" + - aln: + type: file + description: OPTIONAL Alignment file of the simulated reads. Enabled by default, to disable, use -na/--noALN. + pattern: "*.aln" + - sam: + type: file + description: OPTIONAL Alignment file in SAM format of the simulated reads. Enabled with -sam/--samout. + pattern: "*.sam" + +authors: + - "@MarieLataretu" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 46fa3689e2a..9b17d232a85 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -110,6 +110,10 @@ arriba: - modules/nf-core/arriba/** - tests/modules/nf-core/arriba/** +art/illumina: + - modules/nf-core/art/illumina/** + - tests/modules/nf-core/art/illumina/** + artic/guppyplex: - modules/nf-core/artic/guppyplex/** - tests/modules/nf-core/artic/guppyplex/** diff --git a/tests/modules/nf-core/art/illumina/main.nf b/tests/modules/nf-core/art/illumina/main.nf new file mode 100644 index 00000000000..3ca18850895 --- /dev/null +++ b/tests/modules/nf-core/art/illumina/main.nf @@ -0,0 +1,31 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ART_ILLUMINA } from '../../../../../modules/nf-core/art/illumina/main.nf' + +workflow test_art_illumina_single_end { + + input = [ [ id: 'test'], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + sequencing_system = 'HS25' + fold_coverage = '15' + read_length = '150' + + ART_ILLUMINA ( input, sequencing_system, fold_coverage, read_length ) +} + +workflow test_art_illumina_paired_end { + + input = [ [ id: 'test'], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + sequencing_system = 'HS25' + fold_coverage = '15' + read_length = '150' + + ART_ILLUMINA ( input, sequencing_system, fold_coverage, read_length ) +} \ No newline at end of file diff --git a/tests/modules/nf-core/art/illumina/nextflow.config b/tests/modules/nf-core/art/illumina/nextflow.config new file mode 100644 index 00000000000..506d29ce385 --- /dev/null +++ b/tests/modules/nf-core/art/illumina/nextflow.config @@ -0,0 +1,12 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: '.*test_art_illumina_single_end:ART_ILLUMINA' { + ext.args = '-rs 42' + } + + withName: '.*test_art_illumina_paired_end:ART_ILLUMINA' { + ext.args = '-p -m 250 -s 50 -rs 42' + } +} \ No newline at end of file diff --git a/tests/modules/nf-core/art/illumina/test.yml b/tests/modules/nf-core/art/illumina/test.yml new file mode 100644 index 00000000000..6a67e61fefc --- /dev/null +++ b/tests/modules/nf-core/art/illumina/test.yml @@ -0,0 +1,58 @@ +- name: art illumina test_art_illumina_single_end + command: nextflow run ./tests/modules/nf-core/art/illumina -entry test_art_illumina_single_end -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/art/illumina/nextflow.config + tags: + - art + - art/illumina + files: + - path: output/art/test.aln + md5sum: 7aa88720911ca1a862e4a24d57435e3c + - path: output/art/test.fq.gz + contains: + - "@MT192765.1-2970" + - "GAAAAGAGCTATGAATTGCAGACACCTTTTGAAATTAAATTGGCAAAGAAATTTGACACCTTCTATGGGGAATGTCCAAATTTTGTATTTCCCTTAAATTCCATAATCAAGACTATTCAACCAAGGGTTGAAAAGAAAAAGCTTGATGGC" + - "C1CGGGCGG=GGGJGJG=JJCJJJCJGJJJJGJJJ1JJJGJJGGJGJJGGGJJGJJJCJGGGJ(=G1GGG(CCCGGGCGCGGGCCGCCG8GGGGGGGGGGCC(CGG1GGGG1GGCGCGGCGGGCGCGGGCGGGGCGCCGGGGGCG8GGGG" + - path: output/art/versions.yml + +- name: art illumina test_art_illumina_paired_end + command: nextflow run ./tests/modules/nf-core/art/illumina -entry test_art_illumina_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/art/illumina/nextflow.config + tags: + - art + - art/illumina + files: + - path: output/art/test1.aln + md5sum: d9d892aa450ed6f6f4a7961d60bee2e7 + - path: output/art/test1.fq.gz + contains: + - "@MT192765.1-2970/1" + - "GTTGCGACTACGTGATGAGGAACGAGAAGCGGCTTGACTGCCGCCTCTGCTCCCTTCTGCGTAGAAGCCTTTTGGCAATGTTGTTCCTTGAGGAAGTTGTAGCACGATTGCAGCATTGTTAGCAGGATTGCGGGTGCCAATGTGATCTTT" + - "CCCGGGGGGGGGGGCJCJJJJJ1JJJGJJ(JJJGGGJJJJGGJGJJGJJJCCGCJCJC=GCGGG8GJGGGCGG=1G1CJGG=GGCGGCGGGGGCCGG=8GJCCGCCGCGGGGGGGC=GGG=CCGCGGCGGGCC=GGGGGGCGGCCCGCGG" + - path: output/art/test2.aln + md5sum: 41b0440c0eeacc2941f6fdefcf484344 + - path: output/art/test2.fq.gz + contains: + - "@MT192765.1-2970/2" + - "GAGCTACCAGACGAATTCGTGGTGGTGACGGTAAAATGAAAGATCTCAGTCCAAGATGGTATTTCTACTACCTAGGAACTGGGCCAGAAGCTGGACTTCCCTATGGTGCTAACAAAGACGGCATCATATGGGTTGCAACTGAGGGAGCCT" + - "1CCGGGGGGGCGGGJJJJJGJG1GJGJ=JGJJCJJJCJJJGJ1GJGJGGJJC8JGG=JGGCGCCGCGGCCCGJCGGGGCJC==CGG88CGGGCGGGCCCGGC8JJJJCGGCGGCCGGGG=CGGGGCCGGCCCGCGCCCCG8GGGG=GGGC" + - path: output/art/versions.yml + +- name: art illumina test_art_illumina_single_end_stub + command: nextflow run ./tests/modules/nf-core/art/illumina -entry test_art_illumina_single_end -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/art/illumina/nextflow.config -stub + tags: + - art + - art/illumina + files: + - path: output/art/test.aln + - path: output/art/test.fq.gz + - path: output/art/versions.yml + +- name: art illumina test_art_illumina_paired_end_stub + command: nextflow run ./tests/modules/nf-core/art/illumina -entry test_art_illumina_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/art/illumina/nextflow.config -stub + tags: + - art + - art/illumina + files: + - path: output/art/test1.aln + - path: output/art/test1.fq.gz + - path: output/art/test2.aln + - path: output/art/test2.fq.gz + - path: output/art/versions.yml From 2498e243c8c30c7125661e62fc777917d8e343b9 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Thu, 30 Mar 2023 08:15:29 +0100 Subject: [PATCH 010/120] Emit files from uncompression utilities (#3144) * Make untar emit a files channel * Make unzip emit a files channel * Document new files channels * Make files emissions for dearchivers optional * Appease eclint * Reset untar and unzip (retain minor fixes) * Add _files versions of uncompression utils, check for versions.ymls * Fix up _files decompressors * Remove relic code * Update authors * Remove removed output channel * fix liniting errors * Assume population of meta.id Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Correct tests for file-emitting uncompressors * Remove relic comment * Remove meta.id assumptions * untar_files -> untarfiles * Fix untarfiles tests * unzip_files -> unzipfiles * untar/unzip outputs are not optional --------- Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- modules/nf-core/untarfiles/main.nf | 52 +++++++++++++++++++ modules/nf-core/untarfiles/meta.yml | 41 +++++++++++++++ modules/nf-core/unzip/main.nf | 8 +-- modules/nf-core/unzipfiles/main.nf | 37 +++++++++++++ modules/nf-core/unzipfiles/meta.yml | 42 +++++++++++++++ tests/config/pytest_modules.yml | 8 +++ tests/modules/nf-core/untar/main.nf | 1 - tests/modules/nf-core/untar/test.yml | 3 ++ tests/modules/nf-core/untarfiles/main.nf | 33 ++++++++++++ .../nf-core/untarfiles/nextflow.config | 5 ++ tests/modules/nf-core/untarfiles/test.yml | 30 +++++++++++ tests/modules/nf-core/unzip/main.nf | 1 + tests/modules/nf-core/unzip/test.yml | 3 +- tests/modules/nf-core/unzipfiles/main.nf | 16 ++++++ .../nf-core/unzipfiles/nextflow.config | 5 ++ tests/modules/nf-core/unzipfiles/test.yml | 11 ++++ 16 files changed, 291 insertions(+), 5 deletions(-) create mode 100644 modules/nf-core/untarfiles/main.nf create mode 100644 modules/nf-core/untarfiles/meta.yml create mode 100644 modules/nf-core/unzipfiles/main.nf create mode 100644 modules/nf-core/unzipfiles/meta.yml create mode 100644 tests/modules/nf-core/untarfiles/main.nf create mode 100644 tests/modules/nf-core/untarfiles/nextflow.config create mode 100644 tests/modules/nf-core/untarfiles/test.yml create mode 100644 tests/modules/nf-core/unzipfiles/main.nf create mode 100644 tests/modules/nf-core/unzipfiles/nextflow.config create mode 100644 tests/modules/nf-core/unzipfiles/test.yml diff --git a/modules/nf-core/untarfiles/main.nf b/modules/nf-core/untarfiles/main.nf new file mode 100644 index 00000000000..8bca09d02aa --- /dev/null +++ b/modules/nf-core/untarfiles/main.nf @@ -0,0 +1,52 @@ +process UNTARFILES { + tag "$archive" + label 'process_single' + + conda "conda-forge::sed=4.7 bioconda::grep=3.4 conda-forge::tar=1.34" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" + + input: + tuple val(meta), path(archive) + + output: + tuple val(meta), path("${prefix}/**") , emit: files + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.baseName.toString().replaceFirst(/\.tar$/, "")) + + """ + mkdir $prefix + + tar \\ + -C $prefix \\ + -xavf \\ + $args \\ + $archive \\ + $args2 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + mkdir $prefix + touch ${prefix}/file.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/untarfiles/meta.yml b/modules/nf-core/untarfiles/meta.yml new file mode 100644 index 00000000000..e89aa3d6b08 --- /dev/null +++ b/modules/nf-core/untarfiles/meta.yml @@ -0,0 +1,41 @@ +name: untarfiles +description: Extract files. +keywords: + - untar + - uncompress +tools: + - untar: + description: | + Extract tar.gz files. + documentation: https://www.gnu.org/software/tar/manual/ + licence: ["GPL-3.0-or-later"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - archive: + type: file + description: File to be untar + pattern: "*.{tar}.{gz}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - files: + type: list + description: A list containing references to individual archive files + pattern: "*/**" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@joseespinosa" + - "@drpatelh" + - "@matthdsm" + - "@jfy133" + - "@pinin4fjords" diff --git a/modules/nf-core/unzip/main.nf b/modules/nf-core/unzip/main.nf index 4ad257ce0aa..4524b6cdd2d 100644 --- a/modules/nf-core/unzip/main.nf +++ b/modules/nf-core/unzip/main.nf @@ -11,8 +11,8 @@ process UNZIP { tuple val(meta), path(archive) output: - tuple val(meta), path("${archive.baseName}/"), emit: unzipped_archive - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}/"), emit: unzipped_archive + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -20,10 +20,12 @@ process UNZIP { script: def args = task.ext.args ?: '' if ( archive instanceof List && archive.name.size > 1 ) { exit 1, "[UNZIP] error: 7za only accepts a single archive as input. Please check module input." } + + prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.baseName) """ 7za \\ x \\ - -o"${archive.baseName}"/ \\ + -o"${prefix}"/ \\ $args \\ $archive diff --git a/modules/nf-core/unzipfiles/main.nf b/modules/nf-core/unzipfiles/main.nf new file mode 100644 index 00000000000..bfafbab5810 --- /dev/null +++ b/modules/nf-core/unzipfiles/main.nf @@ -0,0 +1,37 @@ +process UNZIPFILES { + tag "$archive" + label 'process_single' + + conda "conda-forge::p7zip=16.02" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/p7zip:15.09--h2d50403_4' : + 'quay.io/biocontainers/p7zip:15.09--h2d50403_4' }" + + input: + tuple val(meta), path(archive) + + output: + tuple val(meta), path("${prefix}/**"), emit: files + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + if ( archive instanceof List && archive.name.size > 1 ) { exit 1, "[UNZIP] error: 7za only accepts a single archive as input. Please check module input." } + + prefix = task.ext.prefix ?: ( meta.id ? "${meta.id}" : archive.baseName) + """ + 7za \\ + x \\ + -o"${prefix}"/ \\ + $args \\ + $archive + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + 7za: \$(echo \$(7za --help) | sed 's/.*p7zip Version //; s/(.*//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/unzipfiles/meta.yml b/modules/nf-core/unzipfiles/meta.yml new file mode 100644 index 00000000000..d8403d3c461 --- /dev/null +++ b/modules/nf-core/unzipfiles/meta.yml @@ -0,0 +1,42 @@ +name: unzipfiles +description: Unzip ZIP archive files +keywords: + - unzip + - decompression +tools: + - unzip: + description: p7zip is a quick port of 7z.exe and 7za.exe (command line version of 7zip, see www.7-zip.org) for Unix. + homepage: https://sourceforge.net/projects/p7zip/ + documentation: https://sourceforge.net/projects/p7zip/ + tool_dev_url: https://sourceforge.net/projects/p7zip" + licence: ["LGPL-2.1-or-later"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - archive: + type: file + description: ZIP file + pattern: "*.zip" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - files: + type: list + description: A list containing references to individual archive files + pattern: "*/**" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@jfy133" + - "@pinin4fjords" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 9b17d232a85..f433992c3f6 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3513,10 +3513,18 @@ untar: - modules/nf-core/untar/** - tests/modules/nf-core/untar/** +untarfiles: + - modules/nf-core/untarfiles/** + - tests/modules/nf-core/untarfiles/** + unzip: - modules/nf-core/unzip/** - tests/modules/nf-core/unzip/** +unzipfiles: + - modules/nf-core/unzipfiles/** + - tests/modules/nf-core/unzipfiles/** + vardictjava: - modules/nf-core/vardictjava/** - tests/modules/nf-core/vardictjava/** diff --git a/tests/modules/nf-core/untar/main.nf b/tests/modules/nf-core/untar/main.nf index 3d92298bc0f..f12b4e985ab 100644 --- a/tests/modules/nf-core/untar/main.nf +++ b/tests/modules/nf-core/untar/main.nf @@ -13,7 +13,6 @@ workflow test_untar { UNTAR ( input ) } - workflow test_untar_different_output_path { input = [ [], diff --git a/tests/modules/nf-core/untar/test.yml b/tests/modules/nf-core/untar/test.yml index a314e167b12..6db86342f80 100644 --- a/tests/modules/nf-core/untar/test.yml +++ b/tests/modules/nf-core/untar/test.yml @@ -9,6 +9,7 @@ md5sum: a033d00cf6759407010b21700938f543 - path: output/untar/kraken2/taxo.k2d md5sum: 094d5891cdccf2f1468088855c214b2c + - path: output/untar/versions.yml - name: untar test_untar_different_output_path command: nextflow run ./tests/modules/nf-core/untar -entry test_untar_different_output_path -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/untar/nextflow.config @@ -17,6 +18,7 @@ files: - path: output/untar/flowcell/RunInfo.xml md5sum: 03038959f4dd181c86bc97ae71fe270a + - path: output/untar/versions.yml - name: untar test_untar_onlyfiles command: nextflow run ./tests/modules/nf-core/untar -entry test_untar_onlyfiles -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/untar/nextflow.config @@ -25,3 +27,4 @@ files: - path: output/untar/hello/hello.txt md5sum: e59ff97941044f85df5297e1c302d260 + - path: output/untar/versions.yml diff --git a/tests/modules/nf-core/untarfiles/main.nf b/tests/modules/nf-core/untarfiles/main.nf new file mode 100644 index 00000000000..92d9b0b06e9 --- /dev/null +++ b/tests/modules/nf-core/untarfiles/main.nf @@ -0,0 +1,33 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTARFILES } from '../../../../modules/nf-core/untarfiles/main.nf' + +workflow test_untarfiles { + input = [ + [id: 'test'], + file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) + ] + + UNTARFILES ( input ) +} + +workflow test_untarfiles_different_output_path { + input = [ + [id: 'test'], + file(params.test_data['homo_sapiens']['illumina']['test_flowcell'], checkIfExists: true) + ] + + UNTARFILES ( input ) +} + + +workflow test_untarfiles_onlyfiles { + input = [ + [id: 'test'], + file(params.test_data['generic']['tar']['tar_gz'], checkIfExists: true) + ] + + UNTARFILES ( input ) +} diff --git a/tests/modules/nf-core/untarfiles/nextflow.config b/tests/modules/nf-core/untarfiles/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/untarfiles/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/untarfiles/test.yml b/tests/modules/nf-core/untarfiles/test.yml new file mode 100644 index 00000000000..59d77f61c6f --- /dev/null +++ b/tests/modules/nf-core/untarfiles/test.yml @@ -0,0 +1,30 @@ +- name: untarfiles test_untarfiles + command: nextflow run ./tests/modules/nf-core/untarfiles -entry test_untarfiles -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/untarfiles/nextflow.config + tags: + - untarfiles + files: + - path: output/untarfiles/test/kraken2/hash.k2d + md5sum: 8b8598468f54a7087c203ad0190555d9 + - path: output/untarfiles/test/kraken2/opts.k2d + md5sum: a033d00cf6759407010b21700938f543 + - path: output/untarfiles/test/kraken2/taxo.k2d + md5sum: 094d5891cdccf2f1468088855c214b2c + - path: output/untarfiles/versions.yml + +- name: untarfiles test_untarfiles_different_output_path + command: nextflow run ./tests/modules/nf-core/untarfiles -entry test_untarfiles_different_output_path -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/untarfiles/nextflow.config + tags: + - untarfiles + files: + - path: output/untarfiles/test/220422_M11111_0222_000000000-K9H97/RunInfo.xml + md5sum: 03038959f4dd181c86bc97ae71fe270a + - path: output/untarfiles/versions.yml + +- name: untarfiles test_untarfiles_onlyfiles + command: nextflow run ./tests/modules/nf-core/untarfiles -entry test_untarfiles_onlyfiles -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/untarfiles/nextflow.config + tags: + - untarfiles + files: + - path: output/untarfiles/test/hello.txt + md5sum: e59ff97941044f85df5297e1c302d260 + - path: output/untarfiles/versions.yml diff --git a/tests/modules/nf-core/unzip/main.nf b/tests/modules/nf-core/unzip/main.nf index 7992797b59e..553ea964148 100644 --- a/tests/modules/nf-core/unzip/main.nf +++ b/tests/modules/nf-core/unzip/main.nf @@ -13,3 +13,4 @@ workflow test_unzip { UNZIP ( archive ) } + diff --git a/tests/modules/nf-core/unzip/test.yml b/tests/modules/nf-core/unzip/test.yml index 0e02cbe07ee..004710dd5a4 100644 --- a/tests/modules/nf-core/unzip/test.yml +++ b/tests/modules/nf-core/unzip/test.yml @@ -1,4 +1,4 @@ -- name: unzip +- name: unzip test_unzip command: nextflow run ./tests/modules/nf-core/unzip -entry test_unzip -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/unzip/nextflow.config tags: - unzip @@ -8,3 +8,4 @@ md5sum: de30dbba85f9070612b632e2a5a95952 - path: output/unzip/ncbi_taxmap/ncbi.tre md5sum: 4029dd2091c685b9a86ddd9d0d870db0 + - path: output/unzip/versions.yml diff --git a/tests/modules/nf-core/unzipfiles/main.nf b/tests/modules/nf-core/unzipfiles/main.nf new file mode 100644 index 00000000000..fce389ad42b --- /dev/null +++ b/tests/modules/nf-core/unzipfiles/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNZIPFILES } from '../../../../modules/nf-core/unzipfiles/main.nf' + +workflow test_unzipfiles { + + archive = [ + [id: 'test'], + file(params.test_data['sarscov2']['genome']['ncbi_taxmap_zip'], checkIfExists: true) + ] + + UNZIPFILES ( archive ) +} + diff --git a/tests/modules/nf-core/unzipfiles/nextflow.config b/tests/modules/nf-core/unzipfiles/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/unzipfiles/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/unzipfiles/test.yml b/tests/modules/nf-core/unzipfiles/test.yml new file mode 100644 index 00000000000..f2ed31d8d18 --- /dev/null +++ b/tests/modules/nf-core/unzipfiles/test.yml @@ -0,0 +1,11 @@ +- name: unzipfiles test_unzipfiles + command: nextflow run ./tests/modules/nf-core/unzipfiles -entry test_unzipfiles -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/unzipfiles/nextflow.config + tags: + - unzipfiles + files: + - path: output/unzipfiles/test/ + - path: output/unzipfiles/test/ncbi.map + md5sum: de30dbba85f9070612b632e2a5a95952 + - path: output/unzipfiles/test/ncbi.tre + md5sum: 4029dd2091c685b9a86ddd9d0d870db0 + - path: output/unzipfiles/versions.yml From 281c744ed84352c24697f0916c7744853ce83927 Mon Sep 17 00:00:00 2001 From: Joon Klaps <61584065+Joon-Klaps@users.noreply.github.com> Date: Thu, 30 Mar 2023 09:17:33 +0200 Subject: [PATCH 011/120] update appropriate label for freyja boot (#3215) Previous label 'process_long' uses only one cpu, which is inefficient when multithreading is available --- modules/nf-core/freyja/boot/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/freyja/boot/main.nf b/modules/nf-core/freyja/boot/main.nf index c11d9953f2c..10e39d02fe6 100644 --- a/modules/nf-core/freyja/boot/main.nf +++ b/modules/nf-core/freyja/boot/main.nf @@ -1,6 +1,6 @@ process FREYJA_BOOT { tag "$meta.id" - label 'process_long' + label 'process_high' conda "bioconda::freyja=1.3.12" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? From ec3e52fe09f5a8638db75be0e2ac8c51188c23d3 Mon Sep 17 00:00:00 2001 From: Ferriol Calvet <38539786+FerriolCalvet@users.noreply.github.com> Date: Thu, 30 Mar 2023 09:23:41 +0200 Subject: [PATCH 012/120] Collectinsertsizemetrics (#3179) * insert size module * complete picard/collectinsertsizemetrics * Update modules/nf-core/picard/collectinsertsizemetrics/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Update modules/nf-core/picard/collectinsertsizemetrics/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * update tests output filenames --------- Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- logg | 0 .../picard/collectinsertsizemetrics/main.nf | 61 +++++++++++++++++++ .../picard/collectinsertsizemetrics/meta.yml | 49 +++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../picard/collectinsertsizemetrics/main.nf | 15 +++++ .../collectinsertsizemetrics/nextflow.config | 5 ++ .../picard/collectinsertsizemetrics/test.yml | 9 +++ 7 files changed, 143 insertions(+) create mode 100644 logg create mode 100644 modules/nf-core/picard/collectinsertsizemetrics/main.nf create mode 100644 modules/nf-core/picard/collectinsertsizemetrics/meta.yml create mode 100644 tests/modules/nf-core/picard/collectinsertsizemetrics/main.nf create mode 100644 tests/modules/nf-core/picard/collectinsertsizemetrics/nextflow.config create mode 100644 tests/modules/nf-core/picard/collectinsertsizemetrics/test.yml diff --git a/logg b/logg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/modules/nf-core/picard/collectinsertsizemetrics/main.nf b/modules/nf-core/picard/collectinsertsizemetrics/main.nf new file mode 100644 index 00000000000..583e39e257e --- /dev/null +++ b/modules/nf-core/picard/collectinsertsizemetrics/main.nf @@ -0,0 +1,61 @@ +process PICARD_COLLECTINSERTSIZEMETRICS { + tag "$meta.id" + label 'process_single' + + conda "bioconda::picard=3.0.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/picard:3.0.0--hdfd78af_1' : + 'quay.io/biocontainers/picard:3.0.0--hdfd78af_1' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.txt"), emit: metrics + tuple val(meta), path("*.pdf"), emit: histogram + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def avail_mem = 3072 + if (!task.memory) { + log.info '[Picard CollectInsertSizeMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = (task.memory.mega*0.8).intValue() + } + """ + picard \\ + -Xmx${avail_mem}M \\ + CollectInsertSizeMetrics \\ + $args \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.txt \\ + --Histogram_FILE ${prefix}.pdf \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(picard CollectInsertSizeMetrics --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ + + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.pdf + touch ${prefix}.txt + cat <<-END_VERSIONS > versions.yml + "${task.process}": + picard: \$(picard CollectInsertSizeMetrics --version 2>&1 | grep -o 'Version:.*' | cut -f2- -d:) + END_VERSIONS + """ + + + +} diff --git a/modules/nf-core/picard/collectinsertsizemetrics/meta.yml b/modules/nf-core/picard/collectinsertsizemetrics/meta.yml new file mode 100644 index 00000000000..21b0d1b1299 --- /dev/null +++ b/modules/nf-core/picard/collectinsertsizemetrics/meta.yml @@ -0,0 +1,49 @@ +name: "picard_collectinsertsizemetrics" +description: Collect metrics about the insert size distribution of a paired-end library. +keywords: + - metrics + - alignment + - insert + - statistics + - bam + +tools: + - "picard": + description: "Java tools for working with NGS data in the BAM format" + homepage: "None" + documentation: "None" + tool_dev_url: "https://github.com/broadinstitute/picard" + doi: "" + licence: "['MIT']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - pdf: + type: file + description: Histogram plots of the insert size metrics computed by Picard + pattern: "*.pdf" + - metrics: + type: file + description: Values used by Picard to generate the insert size histograms + pattern: "*.txt" +authors: + - "@FerriolCalvet" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index f433992c3f6..e5ae86deb50 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2443,6 +2443,10 @@ picard/collecthsmetrics: - modules/nf-core/picard/collecthsmetrics/** - tests/modules/nf-core/picard/collecthsmetrics/** +picard/collectinsertsizemetrics: + - modules/nf-core/picard/collectinsertsizemetrics/** + - tests/modules/nf-core/picard/collectinsertsizemetrics/** + picard/collectmultiplemetrics: - modules/nf-core/picard/collectmultiplemetrics/** - tests/modules/nf-core/picard/collectmultiplemetrics/** diff --git a/tests/modules/nf-core/picard/collectinsertsizemetrics/main.nf b/tests/modules/nf-core/picard/collectinsertsizemetrics/main.nf new file mode 100644 index 00000000000..caa24fb6923 --- /dev/null +++ b/tests/modules/nf-core/picard/collectinsertsizemetrics/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_COLLECTINSERTSIZEMETRICS } from '../../../../../modules/nf-core/picard/collectinsertsizemetrics/main.nf' + +workflow test_picard_collectinsertsizemetrics { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + PICARD_COLLECTINSERTSIZEMETRICS ( input ) +} diff --git a/tests/modules/nf-core/picard/collectinsertsizemetrics/nextflow.config b/tests/modules/nf-core/picard/collectinsertsizemetrics/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/picard/collectinsertsizemetrics/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/picard/collectinsertsizemetrics/test.yml b/tests/modules/nf-core/picard/collectinsertsizemetrics/test.yml new file mode 100644 index 00000000000..8d1b2be710b --- /dev/null +++ b/tests/modules/nf-core/picard/collectinsertsizemetrics/test.yml @@ -0,0 +1,9 @@ +- name: picard collectinsertsizemetrics test_picard_collectinsertsizemetrics + command: nextflow run ./tests/modules/nf-core/picard/collectinsertsizemetrics -entry test_picard_collectinsertsizemetrics -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/picard/collectinsertsizemetrics/nextflow.config + tags: + - picard/collectinsertsizemetrics + - picard + files: + - path: output/picard/test.pdf + - path: output/picard/test.txt + - path: output/picard/versions.yml From 51ec1b3bd3ad129926cf72653ee05421aa4621da Mon Sep 17 00:00:00 2001 From: Adam Taylor Date: Thu, 30 Mar 2023 08:23:44 +0100 Subject: [PATCH 013/120] Add core detection test data to config (#3199) --- tests/config/test_data.config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index f821fa531fc..c701b985ffe 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -600,6 +600,9 @@ params { markers = "${params.test_data_base}/data/imaging/background_subtraction/markers.csv" image = "${params.test_data_base}/data/imaging/background_subtraction/cycif_tonsil_registered.ome.tif" } + 'core_detection' { + image = "${params.test_data_base}/data/imaging/core_detection/single_core_dapi.tif" + } } } } From 22fdf8b12311732f3992335131575497d4556003 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Thu, 30 Mar 2023 09:48:45 +0200 Subject: [PATCH 014/120] new module wisecondorx/newref (#3212) * new module wisecondorx/newref * Update modules/nf-core/wisecondorx/newref/main.nf Co-authored-by: James A. Fellows Yates * Update modules/nf-core/wisecondorx/newref/main.nf Co-authored-by: James A. Fellows Yates * remove whitespaces --------- Co-authored-by: James A. Fellows Yates --- modules/nf-core/wisecondorx/newref/main.nf | 56 +++++++++++++++++++ modules/nf-core/wisecondorx/newref/meta.yml | 43 ++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../nf-core/wisecondorx/newref/main.nf | 36 ++++++++++++ .../wisecondorx/newref/nextflow.config | 9 +++ .../nf-core/wisecondorx/newref/test.yml | 8 +++ 6 files changed, 156 insertions(+) create mode 100644 modules/nf-core/wisecondorx/newref/main.nf create mode 100644 modules/nf-core/wisecondorx/newref/meta.yml create mode 100644 tests/modules/nf-core/wisecondorx/newref/main.nf create mode 100644 tests/modules/nf-core/wisecondorx/newref/nextflow.config create mode 100644 tests/modules/nf-core/wisecondorx/newref/test.yml diff --git a/modules/nf-core/wisecondorx/newref/main.nf b/modules/nf-core/wisecondorx/newref/main.nf new file mode 100644 index 00000000000..f04536f8073 --- /dev/null +++ b/modules/nf-core/wisecondorx/newref/main.nf @@ -0,0 +1,56 @@ +process WISECONDORX_NEWREF { + tag "$meta.id" + label 'process_medium' + + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + conda "bioconda::wisecondorx=1.2.5" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/wisecondorx:1.2.5--pyh5e36f6f_0': + 'quay.io/biocontainers/wisecondorx:1.2.5--pyh5e36f6f_0' }" + + input: + tuple val(meta), path(inputs) + + output: + tuple val(meta), path("*.npz"), emit: npz + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '1.2.5' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + + inputs.each { if("${it}" == "${prefix}.npz") error "${it} has the same name as the output file, set prefix in module configuration to disambiguate!"} + + """ + WisecondorX \\ + newref \\ + *.npz \\ + ${prefix}.npz \\ + --cpus ${task.cpus} \\ + ${args} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wisecondorx: ${VERSION} + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '1.2.5' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + + inputs.each { if("${it}" == "${prefix}.npz") error "${it} has the same name as the output file, set prefix in module configuration to disambiguate!"} + + """ + touch ${prefix}.npz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wisecondorx: ${VERSION} + END_VERSIONS + """ +} diff --git a/modules/nf-core/wisecondorx/newref/meta.yml b/modules/nf-core/wisecondorx/newref/meta.yml new file mode 100644 index 00000000000..9e862a8914e --- /dev/null +++ b/modules/nf-core/wisecondorx/newref/meta.yml @@ -0,0 +1,43 @@ +name: "wisecondorx_newref" +description: Create a new reference using healthy reference samples +keywords: + - reference + - copy number alterations + - npz +tools: + - "wisecondorx": + description: "WIthin-SamplE COpy Number aberration DetectOR, including sex chromosomes" + homepage: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" + documentation: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" + tool_dev_url: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" + doi: "10.1093/nar/gky1263" + licence: "['Attribution-NonCommercial-ShareAlike CC BY-NC-SA']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - inputs: + type: file + description: Multiple NPZ files from healthy patients + pattern: "*.{npz}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - npz: + type: file + description: The reference NPZ file + pattern: "*.{npz}" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index e5ae86deb50..fca88a6ecf8 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3625,6 +3625,10 @@ wisecondorx/convert: - modules/nf-core/wisecondorx/convert/** - tests/modules/nf-core/wisecondorx/convert/** +wisecondorx/newref: + - modules/nf-core/wisecondorx/newref/** + - tests/modules/nf-core/wisecondorx/newref/** + yahs: - modules/nf-core/yahs/** - tests/modules/nf-core/yahs/** diff --git a/tests/modules/nf-core/wisecondorx/newref/main.nf b/tests/modules/nf-core/wisecondorx/newref/main.nf new file mode 100644 index 00000000000..d2a05fb20dd --- /dev/null +++ b/tests/modules/nf-core/wisecondorx/newref/main.nf @@ -0,0 +1,36 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { WISECONDORX_NEWREF } from '../../../../../modules/nf-core/wisecondorx/newref/main.nf' +include { WISECONDORX_CONVERT } from '../../../../../modules/nf-core/wisecondorx/convert/main.nf' + +workflow test_wisecondorx_newref { + + input = Channel.of([ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) + ], + [ + [ id: 'test2' ], + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) + ]) + + WISECONDORX_CONVERT( + input, + [[],[]], + [[],[]] + ) + + WISECONDORX_CONVERT.out.npz + .map { meta, npz -> + new_meta = meta + [id:"combined"] + [new_meta, npz] + } + .groupTuple() + .set { newref_input } + + WISECONDORX_NEWREF ( newref_input ) +} diff --git a/tests/modules/nf-core/wisecondorx/newref/nextflow.config b/tests/modules/nf-core/wisecondorx/newref/nextflow.config new file mode 100644 index 00000000000..da1e4521ee6 --- /dev/null +++ b/tests/modules/nf-core/wisecondorx/newref/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: WISECONDORX_CONVERT { + publishDir = [enabled:false] + } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/wisecondorx/newref/test.yml b/tests/modules/nf-core/wisecondorx/newref/test.yml new file mode 100644 index 00000000000..1b801d03b4c --- /dev/null +++ b/tests/modules/nf-core/wisecondorx/newref/test.yml @@ -0,0 +1,8 @@ +- name: "wisecondorx newref" + command: nextflow run ./tests/modules/nf-core/wisecondorx/newref -entry test_wisecondorx_newref -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/wisecondorx/newref/nextflow.config -stub + tags: + - "wisecondorx" + - "wisecondorx/newref" + files: + - path: "output/wisecondorx/combined.npz" + - path: "output/wisecondorx/versions.yml" From 85805aa190bdc51c590e4eff3387c97fa78e13fe Mon Sep 17 00:00:00 2001 From: MargotCh <55975768+MargotCh@users.noreply.github.com> Date: Thu, 30 Mar 2023 10:13:29 +0200 Subject: [PATCH 015/120] Coreograph Module (#3201) * Coreograph Module * exclude conda test * modify version definition * Update modules/nf-core/coreograph/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * proposed changes * [automated] Fix linting with Prettier * removing manually added test data and refering to test_data file for testing --------- Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Co-authored-by: nf-core-bot --- .github/workflows/pytest-workflow.yml | 2 + modules/nf-core/coreograph/Dockerfile | 12 ++++ modules/nf-core/coreograph/main.nf | 48 ++++++++++++++ modules/nf-core/coreograph/meta.yml | 62 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/coreograph/main.nf | 15 +++++ .../nf-core/coreograph/nextflow.config | 5 ++ tests/modules/nf-core/coreograph/test.yml | 11 ++++ 8 files changed, 159 insertions(+) create mode 100644 modules/nf-core/coreograph/Dockerfile create mode 100644 modules/nf-core/coreograph/main.nf create mode 100644 modules/nf-core/coreograph/meta.yml create mode 100644 tests/modules/nf-core/coreograph/main.nf create mode 100644 tests/modules/nf-core/coreograph/nextflow.config create mode 100644 tests/modules/nf-core/coreograph/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 7f225b3991d..1d43c6212e9 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -98,6 +98,8 @@ jobs: tags: universc - profile: "conda" tags: subworkflows/vcf_annotate_ensemblvep + - profile: "conda" + tags: coreograph env: NXF_ANSI_LOG: false SENTIEON_LICENSE_BASE64: ${{ secrets.SENTIEON_LICENSE_BASE64 }} diff --git a/modules/nf-core/coreograph/Dockerfile b/modules/nf-core/coreograph/Dockerfile new file mode 100644 index 00000000000..b57a58c29cd --- /dev/null +++ b/modules/nf-core/coreograph/Dockerfile @@ -0,0 +1,12 @@ +FROM tensorflow/tensorflow:1.15.0-py3 + +RUN apt-get update +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata +RUN apt-get install -y python3-opencv +RUN apt-get install -y libtiff5-dev git + +RUN pip install cython scikit-image==0.14.2 matplotlib tifffile==2020.2.16 scipy==1.1.0 opencv-python==4.3.0.36 + +RUN pip install git+https://github.com/FZJ-INM1-BDA/pytiff.git@0701f28e5862c26024e8daa34201005b16db4c8f + +COPY . /app diff --git a/modules/nf-core/coreograph/main.nf b/modules/nf-core/coreograph/main.nf new file mode 100644 index 00000000000..cd1646dba3a --- /dev/null +++ b/modules/nf-core/coreograph/main.nf @@ -0,0 +1,48 @@ +process COREOGRAPH { + tag "$meta.id" + label 'process_single' + + container "labsyspharm/unetcoreograph:2.2.9" + + input: + tuple val(meta), path(image) + + output: + tuple val(meta), path("*[0-9]*.tif"), emit: cores + tuple val(meta), path("./masks/"), emit: masks + tuple val(meta), path("TMA_MAP.tif"), emit: tma_map + tuple val(meta), path("centroidsY-X.txt"), emit: centroids + + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '2.2.9' + + """ + python /app/UNetCoreograph.py \\ + --imagePath ${image}\\ + --outputPath .\\ + $args + + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + coreograph: $VERSION + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch TMA_MAP.tif + cat <<-END_VERSIONS > versions.yml + "${task.process}": + coreograph: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/coreograph/meta.yml b/modules/nf-core/coreograph/meta.yml new file mode 100644 index 00000000000..ee44c9459f4 --- /dev/null +++ b/modules/nf-core/coreograph/meta.yml @@ -0,0 +1,62 @@ +name: "coreograph" +description: Great....yet another TMA dearray program. What does this one do? Coreograph uses UNet, a deep learning model, to identify complete/incomplete tissue cores on a tissue microarray. It has been trained on 9 TMA slides of different sizes and tissue types. +keywords: + - UNet + - TMA dearray + - Segmentation + - Cores +tools: + - "coreograph": + description: "A TMA dearray porgram that uses UNet, a deep learning model, to identify complete/incomplete tissue cores on a tissue microarray." + homepage: "https://mcmicro.org/parameters/core.html#coreograph" + documentation: "https://mcmicro.org/troubleshooting/tuning/coreograph.html" + tool_dev_url: "https://github.com/HMS-IDAC/UNetCoreograph" + doi: "https://doi.org/10.1038/s41592-021-01308-y" + licence: "MIT License" + +input: + - image: + type: file + description: ome.tif/tif file + pattern: "*.{ome.tif,tif}" + + - meta: + type: map + description: | + Groovy Map containing sample information + +output: + # + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - cores: + type: file + description: Complete/Incomplete tissue cores + pattern: "*.{tif}" + + - masks: + type: files + description: Binary masks for the Complete/Incomplete tissue cores + pattern: "./masks/*.{tif}" + + - tma_map: + type: file + description: A TMA map showing labels and outlines + pattern: "TMA_MAP.tif" + + - centroids: + type: file + description: A text file listing centroids of each core in format Y, X + pattern: "centroidsY-X.txt" + + - meta: + type: map + description: | + Groovy Map containing sample information + +authors: + - "@arozhada" + - "@MargotCh" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index fca88a6ecf8..2372517860f 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -770,6 +770,10 @@ cooler/zoomify: - modules/nf-core/cooler/zoomify/** - tests/modules/nf-core/cooler/zoomify/** +coreograph: + - modules/nf-core/coreograph/** + - tests/modules/nf-core/coreograph/** + crumble: - modules/nf-core/crumble/** - tests/modules/nf-core/crumble/** diff --git a/tests/modules/nf-core/coreograph/main.nf b/tests/modules/nf-core/coreograph/main.nf new file mode 100644 index 00000000000..5a9c3730e57 --- /dev/null +++ b/tests/modules/nf-core/coreograph/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { COREOGRAPH } from '../../../../modules/nf-core/coreograph/main.nf' + +workflow test_coreograph { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['imaging']['core_detection']['image'], checkIfExists: true) + ] + + COREOGRAPH ( input ) +} diff --git a/tests/modules/nf-core/coreograph/nextflow.config b/tests/modules/nf-core/coreograph/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/coreograph/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/coreograph/test.yml b/tests/modules/nf-core/coreograph/test.yml new file mode 100644 index 00000000000..a12614198f1 --- /dev/null +++ b/tests/modules/nf-core/coreograph/test.yml @@ -0,0 +1,11 @@ +- name: coreograph test_coreograph + command: nextflow run ./tests/modules/nf-core/coreograph -entry test_coreograph -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/coreograph/nextflow.config + tags: + - coreograph + files: + - path: output/coreograph/1.tif + - path: output/coreograph/TMA_MAP.tif + - path: output/coreograph/centroidsY-X.txt + md5sum: 089b0e59e6435769f69a9b010cba926e + - path: output/coreograph/masks/1_mask.tif + - path: output/coreograph/versions.yml From aa90540e7ab96c723bee2688e0a4567d472335ef Mon Sep 17 00:00:00 2001 From: Florian Wuennemann Date: Thu, 30 Mar 2023 10:20:40 +0200 Subject: [PATCH 016/120] New module Mindagap (#2860) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Git rebase before PR. * Removed comments from main.nf * Git rebase before PR. * Linting and testing working. * Changed test data to newly added test-dataset for spatialomics. * [automated] Fix linting with Prettier * Update modules/nf-core/mindagap/main.nf Co-authored-by: FriederikeHanssen * Update tests/config/pytest_modules.yml Co-authored-by: Júlia Mir Pedrol * Updated container to biocontainer and added bioconda. * Moved to subtool mindagap/mindagap. * Filled missing meta.yml fields. * Added explanations for args to meta.yml * Update modules/nf-core/mindagap/mindagap/meta.yml Co-authored-by: Júlia Mir Pedrol * Update modules/nf-core/mindagap/mindagap/main.nf Co-authored-by: Júlia Mir Pedrol * Update modules/nf-core/mindagap/mindagap/main.nf Co-authored-by: Júlia Mir Pedrol * Resolved last comment from @mirdepol fixing meta info. * Updated MINDAGAP process names. * Fixed linting and added stub test. * Update tests/config/test_data.config * Added mandatory value parameters as input channels. * Fixed bossize input param. * Updated test data. * Fixed error in test data and md5sums. --------- Co-authored-by: nf-core-bot Co-authored-by: FriederikeHanssen Co-authored-by: Júlia Mir Pedrol Co-authored-by: Jonathan Manning Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- modules/nf-core/mindagap/mindagap/main.nf | 49 +++++++++++++++++ modules/nf-core/mindagap/mindagap/meta.yml | 52 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../modules/nf-core/mindagap/mindagap/main.nf | 18 +++++++ .../nf-core/mindagap/mindagap/nextflow.config | 8 +++ .../nf-core/mindagap/mindagap/test.yml | 9 ++++ 6 files changed, 140 insertions(+) create mode 100644 modules/nf-core/mindagap/mindagap/main.nf create mode 100644 modules/nf-core/mindagap/mindagap/meta.yml create mode 100644 tests/modules/nf-core/mindagap/mindagap/main.nf create mode 100644 tests/modules/nf-core/mindagap/mindagap/nextflow.config create mode 100644 tests/modules/nf-core/mindagap/mindagap/test.yml diff --git a/modules/nf-core/mindagap/mindagap/main.nf b/modules/nf-core/mindagap/mindagap/main.nf new file mode 100644 index 00000000000..86a78e29fdb --- /dev/null +++ b/modules/nf-core/mindagap/mindagap/main.nf @@ -0,0 +1,49 @@ +process MINDAGAP_MINDAGAP { + tag "$meta.id" + label 'process_low' + + conda "bioconda::mindagap=0.0.2" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mindagap:0.0.2--pyhdfd78af_0' : + 'quay.io/biocontainers/mindagap:0.0.2--pyhdfd78af_0' }" + + input: + tuple val(meta), path(tiff) + val(boxsize) + val(loopnum) + + output: + tuple val(meta), path("*gridfilled.tiff"), emit: tiff + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mindagap.py \\ + $args \\ + $tiff \\ + $boxsize \\ + $loopnum + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mindagap: \$(mindagap.py test -v) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.gridfilled.tiff + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mindagap: \$(mindagap.py test -v) + END_VERSIONS + """ +} diff --git a/modules/nf-core/mindagap/mindagap/meta.yml b/modules/nf-core/mindagap/mindagap/meta.yml new file mode 100644 index 00000000000..b6925fd165d --- /dev/null +++ b/modules/nf-core/mindagap/mindagap/meta.yml @@ -0,0 +1,52 @@ +name: "mindagap_mindagap" +description: Takes a single panorama image and fills the empty grid lines with neighbour-weighted values. +keywords: + - imaging + - resolve_bioscience + - spatial_transcriptomics +tools: + - "mindagap": + description: "Mindagap is a collection of tools to process multiplexed FISH data, such as produced by Resolve Biosciences Molecular Cartography." + homepage: "https://github.com/ViriatoII/MindaGap" + documentation: "https://github.com/ViriatoII/MindaGap/blob/main/README.md" + tool_dev_url: "https://github.com/ViriatoII/MindaGap" + doi: "" + licence: "BSD-3-Clause license" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - tiff: + type: file + description: A tiff file containing gridlines as produced by Molecular Cartography imaging. + pattern: "*.{tiff}" + - boxsize: + type: integer + description: A larger number allows to overcome large gaps, but makes looses fine details in new filled grid. + - loopnum: + type: integer + description: The number of times gaussian blur is run consecutively on the gridlines. A smaller number is faster, but the result is less good. + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - tiff: + type: file + description: A tiff file with gridlines filled based on consecutive gaussian blurring. + pattern: "*.{tiff}" + +authors: + - "@ViriatoII" + - "@flowuenne" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 2372517860f..40ee0fbbb97 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2146,6 +2146,10 @@ methyldackel/mbias: - modules/nf-core/methyldackel/mbias/** - tests/modules/nf-core/methyldackel/mbias/** +mindagap/mindagap: + - modules/nf-core/mindagap/mindagap/** + - tests/modules/nf-core/mindagap/mindagap/** + midas/run: - modules/nf-core/midas/run/** - tests/modules/nf-core/midas/run/** diff --git a/tests/modules/nf-core/mindagap/mindagap/main.nf b/tests/modules/nf-core/mindagap/mindagap/main.nf new file mode 100644 index 00000000000..f1b4cbcee5e --- /dev/null +++ b/tests/modules/nf-core/mindagap/mindagap/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MINDAGAP_MINDAGAP } from '../../../../../modules/nf-core/mindagap/mindagap/main.nf' + +workflow test_mindagap { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['imaging']['tiff']['mouse_heart_wga'], checkIfExists: true) + ] + + boxsize = 3 + loopnum = 40 + + MINDAGAP_MINDAGAP ( input, boxsize, loopnum ) +} diff --git a/tests/modules/nf-core/mindagap/mindagap/nextflow.config b/tests/modules/nf-core/mindagap/mindagap/nextflow.config new file mode 100644 index 00000000000..bb6b739e6ef --- /dev/null +++ b/tests/modules/nf-core/mindagap/mindagap/nextflow.config @@ -0,0 +1,8 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: "test_mindagap:MINDAGAP_MINDAGAP" { + ext.args = "--Xtilesize 2144" + } +} diff --git a/tests/modules/nf-core/mindagap/mindagap/test.yml b/tests/modules/nf-core/mindagap/mindagap/test.yml new file mode 100644 index 00000000000..e8834f8e5e1 --- /dev/null +++ b/tests/modules/nf-core/mindagap/mindagap/test.yml @@ -0,0 +1,9 @@ +- name: mindagap mindagap test_mindagap + command: nextflow run ./tests/modules/nf-core/mindagap/mindagap -entry test_mindagap -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/mindagap/mindagap/nextflow.config + tags: + - mindagap/mindagap + - mindagap + files: + - path: output/mindagap/mindagap.mouse_heart.wga_gridfilled.tiff + md5sum: 310cf0017baa54af32176b43a5b0adfd + - path: output/mindagap/versions.yml From 3cfd245a0b7f5e43eb0ef5480b30b36999b8cdcf Mon Sep 17 00:00:00 2001 From: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Date: Thu, 30 Mar 2023 10:42:53 +0100 Subject: [PATCH 017/120] Ngscheckmate (#3094) * Fix version string spurious text in singularity tests * Add NGSCheckMate subworkflow * Remember to save files * Fix bracket * Update meta * Update meta/channel name * Update NCM * Update ncm test * Add the config file * Remove tests on bcftools files as failing conda * Update subworkflows/nf-core/bam_ngscheckmate/main.nf Co-authored-by: Maxime U Garcia * Update subworkflows/nf-core/bam_ngscheckmate/main.nf Co-authored-by: Maxime U Garcia * Update subworkflows/nf-core/bam_ngscheckmate/main.nf --------- Co-authored-by: SPearce Co-authored-by: Maxime U Garcia Co-authored-by: Maxime U Garcia --- modules/nf-core/ngscheckmate/ncm/main.nf | 2 +- modules/nf-core/ngscheckmate/ncm/meta.yml | 4 +- subworkflows/nf-core/bam_ngscheckmate/main.nf | 39 +++++++++++++ .../nf-core/bam_ngscheckmate/meta.yml | 55 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../modules/nf-core/ngscheckmate/ncm/main.nf | 32 ++++++----- .../nf-core/ngscheckmate/ncm/nextflow.config | 5 +- .../modules/nf-core/ngscheckmate/ncm/test.yml | 23 ++++++-- .../nf-core/bam_ngscheckmate/main.nf | 33 +++++++++++ .../nf-core/bam_ngscheckmate/nextflow.config | 19 +++++++ .../nf-core/bam_ngscheckmate/test.yml | 25 +++++++++ 11 files changed, 217 insertions(+), 24 deletions(-) create mode 100644 subworkflows/nf-core/bam_ngscheckmate/main.nf create mode 100644 subworkflows/nf-core/bam_ngscheckmate/meta.yml create mode 100644 tests/subworkflows/nf-core/bam_ngscheckmate/main.nf create mode 100644 tests/subworkflows/nf-core/bam_ngscheckmate/nextflow.config create mode 100644 tests/subworkflows/nf-core/bam_ngscheckmate/test.yml diff --git a/modules/nf-core/ngscheckmate/ncm/main.nf b/modules/nf-core/ngscheckmate/ncm/main.nf index c2351f8a7fa..1593f31ee37 100644 --- a/modules/nf-core/ngscheckmate/ncm/main.nf +++ b/modules/nf-core/ngscheckmate/ncm/main.nf @@ -16,7 +16,7 @@ process NGSCHECKMATE_NCM { path "*_corr_matrix.txt", emit: corr_matrix path "*_matched.txt" , emit: matched path "*_all.txt" , emit: all - path "*.vcf" , emit: vcfs, optional: true + path "*.vcf" , emit: vcf, optional: true path "versions.yml" , emit: versions when: diff --git a/modules/nf-core/ngscheckmate/ncm/meta.yml b/modules/nf-core/ngscheckmate/ncm/meta.yml index 8d8fd62053d..5f53e34d0a2 100644 --- a/modules/nf-core/ngscheckmate/ncm/meta.yml +++ b/modules/nf-core/ngscheckmate/ncm/meta.yml @@ -55,9 +55,9 @@ output: description: A txt file containing all the sample comparisons, whether they match or not pattern: "*all.txt" - - vcfs: + - vcf: type: file - description: If ran in bam mode, vcf files for each sample giving the SNP calls + description: If ran in bam mode, vcf files for each sample giving the SNP calls used pattern: "*.vcf" authors: diff --git a/subworkflows/nf-core/bam_ngscheckmate/main.nf b/subworkflows/nf-core/bam_ngscheckmate/main.nf new file mode 100644 index 00000000000..6231981444f --- /dev/null +++ b/subworkflows/nf-core/bam_ngscheckmate/main.nf @@ -0,0 +1,39 @@ +include { BCFTOOLS_MPILEUP } from '../../../modules/nf-core/bcftools/mpileup/main' +include { NGSCHECKMATE_NCM } from '../../../modules/nf-core/ngscheckmate/ncm/main.nf' + +workflow BAM_NGSCHECKMATE { + + take: + ch_bam // channel: [ val(meta), bam ] + ch_bed // channel: [ bed ] + ch_fasta // channel: [ fasta ] + + main: + + ch_versions = Channel.empty() + + ch_bam_bed = ch_bam.combine(ch_bed) + + BCFTOOLS_MPILEUP (ch_bam_bed, ch_fasta.collect(), false) + ch_versions = ch_versions.mix(BCFTOOLS_MPILEUP.out.versions) + + BCFTOOLS_MPILEUP + .out + .vcf + .map{meta, vcf -> vcf} + .collect() + .set {ch_flat_vcfs} + + NGSCHECKMATE_NCM (ch_flat_vcfs, ch_bed, ch_fasta) + ch_versions = ch_versions.mix(NGSCHECKMATE_NCM.out.versions) + + emit: + pdf = NGSCHECKMATE_NCM.out.pdf // channel: [ pdf ] + corr_matrix = NGSCHECKMATE_NCM.out.corr_matrix // channel: [ corr_matrix ] + matched = NGSCHECKMATE_NCM.out.matched // channel: [ matched ] + all = NGSCHECKMATE_NCM.out.all // channel: [ all ] + vcf = BCFTOOLS_MPILEUP.out.vcf // channel: [ meta, vcf ] + versions = ch_versions // channel: [ versions.yml ] + +} + diff --git a/subworkflows/nf-core/bam_ngscheckmate/meta.yml b/subworkflows/nf-core/bam_ngscheckmate/meta.yml new file mode 100644 index 00000000000..9faaace9aab --- /dev/null +++ b/subworkflows/nf-core/bam_ngscheckmate/meta.yml @@ -0,0 +1,55 @@ +name: "bam_ngscheckmate" +description: Take a set of bam files and run NGSCheckMate to determine whether samples match with each other, using a set of SNPs. +keywords: + - ngscheckmate + - qc +modules: + - bcftools/mpileup + - ngscheckmate/ncm +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - bam: + type: file + description: BAM files for each sample + pattern: "*.{bam}" + - snp_bed: + type: file + description: BED file containing the SNPs to analyse. NGSCheckMate provides some default ones for hg19/hg38. + pattern: "*.{bed}" + + - fasta: + type: file + description: fasta file for the genome + pattern: "*.{fasta}" + +output: + - pdf: + type: file + description: A pdf containing a dendrogram showing how the samples match up + pattern: "*.{pdf}" + - corr_matrix: + type: file + description: A text file containing the correlation matrix between each sample + pattern: "*corr_matrix.txt" + - matched: + type: file + description: A txt file containing only the samples that match with each other + pattern: "*matched.txt" + - all: + type: file + description: A txt file containing all the sample comparisons, whether they match or not + pattern: "*all.txt" + - vcf: + type: file + description: vcf files for each sample giving the SNP calls + pattern: "*.vcf" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@SPPearce" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 40ee0fbbb97..022ac583401 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3216,6 +3216,10 @@ subworkflows/bam_markduplicates_picard: - subworkflows/nf-core/bam_markduplicates_picard/** - tests/subworkflows/nf-core/bam_markduplicates_picard/** +subworkflows/bam_ngscheckmate: + - subworkflows/nf-core/bam_ngscheckmate/** + - tests/subworkflows/nf-core/bam_ngscheckmate/** + subworkflows/bam_qc_picard: - subworkflows/nf-core/bam_qc_picard/** - tests/subworkflows/nf-core/bam_qc_picard/** diff --git a/tests/modules/nf-core/ngscheckmate/ncm/main.nf b/tests/modules/nf-core/ngscheckmate/ncm/main.nf index 00025215095..a7ca5b7a367 100644 --- a/tests/modules/nf-core/ngscheckmate/ncm/main.nf +++ b/tests/modules/nf-core/ngscheckmate/ncm/main.nf @@ -8,7 +8,7 @@ include { NGSCHECKMATE_NCM as NGSCHECKMATE_NCM_VCF} from '../../../../../modules include { BEDTOOLS_MAKEWINDOWS } from '../../../../../modules/nf-core/bedtools/makewindows/main.nf' include { BCFTOOLS_MPILEUP } from '../../../../../modules/nf-core/bcftools/mpileup/main.nf' -include { BCFTOOLS_MPILEUP as BCFTOOLS_MPILEUP2 } from '../../../../../modules/nf-core/bcftools/mpileup/main.nf' +include { BCFTOOLS_MPILEUP as BCFTOOLS_MPILEUP_TWO } from '../../../../../modules/nf-core/bcftools/mpileup/main.nf' workflow test_ngscheckmate_ncm_bam { input = [ file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'], checkIfExists: true), @@ -21,8 +21,8 @@ workflow test_ngscheckmate_ncm_bam { inputBed = [ [ id:'test'], file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)] - BEDTOOLS_MAKEWINDOWS(inputBed, true). - tab. + BEDTOOLS_MAKEWINDOWS(inputBed). + bed. map{it[1]}. view(). set{snp_channel} @@ -31,28 +31,30 @@ workflow test_ngscheckmate_ncm_bam { } workflow test_ngscheckmate_ncm_vcf { - input1 = [ [ id:'test1' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - ] - - input2 = [ [ id:'test2' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - ] - fasta = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] inputBed = [ [ id:'test'], - file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)] + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)] + + input1 = [ [ id:'test1' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + ] + + input2 = [ [ id:'test2' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + ] BCFTOOLS_MPILEUP ( input1, fasta, false ) - BCFTOOLS_MPILEUP2 ( input2, fasta, false ) + BCFTOOLS_MPILEUP_TWO ( input2, fasta, false ) - BCFTOOLS_MPILEUP2.out.vcf. + BCFTOOLS_MPILEUP_TWO.out.vcf. combine( BCFTOOLS_MPILEUP.out.vcf ). map { [ it[1], it[3] ] }. set { vcf_channel } - BEDTOOLS_MAKEWINDOWS( inputBed, true ).tab. + BEDTOOLS_MAKEWINDOWS( inputBed).bed. map { it[1] }. view(). set { snp_channel } diff --git a/tests/modules/nf-core/ngscheckmate/ncm/nextflow.config b/tests/modules/nf-core/ngscheckmate/ncm/nextflow.config index 81698ecd9e8..e0930e01e59 100644 --- a/tests/modules/nf-core/ngscheckmate/ncm/nextflow.config +++ b/tests/modules/nf-core/ngscheckmate/ncm/nextflow.config @@ -4,6 +4,7 @@ process { withName: BEDTOOLS_MAKEWINDOWS { ext.args = '-w 1' + ext.prefix = 'test_split' } withName: BCFTOOLS_MPILEUP { @@ -11,7 +12,7 @@ process { ext.args3 = '--no-version' } - withName: BCFTOOLS_MPILEUP2 { + withName: BCFTOOLS_MPILEUP_TWO { ext.args2 = '--no-version --ploidy 1 --multiallelic-caller' ext.args3 = '--no-version' } @@ -24,4 +25,4 @@ process { ext.args = '-B' } -} \ No newline at end of file +} diff --git a/tests/modules/nf-core/ngscheckmate/ncm/test.yml b/tests/modules/nf-core/ngscheckmate/ncm/test.yml index 0d690400285..932df8d78b1 100644 --- a/tests/modules/nf-core/ngscheckmate/ncm/test.yml +++ b/tests/modules/nf-core/ngscheckmate/ncm/test.yml @@ -1,24 +1,40 @@ - name: ngscheckmate ncm test_ngscheckmate_ncm_bam - command: nextflow run ./tests/modules/nf-core/ngscheckmate/ncm -entry test_ngscheckmate_ncm_bam -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/ngscheckmate/ncm -entry test_ngscheckmate_ncm_bam -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/ngscheckmate/ncm/nextflow.config tags: - ngscheckmate/ncm - ngscheckmate files: + - path: output/bedtools/test_split.bed + md5sum: 5058157987313b598f1c260e6965d6f7 + - path: output/bedtools/versions.yml + - path: output/ngscheckmate/output.pdf - path: output/ngscheckmate/output_all.txt md5sum: f71a712c3f6ecf64dd526365212f1b7c - path: output/ngscheckmate/output_corr_matrix.txt md5sum: 6777377aa9ae3d57f841b12896318db0 - path: output/ngscheckmate/output_matched.txt md5sum: f71a712c3f6ecf64dd526365212f1b7c + - path: output/ngscheckmate/test.paired_end.methylated.sorted.vcf + - path: output/ngscheckmate/test.paired_end.sorted.vcf - path: output/ngscheckmate/versions.yml - md5sum: fbb2bebd65b4f4e1e93c6bf5c08a6829 - name: ngscheckmate ncm test_ngscheckmate_ncm_vcf - command: nextflow run ./tests/modules/nf-core/ngscheckmate/ncm -entry test_ngscheckmate_ncm_vcf -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/ngscheckmate/ncm -entry test_ngscheckmate_ncm_vcf -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/ngscheckmate/ncm/nextflow.config tags: - ngscheckmate/ncm - ngscheckmate files: + - path: output/bcftools/test1.bcftools_stats.txt + - path: output/bcftools/test1.vcf.gz + - path: output/bcftools/test1.vcf.gz.tbi + - path: output/bcftools/test2.bcftools_stats.txt + - path: output/bcftools/test2.vcf.gz + - path: output/bcftools/test2.vcf.gz.tbi + - path: output/bcftools/versions.yml + - path: output/bedtools/test_split.bed + md5sum: 5058157987313b598f1c260e6965d6f7 + - path: output/bedtools/versions.yml + - path: output/ngscheckmate/output.pdf - path: output/ngscheckmate/output_all.txt md5sum: fd74956dcac279b6f58e82ea73e344f8 - path: output/ngscheckmate/output_corr_matrix.txt @@ -26,4 +42,3 @@ - path: output/ngscheckmate/output_matched.txt md5sum: fd74956dcac279b6f58e82ea73e344f8 - path: output/ngscheckmate/versions.yml - md5sum: f06910b83dde194a47870c553cefe193 diff --git a/tests/subworkflows/nf-core/bam_ngscheckmate/main.nf b/tests/subworkflows/nf-core/bam_ngscheckmate/main.nf new file mode 100644 index 00000000000..a7a0d93c0ee --- /dev/null +++ b/tests/subworkflows/nf-core/bam_ngscheckmate/main.nf @@ -0,0 +1,33 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BAM_NGSCHECKMATE } from '../../../../subworkflows/nf-core/bam_ngscheckmate/main.nf' +include { BEDTOOLS_MAKEWINDOWS } from '../../../../modules/nf-core/bedtools/makewindows/main.nf' + +workflow test_bam_ngscheckmate { + + inputBed = [ [ id:'test_bed'], + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)] + + BEDTOOLS_MAKEWINDOWS(Channel.of(inputBed)) + snp_bed = BEDTOOLS_MAKEWINDOWS.out.bed + + input = [[ + [ id:'test1' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ],[ + [ id:'test2' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'], checkIfExists: true) + ] + ] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + ch_input = Channel.fromList(input) + ch_snp_bed = BEDTOOLS_MAKEWINDOWS.out.bed.map{it[1]} + ch_fasta = Channel.of(fasta) + + BAM_NGSCHECKMATE( ch_input, ch_snp_bed , ch_fasta) + +} diff --git a/tests/subworkflows/nf-core/bam_ngscheckmate/nextflow.config b/tests/subworkflows/nf-core/bam_ngscheckmate/nextflow.config new file mode 100644 index 00000000000..87b03e4e8de --- /dev/null +++ b/tests/subworkflows/nf-core/bam_ngscheckmate/nextflow.config @@ -0,0 +1,19 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: BEDTOOLS_MAKEWINDOWS { + ext.args = '-w 1' + ext.prefix = 'test_split' + } + + withName: ".*BAM_NGSCHECKMATE:BCFTOOLS_MPILEUP" { + ext.args2 = '--no-version --ploidy 1 -c' + ext.args3 = '--no-version' + } + + withName: ".*BAM_NGSCHECKMATE:NGSCHECKMATE_NCM" { + ext.args = '-V' + } + +} diff --git a/tests/subworkflows/nf-core/bam_ngscheckmate/test.yml b/tests/subworkflows/nf-core/bam_ngscheckmate/test.yml new file mode 100644 index 00000000000..60fd690d9b1 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_ngscheckmate/test.yml @@ -0,0 +1,25 @@ +- name: bam_ngscheckmate test_bam_ngscheckmate + command: nextflow run ./tests/subworkflows/nf-core/bam_ngscheckmate -entry test_bam_ngscheckmate -c ./tests/config/nextflow.config + tags: + - bcftools + - bcftools/mpileup + - ngscheckmate + - ngscheckmate/ncm + - subworkflows + - subworkflows/bam_ngscheckmate + files: + - path: output/bcftools/test1.bcftools_stats.txt + - path: output/bcftools/test1.vcf.gz + - path: output/bcftools/test1.vcf.gz.tbi + - path: output/bcftools/test2.bcftools_stats.txt + - path: output/bcftools/test2.vcf.gz + - path: output/bcftools/test2.vcf.gz.tbi + - path: output/bedtools/test_split.bed + md5sum: 5058157987313b598f1c260e6965d6f7 + - path: output/ngscheckmate/output.pdf + - path: output/ngscheckmate/output_all.txt + md5sum: efdecd402fb7f1425d96624a73ba33b2 + - path: output/ngscheckmate/output_corr_matrix.txt + md5sum: 8b8acb28a3a2bc7c450a15eed397d8d8 + - path: output/ngscheckmate/output_matched.txt + md5sum: efdecd402fb7f1425d96624a73ba33b2 From 96ca9f700f2c8b1cf1f0765419a79c09ff53db08 Mon Sep 17 00:00:00 2001 From: Florian Wuennemann Date: Thu, 30 Mar 2023 13:23:18 +0200 Subject: [PATCH 018/120] New module: Mcquant (#3196) * First test version for mcquant * Updated version number. * Updated container version and added local tests. * Added public test-datasets. * Added conda exception. * Added stub test. * Modified stub test. * Updated version to use VERSION variable. * [automated] Fix linting with Prettier * Redid tests and md5sums. * Modified id in input tuples to test pytests * Changed csv md5sum to contains check. --------- Co-authored-by: nf-core-bot --- .github/workflows/pytest-workflow.yml | 2 + modules/nf-core/mcquant/main.nf | 48 +++++++++++++ modules/nf-core/mcquant/meta.yml | 69 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/mcquant/main.nf | 25 +++++++ tests/modules/nf-core/mcquant/nextflow.config | 5 ++ tests/modules/nf-core/mcquant/test.yml | 9 +++ 7 files changed, 162 insertions(+) create mode 100644 modules/nf-core/mcquant/main.nf create mode 100644 modules/nf-core/mcquant/meta.yml create mode 100644 tests/modules/nf-core/mcquant/main.nf create mode 100644 tests/modules/nf-core/mcquant/nextflow.config create mode 100644 tests/modules/nf-core/mcquant/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 1d43c6212e9..0df295279bc 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -40,6 +40,8 @@ jobs: tags: ["${{ fromJson(needs.changes.outputs.modules) }}"] profile: ["docker", "singularity", "conda"] exclude: + - profile: "conda" + tags: mcquant - profile: "conda" tags: bases2fastq - profile: "conda" diff --git a/modules/nf-core/mcquant/main.nf b/modules/nf-core/mcquant/main.nf new file mode 100644 index 00000000000..b78e87f500e --- /dev/null +++ b/modules/nf-core/mcquant/main.nf @@ -0,0 +1,48 @@ +process MCQUANT { + tag "$meta.id" + label 'process_single' + + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + container "labsyspharm/quantification:1.5.4" + + input: + tuple val(meta), path(image) + tuple val(meta2), path(mask) + tuple val(meta3), path(markerfile) + + output: + tuple val(meta), path("*.csv"), emit: csv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '1.5.4' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + python /app/CommandSingleCellExtraction.py \ + --masks $mask \ + --image $image \ + --channel_names $markerfile \ + --output . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mcquant: $VERSION + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '1.5.4' + """ + touch ${prefix}.csv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mcquant: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/mcquant/meta.yml b/modules/nf-core/mcquant/meta.yml new file mode 100644 index 00000000000..764dc402129 --- /dev/null +++ b/modules/nf-core/mcquant/meta.yml @@ -0,0 +1,69 @@ +name: "mcquant" +description: write your description here +keywords: + - quantification + - image_analysis + - mcmicro + - highly_multiplexed_imaging +tools: + - "mcquant": + description: "Module for single-cell data extraction given a segmentation mask and multi-channel image. The CSV structure is aligned with histoCAT output." + homepage: "https://github.com/labsyspharm/quantification" + documentation: "https://github.com/labsyspharm/quantification/blob/master/README.md" + tool_dev_url: "https://github.com/labsyspharm/quantification" + doi: "https://doi.org/10.1038/s41592-021-01308-y" + licence: "" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + + - image: + type: file + description: Multi-channel image file + pattern: "*.{tiff,tif,h5,hdf5}" + + - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + + - mask: + type: file + description: Labeled segmentation mask for image + pattern: "*.{tiff,tif,h5,hdf5}" + + - meta3: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + + - markerfile: + type: file + description: Marker file with channel names for image to quantify + pattern: "*.{csv}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - csv: + type: file + description: Quantified regionprops_table + pattern: "*.{csv}" + +authors: + - "@FloWuenne" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 022ac583401..ae6c09caf3b 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2054,6 +2054,10 @@ maxquant/lfq: - modules/nf-core/maxquant/lfq/** - tests/modules/nf-core/maxquant/lfq/** +mcquant: + - modules/nf-core/mcquant/** + - tests/modules/nf-core/mcquant/** + mcroni: - modules/nf-core/mcroni/** - tests/modules/nf-core/mcroni/** diff --git a/tests/modules/nf-core/mcquant/main.nf b/tests/modules/nf-core/mcquant/main.nf new file mode 100644 index 00000000000..8bcf55ebc8b --- /dev/null +++ b/tests/modules/nf-core/mcquant/main.nf @@ -0,0 +1,25 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MCQUANT } from '../../../../modules/nf-core/mcquant/main.nf' + +workflow test_mcquant { + + image = [ + [ id:'image' ], // meta map + file(params.test_data['imaging']['quantification']['image'], checkIfExists: true) + ] + + mask = [ + [ id:'mask' ], // meta map + file(params.test_data['imaging']['quantification']['mask'], checkIfExists: true) + ] + + markerfile = [ + [ id:'marker' ], // meta map + file(params.test_data['imaging']['quantification']['markers'], checkIfExists: true) + ] + + MCQUANT ( image, mask, markerfile ) +} diff --git a/tests/modules/nf-core/mcquant/nextflow.config b/tests/modules/nf-core/mcquant/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/mcquant/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/mcquant/test.yml b/tests/modules/nf-core/mcquant/test.yml new file mode 100644 index 00000000000..243a986f042 --- /dev/null +++ b/tests/modules/nf-core/mcquant/test.yml @@ -0,0 +1,9 @@ +- name: mcquant test_mcquant + command: nextflow run ./tests/modules/nf-core/mcquant -entry test_mcquant -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/mcquant/nextflow.config + tags: + - mcquant + files: + - path: output/mcquant/cycif_tonsil_registered_cell.csv + contains: + - "CellID" + - path: output/mcquant/versions.yml From 4ff8eed27b0ab1dc10db8fee9a580160794ea585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Narc=C4=B1?= Date: Thu, 30 Mar 2023 13:57:53 +0200 Subject: [PATCH 019/120] 3084 new module svaba (#3160) * main module * svaba run module * alignments file removed * alignments file removed * fixed * Update modules/nf-core/svaba/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * id for dbsnp * id for dbsnp * longer names * final changes * final changes * final changes * final changes * seperate vcfs * seperate vcfs * Update tests/modules/nf-core/svaba/test.yml Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Update tests/modules/nf-core/svaba/test.yml Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Update modules/nf-core/svaba/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * prefix * files * Update main.nf * fix * fix * stub changes * remove bwa index for stub * md5 removed --------- Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- modules/nf-core/svaba/main.nf | 79 ++++++++++ modules/nf-core/svaba/meta.yml | 160 ++++++++++++++++++++ tests/config/pytest_modules.yml | 4 + tests/modules/nf-core/svaba/main.nf | 41 +++++ tests/modules/nf-core/svaba/nextflow.config | 5 + tests/modules/nf-core/svaba/test.yml | 19 +++ 6 files changed, 308 insertions(+) create mode 100644 modules/nf-core/svaba/main.nf create mode 100644 modules/nf-core/svaba/meta.yml create mode 100644 tests/modules/nf-core/svaba/main.nf create mode 100644 tests/modules/nf-core/svaba/nextflow.config create mode 100644 tests/modules/nf-core/svaba/test.yml diff --git a/modules/nf-core/svaba/main.nf b/modules/nf-core/svaba/main.nf new file mode 100644 index 00000000000..136ed001d88 --- /dev/null +++ b/modules/nf-core/svaba/main.nf @@ -0,0 +1,79 @@ + +process SVABA { + tag "$meta.id" + label 'process_single' + + conda "bioconda::svaba=1.1.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/svaba:1.1.0--h7d7f7ad_2': + 'quay.io/biocontainers/svaba:1.1.0--h7d7f7ad_2' }" + + input: + tuple val(meta), path(tumorbam), path(tumorbai), path(normalbam), path(normalbai) + tuple val(meta2), path(fasta) + tuple val(meta2), path(fasta_fai) + tuple val(meta3), path(bwa_index) + tuple val(meta4), path(dbsnp) + tuple val(meta4), path(dbsnp_tbi) + tuple val(meta5), path(regions) + + output: + tuple val(meta), path("*.svaba.sv.vcf.gz") , emit: sv, optional: true + tuple val(meta), path("*.svaba.indel.vcf.gz") , emit: indel, optional: true + tuple val(meta), path("*.svaba.germline.indel.vcf.gz") , emit: germ_indel, optional: true + tuple val(meta), path("*.svaba.germline.sv.vcf.gz") , emit: germ_sv, optional: true + tuple val(meta), path("*.svaba.somatic.indel.vcf.gz") , emit: som_indel, optional: true + tuple val(meta), path("*.svaba.somatic.sv.vcf.gz") , emit: som_sv, optional: true + tuple val(meta), path("*.svaba.unfiltered.sv.vcf.gz") , emit: unfiltered_sv, optional: true + tuple val(meta), path("*.svaba.unfiltered.indel.vcf.gz") , emit: unfiltered_indel, optional: true + tuple val(meta), path("*.svaba.unfiltered.germline.indel.vcf.gz") , emit: unfiltered_germ_indel, optional: true + tuple val(meta), path("*.svaba.unfiltered.germline.sv.vcf.gz") , emit: unfiltered_germ_sv, optional: true + tuple val(meta), path("*.svaba.unfiltered.somatic.indel.vcf.gz") , emit: unfiltered_som_indel, optional: true + tuple val(meta), path("*.svaba.unfiltered.somatic.sv.vcf.gz") , emit: unfiltered_som_sv, optional: true + tuple val(meta), path("*.bps.txt.gz") , emit: raw_calls + tuple val(meta), path("*.discordants.txt.gz") , emit: discordants, optional: true + tuple val(meta), path("*.log") , emit: log + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def bamlist = normalbam ? "-t ${tumorbam} -n ${normalbam}" : "-t ${tumorbam}" + def dbsnp = dbsnp ? "--dbsnp-vcf ${dbsnp}" : "" + def regions = regions ? "--region ${regions}" : "" + def bwa = bwa_index ? "cp -s ${bwa_index}/* ." : "" + + """ + ${bwa} + + svaba \\ + run \\ + $bamlist \\ + --threads $task.cpus \\ + $dbsnp \\ + --id-string $meta.id \\ + --reference-genome $fasta \\ + --g-zip \\ + $regions \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + svaba: \$(echo \$(svaba --version 2>&1) | sed 's/[^0-9.]*\\([0-9.]*\\).*/\\1/' ) + END_VERSIONS + """ + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bps.txt.gz + touch ${prefix}.log + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + svaba: \$(echo \$(svaba --version 2>&1) | sed 's/[^0-9.]*\\([0-9.]*\\).*/\\1/' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/svaba/meta.yml b/modules/nf-core/svaba/meta.yml new file mode 100644 index 00000000000..0137c5ce91f --- /dev/null +++ b/modules/nf-core/svaba/meta.yml @@ -0,0 +1,160 @@ +name: "svaba" +description: SvABA is an efficient and accurate method for detecting SVs from short-read sequencing data using genome-wide local assembly with low memory and computing requirements +keywords: + - sv + - structural variants + - detecting svs + - short-read sequencing +tools: + - "svaba": + description: "Structural variation and indel detection by local assembly" + homepage: "https://github.com/walaj/svaba" + documentation: "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5880247/" + tool_dev_url: "https://github.com/walaj/svaba" + doi: "10.1101/gr.221028.117" + licence: "['GPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + id: should be the identification number or sample name. If there is normal file meta should be common + e.g. [ id:'test' ] + - meta2: + type: map + description: | + Groovy Map containing FASTA information + id: should be the identification number for alignment file and should be the same used to create BWA index files + e.g. [ id:'fasta' ] + - meta3: + type: map + description: | + Groovy Map containing BWA information + id: should be the identification number same as fasta file + e.g. [ id:'bwa' ] + - meta4: + type: map + description: | + Groovy Map containing dbSNP information + id: should be the identification number for dbSNP files + e.g. [ id:'test' ] + - meta5: + type: map + description: | + Groovy Map containing regions information + id: should be the identification number for regions + e.g. [ id:'test' ] + - tumorbam: + type: file + description: Tumor or metastatic sample, BAM, SAM or CRAM file + pattern: "*.{bam,cram,sam}" + - tummorbai: + type: file + description: Index + pattern: "*.{bai,crai,sai}" + - normalbam: + type: file + description: Control (or normal) of matching tumor/metastatic sample, BAM, SAM or CRAM file + pattern: "*.{bam,cram,sam}" + - normalbai: + type: file + description: Index + pattern: "*.{bai,crai,sai}" + - bwa_index: + type: file + description: BWA genome index files + pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" + - fasta: + type: file + description: FASTA file + pattern: "*.{fasta|fa}" + - fasta_fai: + type: file + description: Index of FASTA file + pattern: "*.{fai}" + - dbsnp: + type: file + description: VCF file including dbSNP variants + pattern: "*.vcf.gz" + - dbsnp_tbi: + type: file + description: Index of VCF file including dbSNP variants + pattern: "*.vcf.gz.tbi" + - regions: + type: file + description: Targeted intervals. Accepts BED file or Samtools-style string + pattern: "*.bed|*.txt|*.tab" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - sv: + type: file + description: Filtered SVs for tumor only cases + pattern: "*.vcf.gz" + - indel: + type: file + description: Filtered Indels for tumor only cases + pattern: "*.vcf.gz" + - som_sv: + type: file + description: Somatic filtered SVs for tumor/normal paired samples + pattern: "*.vcf.gz" + - som_indel: + type: file + description: Somatic filtered Indels for tumor/normal paired samples + pattern: "*.vcf.gz" + - germ_sv: + type: file + description: Germline filtered SVs for tumor/normal paired samples + pattern: "*.vcf.gz" + - germ_indel: + type: file + description: Germline filtered Indels for tumor/normal paired samples + pattern: "*.vcf.gz" + - unfiltered_sv: + type: file + description: Unfiltered SVs for tumor only cases + pattern: "*.vcf.gz" + - unfiltered_indel: + type: file + description: Unfiltered Indels for tumor only cases + pattern: "*.vcf.gz" + - unfiltered_som_sv: + type: file + description: Unfiltered somatic SVs for tumor/normal paired samples + pattern: "*.vcf.gz" + - unfiltered_som_indel: + type: file + description: Unfiltered somatic Indels for tumor/normal paired samples + pattern: "*.vcf.gz" + - unfiltered_germ_sv: + type: file + description: Unfiltered germline SVs for tumor/normal paired samples + pattern: "*.vcf.gz" + - unfiltered_germ_indel: + type: file + description: Unfiltered germline Indels for tumor/normal paired samples + pattern: "*.vcf.gz" + - raw_calls: + type: file + description: Raw, unfiltered variants + pattern: "*.txt.gz" + - discordants: + type: file + description: Information on all clusters of discordant reads identified with 2+ reads + pattern: "*.txt.gz" + - log: + type: file + description: Log file + pattern: "*.txt.gz" +authors: + - "@kubranarci" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index ae6c09caf3b..801908d33b9 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3384,6 +3384,10 @@ survivor/merge: - modules/nf-core/survivor/merge/** - tests/modules/nf-core/survivor/merge/** +svaba: + - modules/nf-core/svaba/** + - tests/modules/nf-core/svaba/** + svdb/merge: - modules/nf-core/svdb/merge/** - tests/modules/nf-core/svdb/merge/** diff --git a/tests/modules/nf-core/svaba/main.nf b/tests/modules/nf-core/svaba/main.nf new file mode 100644 index 00000000000..65057d542e3 --- /dev/null +++ b/tests/modules/nf-core/svaba/main.nf @@ -0,0 +1,41 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SVABA } from '../../../../modules/nf-core/svaba/main.nf' +include { BWA_INDEX } from '../../../../modules/nf-core/bwa/index/main.nf' + +workflow test_svaba_nocontrol { + + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + [], + [] + ] + fasta = [[id:'fasta'],file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + fasta_fai = [[id:'fasta'],file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)] + + BWA_INDEX (fasta) + dbsnp = [[id:'dbsnp'], file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true)] + dbsnp_tbi = [[id:'dbsnp'],file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true)] + + SVABA ( input, fasta, fasta_fai, BWA_INDEX.out.index, dbsnp, dbsnp_tbi, [[],[]] ) +} +workflow test_svaba { + + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) + ] + fasta = [[id:'fasta'],file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)] + fasta_fai = [[id:'fasta'],file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)] + + BWA_INDEX (fasta) + dbsnp = [[id:'dbsnp'], file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true)] + dbsnp_tbi = [[id:'dbsnp'],file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true)] + + SVABA ( input, fasta, fasta_fai, BWA_INDEX.out.index, dbsnp, dbsnp_tbi, [[],[]] ) +} diff --git a/tests/modules/nf-core/svaba/nextflow.config b/tests/modules/nf-core/svaba/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/svaba/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/svaba/test.yml b/tests/modules/nf-core/svaba/test.yml new file mode 100644 index 00000000000..5e492dcbab8 --- /dev/null +++ b/tests/modules/nf-core/svaba/test.yml @@ -0,0 +1,19 @@ +- name: svaba test_svaba_nocontrol + command: nextflow run ./tests/modules/nf-core/svaba -entry test_svaba_nocontrol -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/svaba/nextflow.config -stub + tags: + - svaba + files: + - path: output/bwa/versions.yml + - path: output/svaba/test.bps.txt.gz + - path: output/svaba/test.log + - path: output/svaba/versions.yml + +- name: svaba test_svaba + command: nextflow run ./tests/modules/nf-core/svaba -entry test_svaba -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/svaba/nextflow.config -stub + tags: + - svaba + files: + - path: output/bwa/versions.yml + - path: output/svaba/test.bps.txt.gz + - path: output/svaba/test.log + - path: output/svaba/versions.yml From 423fa88f8e904b33cad103e8e69eb351b2a4ecb9 Mon Sep 17 00:00:00 2001 From: luiskuhn <38211686+luiskuhn@users.noreply.github.com> Date: Thu, 30 Mar 2023 15:50:52 +0200 Subject: [PATCH 020/120] Mcmicro/Scimap (#3139) * created module * added init template * added container line * Change of in and output * added proc and .py * Bug Fixing * Test Running * Reworked script to use existing scimap-mcmicro CLI. * added csv/h5ad * added test data * fix args * added process * fixed version * removed python script * Changed name to scimap/mcmicro and some updates. * conda exclude scimap * Added description and info for scimap. * [automated] Fix linting with Prettier --------- Co-authored-by: dominikmolitor Co-authored-by: Maxime U Garcia Co-authored-by: Florian Wuennemann Co-authored-by: Caro Co-authored-by: nf-core-bot --- .github/workflows/pytest-workflow.yml | 3 ++ modules/nf-core/scimap/mcmicro/main.nf | 36 +++++++++++++ modules/nf-core/scimap/mcmicro/meta.yml | 53 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/scimap/mcmicro/main.nf | 15 ++++++ .../nf-core/scimap/mcmicro/nextflow.config | 5 ++ tests/modules/nf-core/scimap/mcmicro/test.yml | 9 ++++ 7 files changed, 125 insertions(+) create mode 100644 modules/nf-core/scimap/mcmicro/main.nf create mode 100644 modules/nf-core/scimap/mcmicro/meta.yml create mode 100644 tests/modules/nf-core/scimap/mcmicro/main.nf create mode 100644 tests/modules/nf-core/scimap/mcmicro/nextflow.config create mode 100644 tests/modules/nf-core/scimap/mcmicro/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 0df295279bc..db9da98057f 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -102,6 +102,9 @@ jobs: tags: subworkflows/vcf_annotate_ensemblvep - profile: "conda" tags: coreograph + - profile: "conda" + tags: scimap/mcmicro + env: NXF_ANSI_LOG: false SENTIEON_LICENSE_BASE64: ${{ secrets.SENTIEON_LICENSE_BASE64 }} diff --git a/modules/nf-core/scimap/mcmicro/main.nf b/modules/nf-core/scimap/mcmicro/main.nf new file mode 100644 index 00000000000..bc15922e511 --- /dev/null +++ b/modules/nf-core/scimap/mcmicro/main.nf @@ -0,0 +1,36 @@ +process SCIMAP_MCMICRO { + tag "$meta.id" + label 'process_single' + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "Scimap module does not support Conda. Please use Docker / Singularity / Podman instead." + } + + container "labsyspharm/scimap:0.22.0" + + input: + tuple val(meta), path(cellbyfeature) + + output: + tuple val(meta), path("*.csv") , emit: annotedDataCsv, optional:true + tuple val(meta), path("*.h5ad") , emit: annotedDataH5ad, optional:true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION='0.22.0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping + """ + scimap-mcmicro $cellbyfeature -o . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + scimap: $VERSION + END_VERSIONS + """ + +} diff --git a/modules/nf-core/scimap/mcmicro/meta.yml b/modules/nf-core/scimap/mcmicro/meta.yml new file mode 100644 index 00000000000..eb86026d9bc --- /dev/null +++ b/modules/nf-core/scimap/mcmicro/meta.yml @@ -0,0 +1,53 @@ +name: "scimap_mcmicro" +description: SCIMAP is a suite of tools that enables spatial single-cell analyses +keywords: + - sort +tools: + - "scimap": + description: "Scimap is a scalable toolkit for analyzing spatial molecular data." + homepage: "https://scimap.xyz/" + documentation: "https://scimap.xyz/All%20Functions/A.%20Pre%20Processing/sm.pp.mcmicro_to_scimap/" + tool_dev_url: "https://github.com/labsyspharm/scimap" + doi: "" + licence: "MIT License" + +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - cellByFeature: + type: file + description: CSV file with cell by feature table + pattern: "*.{csv}" + +output: + #Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + # + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - annotedDataCsv: + type: file + description: Sorted CSV file + pattern: "*.{csv}" + - annotedDataH5ad: + type: file + description: Sorted H5AD file + pattern: "*.{h5ad}" + + # - clusterPlot: + # type: file + # description: UPMA plot of the data in pdf file + # pattern: "*.pdf" + +authors: + - "@luiskuhn" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 801908d33b9..b551a836029 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2883,6 +2883,10 @@ samtools/view: - modules/nf-core/samtools/view/** - tests/modules/nf-core/samtools/view/** +scimap/mcmicro: + - modules/nf-core/scimap/mcmicro/** + - tests/modules/nf-core/scimap/mcmicro/** + scoary: - modules/nf-core/scoary/** - tests/modules/nf-core/scoary/** diff --git a/tests/modules/nf-core/scimap/mcmicro/main.nf b/tests/modules/nf-core/scimap/mcmicro/main.nf new file mode 100644 index 00000000000..0c5de8757c1 --- /dev/null +++ b/tests/modules/nf-core/scimap/mcmicro/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SCIMAP_MCMICRO } from '../../../../../modules/nf-core/scimap/mcmicro/main.nf' + +workflow test_scimap_mcmicro { + + feature_table = [ + [ id:'test' ], // meta map + file(params.test_data['imaging']['downstream']['cell_feature_array'], checkIfExists: true) + ] + + SCIMAP_MCMICRO ( feature_table ) +} diff --git a/tests/modules/nf-core/scimap/mcmicro/nextflow.config b/tests/modules/nf-core/scimap/mcmicro/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/scimap/mcmicro/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/scimap/mcmicro/test.yml b/tests/modules/nf-core/scimap/mcmicro/test.yml new file mode 100644 index 00000000000..cbf5be60eab --- /dev/null +++ b/tests/modules/nf-core/scimap/mcmicro/test.yml @@ -0,0 +1,9 @@ +- name: scimap mcmicro test_scimap_mcmicro + command: nextflow run ./tests/modules/nf-core/scimap/mcmicro -entry test_scimap_mcmicro -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/scimap/mcmicro/nextflow.config + tags: + - scimap/mcmicro + - scimap + files: + - path: output/scimap/cycif_tonsil_cell.h5ad + - path: output/scimap/cycif_tonsil_cell.h5ad.csv + - path: output/scimap/versions.yml From ffe2f5865f608848e440a52b73c304ea79aaf818 Mon Sep 17 00:00:00 2001 From: Matthias Zepper <6963520+MatthiasZepper@users.noreply.github.com> Date: Thu, 30 Mar 2023 16:10:01 +0200 Subject: [PATCH 021/120] umi-tools: Choose different process labels (#3219) umi-tools: Choose different process labels as process_single alone has too short memory/runtimes. Co-authored-by: Matthias Zepper Co-authored-by: Harshil Patel --- modules/nf-core/umitools/dedup/main.nf | 2 +- modules/nf-core/umitools/extract/main.nf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/umitools/dedup/main.nf b/modules/nf-core/umitools/dedup/main.nf index 68fc9b9e727..aa6fdd24e0b 100644 --- a/modules/nf-core/umitools/dedup/main.nf +++ b/modules/nf-core/umitools/dedup/main.nf @@ -1,6 +1,6 @@ process UMITOOLS_DEDUP { tag "$meta.id" - label "process_single" + label "process_medium" conda "bioconda::umi_tools=1.1.4" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? diff --git a/modules/nf-core/umitools/extract/main.nf b/modules/nf-core/umitools/extract/main.nf index ba2826e1f2d..64fdd367fb6 100644 --- a/modules/nf-core/umitools/extract/main.nf +++ b/modules/nf-core/umitools/extract/main.nf @@ -1,6 +1,7 @@ process UMITOOLS_EXTRACT { tag "$meta.id" label "process_single" + label "process_long" conda "bioconda::umi_tools=1.1.4" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? From 8c159ebb28cfa08890042a133bfab78de932eff7 Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen <37172585+asp8200@users.noreply.github.com> Date: Thu, 30 Mar 2023 20:07:43 +0200 Subject: [PATCH 022/120] Sentieon dedup (#3224) * Fixing stub * Adding Sentieon-Dedup module and test * Skipping conda for all tests tagged sentieon * Adding test for sentieon-dedup * Not running conda test for sentieon modules * WIP: Trying to hardcode output to cram * Fixing suffix * WIP: Fetch md5sums * Updating md5sums * Removing outdated comments * Adding extra args for driver, LocusCollector and Dedup * yml-doc for Dedup-module * Adding updating for rmdup in test-config * WIP: Adding test for dedup rmdup * Removing unwanted tags * Trying to run two dedup-tests * Adding test of sentieon dedup with removal of reads * Re-adding secrets * Removing option rmdup from test yaml * Update tests/modules/nf-core/sentieon/dedup/nextflow.config Co-authored-by: Maxime U Garcia * Update modules/nf-core/sentieon/dedup/main.nf Co-authored-by: Maxime U Garcia * Update modules/nf-core/sentieon/dedup/main.nf Co-authored-by: Maxime U Garcia * Update modules/nf-core/sentieon/bwamem/main.nf Co-authored-by: Maxime U Garcia * Update modules/nf-core/sentieon/dedup/main.nf Co-authored-by: Maxime U Garcia * Update modules/nf-core/sentieon/dedup/main.nf Co-authored-by: Maxime U Garcia * Update modules/nf-core/sentieon/dedup/main.nf Co-authored-by: Maxime U Garcia * Update modules/nf-core/sentieon/dedup/main.nf Co-authored-by: Maxime U Garcia * Update modules/nf-core/sentieon/dedup/main.nf Co-authored-by: Maxime U Garcia * Adding prefix for stub * fix * fix * fix * Updating md5sums --------- Co-authored-by: Maxime U Garcia --- .github/workflows/pytest-workflow.yml | 2 + modules/nf-core/sentieon/bwamem/main.nf | 2 +- modules/nf-core/sentieon/bwamem/meta.yml | 4 +- modules/nf-core/sentieon/dedup/main.nf | 75 +++++++++++++++++++ modules/nf-core/sentieon/dedup/meta.yml | 72 ++++++++++++++++++ tests/config/pytest_modules.yml | 6 +- tests/modules/nf-core/sentieon/dedup/main.nf | 34 +++++++++ .../nf-core/sentieon/dedup/nextflow.config | 14 ++++ tests/modules/nf-core/sentieon/dedup/test.yml | 30 ++++++++ 9 files changed, 235 insertions(+), 4 deletions(-) create mode 100644 modules/nf-core/sentieon/dedup/main.nf create mode 100644 modules/nf-core/sentieon/dedup/meta.yml create mode 100644 tests/modules/nf-core/sentieon/dedup/main.nf create mode 100644 tests/modules/nf-core/sentieon/dedup/nextflow.config create mode 100644 tests/modules/nf-core/sentieon/dedup/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index db9da98057f..1ff97fef67c 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -94,6 +94,8 @@ jobs: tags: sentieon/bwaindex - profile: "conda" tags: sentieon/bwamem + - profile: "conda" + tags: sentieon/dedup - profile: "conda" tags: universc - profile: "singularity" diff --git a/modules/nf-core/sentieon/bwamem/main.nf b/modules/nf-core/sentieon/bwamem/main.nf index 94bcf35286b..734738fa92d 100644 --- a/modules/nf-core/sentieon/bwamem/main.nf +++ b/modules/nf-core/sentieon/bwamem/main.nf @@ -27,7 +27,6 @@ process SENTIEON_BWAMEM { script: def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' def sentieon_auth_data_base64 = task.ext.sentieon_auth_data_base64 ?: '' @@ -59,6 +58,7 @@ process SENTIEON_BWAMEM { """ stub: + def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.bam touch ${prefix}.bam.bai diff --git a/modules/nf-core/sentieon/bwamem/meta.yml b/modules/nf-core/sentieon/bwamem/meta.yml index a3e49e7ccfe..ae3c7cd7883 100644 --- a/modules/nf-core/sentieon/bwamem/meta.yml +++ b/modules/nf-core/sentieon/bwamem/meta.yml @@ -39,7 +39,7 @@ input: pattern: "*.{fa,fasta}" - fasta_fai: type: file - description: The index of the FASTA reference. Needed when the argument `--sorted` is used + description: The index of the FASTA reference. pattern: "*.fai" output: - meta: @@ -49,7 +49,7 @@ output: e.g. [ id:'test', single_end:false ] - bam: type: file - description: BAM file. If the BAM file is not indexed, this tool will run samtools index before extracting reads. + description: BAM file. pattern: "*.bam" - bai: description: BAI file diff --git a/modules/nf-core/sentieon/dedup/main.nf b/modules/nf-core/sentieon/dedup/main.nf new file mode 100644 index 00000000000..4415350896a --- /dev/null +++ b/modules/nf-core/sentieon/dedup/main.nf @@ -0,0 +1,75 @@ +process SENTIEON_DEDUP { + tag "$meta.id" + label 'process_medium' + label 'sentieon' + + secret 'SENTIEON_LICENSE_BASE64' + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." + } + + container 'nfcore/sentieon:202112.06' + + input: + tuple val(meta), path(bam), path(bai) + path fasta + path fasta_fai + + output: + tuple val(meta), path("*.cram"), emit: cram, optional: true + tuple val(meta), path("*.crai"), emit: crai // Sentieon will generate a .crai AND a .bai no matter which output file type is chosen. + tuple val(meta), path("*.bam"), emit: bam, optional: true + tuple val(meta), path("*.bai"), emit: bai + tuple val(meta), path("*.score"), emit: score + tuple val(meta), path("*.metrics"), emit: metrics + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' + def args4 = task.ext.args4 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def suffix = task.ext.suffix ?: ".cram" // The suffix should be either ".cram" or ".bam". + def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' + def sentieon_auth_data_base64 = task.ext.sentieon_auth_data_base64 ?: '' + def input_list = bam.collect{"-i $it"}.join(' ') + + """ + export SENTIEON_LICENSE=\$(echo -n "\$SENTIEON_LICENSE_BASE64" | base64 -d) + + if [ ${sentieon_auth_mech_base64} ] && [ ${sentieon_auth_data_base64} ]; then + # If sentieon_auth_mech_base64 and sentieon_auth_data_base64 are non-empty strings, then Sentieon is mostly likely being run with some test-license. + export SENTIEON_AUTH_MECH=\$(echo -n "${sentieon_auth_mech_base64}" | base64 -d) + export SENTIEON_AUTH_DATA=\$(echo -n "${sentieon_auth_data_base64}" | base64 -d) + echo "Decoded and exported Sentieon test-license system environment variables" + fi + + sentieon driver $args $input_list -r ${fasta} --algo LocusCollector $args2 --fun score_info ${prefix}.score + sentieon driver $args3 -t $task.cpus $input_list -r ${fasta} --algo Dedup $args4 --score_info ${prefix}.score --metrics ${prefix}.metrics ${prefix}${suffix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.cram + touch ${prefix}.cram.crai + touch ${prefix}.metrics + touch ${prefix}.score + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") + END_VERSIONS + """ +} diff --git a/modules/nf-core/sentieon/dedup/meta.yml b/modules/nf-core/sentieon/dedup/meta.yml new file mode 100644 index 00000000000..cb1ec3758f6 --- /dev/null +++ b/modules/nf-core/sentieon/dedup/meta.yml @@ -0,0 +1,72 @@ +name: sentieon_dedup +description: Runs the sentieon tool LocusCollector followed by Dedup. LocusCollector collects read information that is used by Dedup which in turn marks or removes duplicate reads. +keywords: + - mem + - dedup + - map + - bam + - cram + - sentieon +tools: + - sentieon: + description: | + Sentieon® provides complete solutions for secondary DNA/RNA analysis for a variety of sequencing platforms, including short and long reads. + Our software improves upon BWA, STAR, Minimap2, GATK, HaplotypeCaller, Mutect, and Mutect2 based pipelines and is deployable on any generic-CPU-based computing system. + homepage: https://www.sentieon.com/ + documentation: https://www.sentieon.com/ +input: + - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file. + pattern: "*.bam" + - bai: + description: BAI file + pattern: "*.bai" + - fasta: + type: file + description: Genome fasta file + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the FASTA reference. + pattern: "*.fai" +output: + - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - cram: + type: file + description: CRAM file + pattern: "*.cram" + - crai: + type: file + description: CRAM index file + pattern: "*.crai" + - bam: + type: file + description: BAM file. + pattern: "*.bam" + - bai: + description: BAI file + pattern: "*.bai" + - score: + type: file + description: The score file indicates which reads LocusCollector finds are likely duplicates. + pattern: "*.score" + - metrics: + type: file + description: Output file containing the metrics data from Dedup. + pattern: "*.metrics" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@asp8200" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index b551a836029..420965da1e8 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2921,7 +2921,11 @@ sentieon/bwaindex: sentieon/bwamem: - modules/nf-core/sentieon/bwamem/** - - tests/modules/nf-core/sentieon/bwameminde/** + - tests/modules/nf-core/sentieon/bwamem/** + +sentieon/dedup: + - modules/nf-core/sentieon/dedup/** + - tests/modules/nf-core/sentieon/dedup/** seqkit/pair: - modules/nf-core/seqkit/pair/** diff --git a/tests/modules/nf-core/sentieon/dedup/main.nf b/tests/modules/nf-core/sentieon/dedup/main.nf new file mode 100644 index 00000000000..34ef4bade29 --- /dev/null +++ b/tests/modules/nf-core/sentieon/dedup/main.nf @@ -0,0 +1,34 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SENTIEON_DEDUP as SENTIEON_DEDUP_MARK } from '../../../../../modules/nf-core/sentieon/dedup/main.nf' +include { SENTIEON_DEDUP as SENTIEON_DEDUP_REMOVE } from '../../../../../modules/nf-core/sentieon/dedup/main.nf' + +workflow test_dedup_mark_duplicate_reads { + + fasta_file = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai_file = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + + bam_ch = [ + [ id: 'test' ], + file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam_bai'], checkIfExists: true) + ] + + SENTIEON_DEDUP_MARK ( bam_ch, fasta_file, fasta_fai_file ) +} + +workflow test_dedup_remove_duplicate_reads { + + fasta_file = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai_file = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + + bam_ch = [ + [ id: 'test' ], + file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam_bai'], checkIfExists: true) + ] + + SENTIEON_DEDUP_REMOVE ( bam_ch, fasta_file, fasta_fai_file ) +} diff --git a/tests/modules/nf-core/sentieon/dedup/nextflow.config b/tests/modules/nf-core/sentieon/dedup/nextflow.config new file mode 100644 index 00000000000..3e13bd97106 --- /dev/null +++ b/tests/modules/nf-core/sentieon/dedup/nextflow.config @@ -0,0 +1,14 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withLabel: 'sentieon' { + ext.sentieon_auth_mech_base64 = secrets.SENTIEON_AUTH_MECH_BASE64 + ext.sentieon_auth_data_base64 = secrets.SENTIEON_AUTH_DATA_BASE64 + } + + withName: 'SENTIEON_DEDUP_REMOVE' { + ext.args4 = '--rmdup' + } + +} diff --git a/tests/modules/nf-core/sentieon/dedup/test.yml b/tests/modules/nf-core/sentieon/dedup/test.yml new file mode 100644 index 00000000000..48686c4367b --- /dev/null +++ b/tests/modules/nf-core/sentieon/dedup/test.yml @@ -0,0 +1,30 @@ +- name: sentieon test_dedup_mark_duplicate_reads + command: nextflow run ./tests/modules/nf-core/sentieon/dedup -entry test_dedup_mark_duplicate_reads -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/sentieon/dedup/nextflow.config + tags: + - sentieon + - sentieon/dedup + files: + - path: ./output/sentieon/test.cram + md5sum: 6abb0fc667edc1ce61b67929c1ec0881 + - path: ./output/sentieon/test.cram.crai + md5sum: f8da02b770410adb02561aa69a46cc15 + - path: ./output/sentieon/test.metrics + md5sum: aba47c5fed7143500d91cc39df1e2eb2 + - path: ./output/sentieon/test.score + md5sum: 4a36fe59dc6865cd5ee9e7ecd936106e + - path: ./output/sentieon/versions.yml +- name: sentieon test_dedup_remove_duplicate_reads + command: nextflow run ./tests/modules/nf-core/sentieon/dedup -entry test_dedup_remove_duplicate_reads -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/sentieon/dedup/nextflow.config + tags: + - sentieon + - sentieon/dedup + files: + - path: ./output/sentieon/test.cram + md5sum: a605337533680a85453df5e34900f833 + - path: ./output/sentieon/test.cram.crai + md5sum: ac694a8870a098b8f81a87ef3f5bd590 + - path: ./output/sentieon/test.metrics + md5sum: da2dd03dca502c3fbe23f655e44963f3 + - path: ./output/sentieon/test.score + md5sum: 4a36fe59dc6865cd5ee9e7ecd936106e + - path: ./output/sentieon/versions.yml From 8f65c1af123207d234ea3fc6dcd19d30b4a0e322 Mon Sep 17 00:00:00 2001 From: Jose Nimo <30318135+josenimo@users.noreply.github.com> Date: Thu, 30 Mar 2023 21:04:54 +0200 Subject: [PATCH 023/120] Cellpose nfcore (#3214) * module created * first commit of the day * second commit * getting there * day 2 almost there * almost ready part 2 * almost ready part 5 * tes * Add param.test_data * small check, it works, no slices * Version update * Modified documentation link to point to CLI doc. * Moved channel_axis and npy to nextflow.config * [automated] Fix linting with Prettier * Removed orphan file. --------- Co-authored-by: Florian Wuennemann Co-authored-by: nf-core-bot --- .github/workflows/pytest-workflow.yml | 2 + modules/nf-core/cellpose/main.nf | 49 +++++++++++++++++++ modules/nf-core/cellpose/meta.yml | 45 +++++++++++++++++ modules/nf-core/faqcs/meta.yml | 26 ++++++++-- tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/cellpose/main.nf | 15 ++++++ .../modules/nf-core/cellpose/nextflow.config | 9 ++++ tests/modules/nf-core/cellpose/test.yml | 8 +++ 8 files changed, 153 insertions(+), 5 deletions(-) create mode 100644 modules/nf-core/cellpose/main.nf create mode 100644 modules/nf-core/cellpose/meta.yml create mode 100644 tests/modules/nf-core/cellpose/main.nf create mode 100644 tests/modules/nf-core/cellpose/nextflow.config create mode 100644 tests/modules/nf-core/cellpose/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 1ff97fef67c..6701a64e368 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -40,6 +40,8 @@ jobs: tags: ["${{ fromJson(needs.changes.outputs.modules) }}"] profile: ["docker", "singularity", "conda"] exclude: + - profile: "conda" + tags: cellpose - profile: "conda" tags: mcquant - profile: "conda" diff --git a/modules/nf-core/cellpose/main.nf b/modules/nf-core/cellpose/main.nf new file mode 100644 index 00000000000..a0925a9ab51 --- /dev/null +++ b/modules/nf-core/cellpose/main.nf @@ -0,0 +1,49 @@ +process CELLPOSE { + tag "$meta.id" + label 'process_medium' + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "I did not manage to create a cellpose module in Conda that works in all OSes. Please use Docker / Singularity / Podman instead."} + + container "biocontainers/cellpose:2.1.1_cv1" + + input: + tuple val(meta), path(image) + + output: + tuple val(meta), path("*masks.tif"), emit: mask + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION='2.1.1' + """ + cellpose \ + --image_path $image \ + --save_tif \ + --verbose \ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cellpose: $VERSION + END_VERSIONS + """ + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = "2.1.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + """ + touch ${prefix}_cp_masks.tif + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cellpose: $VERSION + END_VERSIONS + """ + +} diff --git a/modules/nf-core/cellpose/meta.yml b/modules/nf-core/cellpose/meta.yml new file mode 100644 index 00000000000..dc5c71d57af --- /dev/null +++ b/modules/nf-core/cellpose/meta.yml @@ -0,0 +1,45 @@ +name: "cellpose" +description: cellpose segments cells in images +keywords: + - segmentation +tools: + - "cellpose": + description: "cellpose is an anatomical segmentation algorithm written in Python 3 by Carsen Stringer and Marius Pachitariu" + homepage: "https://github.com/MouseLand/cellpose" + documentation: "https://cellpose.readthedocs.io/en/latest/command.html" + tool_dev_url: "https://github.com/MouseLand/cellpose" + doi: "https://doi.org/10.1038/s41592-022-01663-4" + licence: "BSD 3-Clause" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + (sample id) + - image: + type: image stack + description: tif file for ready for segmentation + pattern: "*.{tif,tiff}" + - model: + type: pretrained model from the model zoo + description: string for picking a pretrained model + pattern: "{nuclei,cyto,cyto2,tissuenet,tissuenet,TN1,TN2,TN3,LC1,LC2,LC3,LC4}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + [sample id] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - image_mask: + type: tif_file + description: labelled mask output from cellpose in tif format + pattern: "*.{tif, tiff}" + +authors: + - "@josenimo" diff --git a/modules/nf-core/faqcs/meta.yml b/modules/nf-core/faqcs/meta.yml index 8bb4f2e718a..b71cae3284e 100644 --- a/modules/nf-core/faqcs/meta.yml +++ b/modules/nf-core/faqcs/meta.yml @@ -15,18 +15,34 @@ tools: doi: "10.1186/s12859-014-0366-2" licence: ["GPLv3 License"] -## TODO nf-core: Add a description of all of the variables used as input input: - meta: type: map description: | + Metadata about the specific run. + I guess this can be used if you are running many different images in a single nextflow pass? + I have no clue. Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - reads: - type: file + - image: + type: image + description: | + Obtained from cellpose documentation: Inputs + You can use tiffs or PNGs or JPEGs. We use the image loader from scikit-image. + Single plane images can read into data as nY x nX x channels or channels x nY x nX. + Then the channels settings will take care of reshaping the input appropriately for the network. + Note the model also rescales the input for each channel so that 0 = 1st percentile of image values and 1 = 99th percentile. + - image_metadata: + type: csv + description: | + This file will let Cellpose know which channels to use for segmentation. + The default will be channel 0. + - Model_to_use: + type: string description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. + This will define which model to use. + The default will be nuclear. + All models from the model zoo should be usable, the exact string has to be passed. output: - meta: diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 420965da1e8..9c28236b0e1 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -592,6 +592,10 @@ cdhit/cdhit: - modules/nf-core/cdhit/cdhit/** - tests/modules/nf-core/cdhit/cdhit/** +cellpose: + - modules/nf-core/cellpose/** + - tests/modules/nf-core/cellpose/** + cellranger/count: - modules/nf-core/cellranger/count/** - tests/modules/nf-core/cellranger/count/** diff --git a/tests/modules/nf-core/cellpose/main.nf b/tests/modules/nf-core/cellpose/main.nf new file mode 100644 index 00000000000..03eba69ff2b --- /dev/null +++ b/tests/modules/nf-core/cellpose/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CELLPOSE } from '../../../../modules/nf-core/cellpose/main.nf' + +workflow test_cellpose { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['imaging']['segmentation']['image'], checkIfExists: true) + ] + + CELLPOSE ( input ) +} diff --git a/tests/modules/nf-core/cellpose/nextflow.config b/tests/modules/nf-core/cellpose/nextflow.config new file mode 100644 index 00000000000..2da7c1de0d8 --- /dev/null +++ b/tests/modules/nf-core/cellpose/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: "CELLPOSE" { + ext.args = '--pretrained_model nuclei --diameter 9 --channel_axis 0 --no_npy' + } + +} diff --git a/tests/modules/nf-core/cellpose/test.yml b/tests/modules/nf-core/cellpose/test.yml new file mode 100644 index 00000000000..5f9940915f1 --- /dev/null +++ b/tests/modules/nf-core/cellpose/test.yml @@ -0,0 +1,8 @@ +- name: cellpose test_cellpose + command: nextflow run ./tests/modules/nf-core/cellpose -entry test_cellpose -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/cellpose/nextflow.config + tags: + - cellpose + files: + - path: output/cellpose/cycif_tonsil_registered.ome_cp_masks.tif + md5sum: 1e35e4dc39d1f6ca6e9394675bf688a8 + - path: output/cellpose/versions.yml From d629f06adcee25aa36806aa4b5f422c6aed63e7d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 31 Mar 2023 08:33:25 +0200 Subject: [PATCH 024/120] bump snapaligner (#3230) --- modules/nf-core/snapaligner/align/main.nf | 6 +++--- modules/nf-core/snapaligner/index/main.nf | 6 +++--- tests/modules/nf-core/snapaligner/align/test.yml | 12 ++++++------ tests/modules/nf-core/snapaligner/index/test.yml | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/nf-core/snapaligner/align/main.nf b/modules/nf-core/snapaligner/align/main.nf index 2a07dfeeb35..bfd4e32284b 100644 --- a/modules/nf-core/snapaligner/align/main.nf +++ b/modules/nf-core/snapaligner/align/main.nf @@ -2,10 +2,10 @@ process SNAPALIGNER_ALIGN { tag "$meta.id" label 'process_high' - conda "bioconda::snap-aligner=2.0.2" + conda "bioconda::snap-aligner=2.0.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/snap-aligner:2.0.2--hd03093a_0': - 'quay.io/biocontainers/snap-aligner:2.0.2--hd03093a_0' }" + 'https://depot.galaxyproject.org/singularity/snap-aligner:2.0.3--hd03093a_0': + 'quay.io/biocontainers/snap-aligner:2.0.3--hd03093a_0' }" input: tuple val(meta) , path(reads, stageAs: "?/*") diff --git a/modules/nf-core/snapaligner/index/main.nf b/modules/nf-core/snapaligner/index/main.nf index 1878dbd3f5f..535a293104b 100644 --- a/modules/nf-core/snapaligner/index/main.nf +++ b/modules/nf-core/snapaligner/index/main.nf @@ -2,10 +2,10 @@ process SNAPALIGNER_INDEX { tag "$fasta" label 'process_high' - conda "bioconda::snap-aligner=2.0.2" + conda "bioconda::snap-aligner=2.0.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/snap-aligner:2.0.2--hd03093a_0': - 'quay.io/biocontainers/snap-aligner:2.0.2--hd03093a_0' }" + 'https://depot.galaxyproject.org/singularity/snap-aligner:2.0.3--hd03093a_0': + 'quay.io/biocontainers/snap-aligner:2.0.3--hd03093a_0' }" input: tuple val(meta), path(fasta), path(altcontigfile), path(nonaltcontigfile), path(altliftoverfile) diff --git a/tests/modules/nf-core/snapaligner/align/test.yml b/tests/modules/nf-core/snapaligner/align/test.yml index 2c51b9b7829..5fb78c0f5ce 100644 --- a/tests/modules/nf-core/snapaligner/align/test.yml +++ b/tests/modules/nf-core/snapaligner/align/test.yml @@ -1,23 +1,23 @@ - name: snapaligner align test_snapaligner_single command: nextflow run ./tests/modules/nf-core/snapaligner/align -entry test_snapaligner_single -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/snapaligner/align/nextflow.config tags: - - snapaligner - snapaligner/align + - snapaligner files: - path: output/snapaligner/test.bam - md5sum: 72f5ba2dbc015f914fddc963d9185ed6 + md5sum: ca1c2472d7fd405edd7d8edebc7a2373 - path: output/snapaligner/test.bam.bai - md5sum: c97d4d0e2a00864916eaea95b039cbf9 + md5sum: c46eb41ccbca7a9a9a8522e44c2cd490 - path: output/snapaligner/versions.yml - name: snapaligner align test_snapaligner_paired command: nextflow run ./tests/modules/nf-core/snapaligner/align -entry test_snapaligner_paired -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/snapaligner/align/nextflow.config tags: - - snapaligner - snapaligner/align + - snapaligner files: - path: output/snapaligner/test.bam - md5sum: f9a98af4f70745654202de81b12faeef + md5sum: 7fef4ace398a5e5060ae54d4466c1503 - path: output/snapaligner/test.bam.bai - md5sum: cd256b73dd8bc0f351a128c0a0b2f7c5 + md5sum: d5979aec0109084091150ceb4d87d351 - path: output/snapaligner/versions.yml diff --git a/tests/modules/nf-core/snapaligner/index/test.yml b/tests/modules/nf-core/snapaligner/index/test.yml index 43898e069c8..8b4303d8ab8 100644 --- a/tests/modules/nf-core/snapaligner/index/test.yml +++ b/tests/modules/nf-core/snapaligner/index/test.yml @@ -1,8 +1,8 @@ - name: snapaligner index test_snapaligner_index - command: nextflow run ./tests/modules/nf-core/snapaligner/index -entry test_snapaligner_index -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/snapaligner/index -entry test_snapaligner_index -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/snapaligner/index/nextflow.config tags: - - snapaligner/index - snapaligner + - snapaligner/index files: - path: output/snapaligner/snap/Genome md5sum: 7e189c954142ba37460332b467e34ed4 From 5ee907315e37c266938a2589be968e6db3c5aa70 Mon Sep 17 00:00:00 2001 From: Ben Siranosian Date: Fri, 31 Mar 2023 01:22:50 -0700 Subject: [PATCH 025/120] feat: add parabricks/applybsqr (#2934) * feat: initial commmit of parabricks/fq2bam functionality * fix: update container in parabricks/fq2bam doc * fix: stub run, fix formatting * fix: whitespace * fix: syntax --------- Co-authored-by: Maxime U Garcia --- modules/nf-core/parabricks/applybqsr/main.nf | 64 +++++++++++++++++++ modules/nf-core/parabricks/applybqsr/meta.yml | 62 ++++++++++++++++++ modules/nf-core/parabricks/fq2bam/meta.yml | 2 +- tests/config/pytest_modules.yml | 5 ++ .../nf-core/parabricks/applybqsr/main.nf | 39 +++++++++++ .../parabricks/applybqsr/nextflow.config | 5 ++ .../nf-core/parabricks/applybqsr/test.yml | 21 ++++++ .../parabricks/applybqsr/test_GPU_config.txt | 9 +++ 8 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 modules/nf-core/parabricks/applybqsr/main.nf create mode 100644 modules/nf-core/parabricks/applybqsr/meta.yml create mode 100644 tests/modules/nf-core/parabricks/applybqsr/main.nf create mode 100644 tests/modules/nf-core/parabricks/applybqsr/nextflow.config create mode 100644 tests/modules/nf-core/parabricks/applybqsr/test.yml create mode 100644 tests/modules/nf-core/parabricks/applybqsr/test_GPU_config.txt diff --git a/modules/nf-core/parabricks/applybqsr/main.nf b/modules/nf-core/parabricks/applybqsr/main.nf new file mode 100644 index 00000000000..3ebf5926b6a --- /dev/null +++ b/modules/nf-core/parabricks/applybqsr/main.nf @@ -0,0 +1,64 @@ +process PARABRICKS_APPLYBQSR { + tag "$meta.id" + label 'process_high' + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead." + } + + container "nvcr.io/nvidia/clara/clara-parabricks:4.0.1-1" + + input: + tuple val(meta), path(bam), path(bam_index), path(bqsr_table), path(intervals) + tuple val(meta2), path(fasta) + + output: + tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.bai"), emit: bai + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def interval_command = intervals ? intervals.collect{"--interval-file $it"}.join(' ') : "" + def copy_index_command = bam_index ? "cp -L $bam_index `readlink -f $bam`.bai" : "" + """ + # parabricks complains when index is not a regular file in the same directory as the bam + # copy the index to this path. + $copy_index_command + + pbrun \\ + applybqsr \\ + --ref $fasta \\ + --in-bam $bam \\ + --in-recal-file $bqsr_table \\ + $interval_command \\ + --out-bam ${prefix}.bam \\ + --num-threads $task.cpus \\ + --num-gpus $task.accelerator.request \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pbrun: \$(echo \$(pbrun version 2>&1) | sed 's/^Please.* //' ) + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def interval_command = intervals ? intervals.collect{"--interval-file $it"}.join(' ') : "" + """ + touch ${prefix}.bam + touch ${prefix}.bam.bai + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pbrun: \$(echo \$(pbrun version 2>&1) | sed 's/^Please.* //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/parabricks/applybqsr/meta.yml b/modules/nf-core/parabricks/applybqsr/meta.yml new file mode 100644 index 00000000000..48a38c09057 --- /dev/null +++ b/modules/nf-core/parabricks/applybqsr/meta.yml @@ -0,0 +1,62 @@ +name: "parabricks_applybqsr" +description: NVIDIA Clara Parabricks GPU-accelerated apply Base Quality Score Recalibration (BQSR). +keywords: + - bqsr + - bam +tools: + - "parabricks": + description: "NVIDIA Clara Parabricks GPU-accelerated genomics tools" + homepage: "https://www.nvidia.com/en-us/clara/genomics/" + documentation: "https://docs.nvidia.com/clara/parabricks/4.0.1/Documentation/" + tool_dev_url: "" + doi: "" + licence: "custom" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information. + e.g. [ id:'test' ] + - input: + type: file + description: bam file for sample to be variant called. + pattern: "*.bam" + - input_index: + type: file + description: bai index corresponding to input bam file. Only necessary if intervals are provided. + pattern: "*.bai" + - bqsr_table: + type: file + description: Table from calculating BQSR. Output from parabricks/fq2bam or gatk4/baserecalibrator. + pattern: "*.table" + - interval_file: + type: file + description: File or files containing genomic intervals for use in base quality score recalibration. + pattern: "*.{bed,interval_list,picard,list,intervals}" + - fasta: + type: file + description: Reference fasta - must be unzipped. + pattern: "*.fasta" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information. + e.g. [ id:'test' ] + - versions: + type: file + description: File containing software versions. + pattern: "versions.yml" + - bam: + type: file + description: BAM file after applying BQSR. + pattern: "*.bam" + - bai: + type: file + description: bai index corresponding to output bam file. + pattern: "*.bai" + +authors: + - "@bsiranosian" diff --git a/modules/nf-core/parabricks/fq2bam/meta.yml b/modules/nf-core/parabricks/fq2bam/meta.yml index 577eb89f5d5..55c972dc627 100644 --- a/modules/nf-core/parabricks/fq2bam/meta.yml +++ b/modules/nf-core/parabricks/fq2bam/meta.yml @@ -9,7 +9,7 @@ tools: - "parabricks": description: "NVIDIA Clara Parabricks GPU-accelerated genomics tools" homepage: "https://www.nvidia.com/en-us/clara/genomics/" - documentation: "https://docs.nvidia.com/clara/parabricks/4.0.0/Documentation/" + documentation: "https://docs.nvidia.com/clara/parabricks/4.0.1/Documentation/" tool_dev_url: "" doi: "" licence: "custom" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 9c28236b0e1..8c7a090a4ce 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2395,6 +2395,11 @@ parabricks/fq2bam: - modules/nf-core/parabricks/fq2bam/** - tests/modules/nf-core/parabricks/fq2bam/** +# GitHub Actions doesn't support GPUs, so stub +parabricks/applybqsr: + - modules/nf-core/parabricks/applybqsr/** + - tests/modules/nf-core/parabricks/applybqsr/** + paraclu: - modules/nf-core/paraclu/** - tests/modules/nf-core/paraclu/** diff --git a/tests/modules/nf-core/parabricks/applybqsr/main.nf b/tests/modules/nf-core/parabricks/applybqsr/main.nf new file mode 100644 index 00000000000..8da248632f8 --- /dev/null +++ b/tests/modules/nf-core/parabricks/applybqsr/main.nf @@ -0,0 +1,39 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PARABRICKS_APPLYBQSR } from '../../../../../modules/nf-core/parabricks/applybqsr/main.nf' + +workflow test_parabricks_applybqsr { + + input = [ + [ id:'test'], + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + [], // index not needed unless using intervals + file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true), + [] + ] + fasta = [ + [ id:'test'], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + PARABRICKS_APPLYBQSR ( input, fasta ) +} + +workflow test_parabricks_applybqsr_intervals { + + input = [ + [ id:'test'], + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + ] + fasta = [ + [ id:'test'], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + PARABRICKS_APPLYBQSR ( input, fasta ) +} diff --git a/tests/modules/nf-core/parabricks/applybqsr/nextflow.config b/tests/modules/nf-core/parabricks/applybqsr/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/parabricks/applybqsr/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/parabricks/applybqsr/test.yml b/tests/modules/nf-core/parabricks/applybqsr/test.yml new file mode 100644 index 00000000000..11c821cae01 --- /dev/null +++ b/tests/modules/nf-core/parabricks/applybqsr/test.yml @@ -0,0 +1,21 @@ +- name: parabricks applybqsr test_parabricks_applybqsr + command: nextflow run ./tests/modules/nf-core/parabricks/applybqsr/ -entry test_parabricks_applybqsr -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/parabricks/applybqsr/nextflow.config -stub-run + tags: + - parabricks/applybqsr + - parabricks + files: + - path: output/parabricks/test.bam + should_exist: true + - path: output/parabricks/test.bam.bai + should_exist: true + +- name: parabricks applybqsr test_parabricks_applybqsr_intervals + command: nextflow run ./tests/modules/nf-core/parabricks/applybqsr/ -entry test_parabricks_applybqsr_intervals -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/parabricks/applybqsr/nextflow.config -stub-run + tags: + - parabricks/applybqsr + - parabricks + files: + - path: output/parabricks/test.bam + should_exist: true + - path: output/parabricks/test.bam.bai + should_exist: true diff --git a/tests/modules/nf-core/parabricks/applybqsr/test_GPU_config.txt b/tests/modules/nf-core/parabricks/applybqsr/test_GPU_config.txt new file mode 100644 index 00000000000..093a8b1afd1 --- /dev/null +++ b/tests/modules/nf-core/parabricks/applybqsr/test_GPU_config.txt @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + memory = "15 GB" + cpus = 4 + accelerator = 1 +} +docker.runOptions = "--gpus all" +singularity.runOptions = "--nv" \ No newline at end of file From b89a69c5b1f2d6c30747e861aa7ae5c3ea4ee024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Narc=C4=B1?= Date: Fri, 31 Mar 2023 13:05:41 +0200 Subject: [PATCH 026/120] 2807 new module svtyper (#3225) * initial * module implemented and tested * Update test.yml * version fixed * Update modules/nf-core/svtyper/svtyper/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Update modules/nf-core/svtyper/svtyper/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Update modules/nf-core/svtyper/svtyper/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Update modules/nf-core/svtyper/svtyper/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Update meta.yml * Update main.nf * Update main.nf * [automated] Fix linting with Prettier * Update main.nf * Update meta.yml * Update main.nf * Update test.yml * Update modules/nf-core/svtyper/svtyper/main.nf Co-authored-by: Maxime U Garcia * Update modules/nf-core/svtyper/svtyper/main.nf Co-authored-by: Maxime U Garcia * updated * svtyper version 0.7.0 --------- Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Co-authored-by: nf-core-bot Co-authored-by: Maxime U Garcia --- modules/nf-core/svtyper/svtyper/main.nf | 58 ++++++++++++++++ modules/nf-core/svtyper/svtyper/meta.yml | 66 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/svtyper/svtyper/main.nf | 25 +++++++ .../nf-core/svtyper/svtyper/nextflow.config | 6 ++ .../modules/nf-core/svtyper/svtyper/test.yml | 13 ++++ 6 files changed, 172 insertions(+) create mode 100644 modules/nf-core/svtyper/svtyper/main.nf create mode 100644 modules/nf-core/svtyper/svtyper/meta.yml create mode 100644 tests/modules/nf-core/svtyper/svtyper/main.nf create mode 100644 tests/modules/nf-core/svtyper/svtyper/nextflow.config create mode 100644 tests/modules/nf-core/svtyper/svtyper/test.yml diff --git a/modules/nf-core/svtyper/svtyper/main.nf b/modules/nf-core/svtyper/svtyper/main.nf new file mode 100644 index 00000000000..8c388cf38a9 --- /dev/null +++ b/modules/nf-core/svtyper/svtyper/main.nf @@ -0,0 +1,58 @@ +process SVTYPER_SVTYPER { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::svtyper=0.7.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/svtyper:0.7.0--py27h24bf2e0_1': + 'quay.io/biocontainers/svtyper:0.7.0--py27h24bf2e0_1' }" + + input: + tuple val(meta), path(bam), path(bam_index), path(vcf) + tuple val(meta2), path(fasta) + tuple val(meta2), path(fai) + + output: + tuple val(meta), path("*.json"), emit: json + tuple val(meta), path("*.vcf") , emit: gt_vcf + tuple val(meta), path("*.bam") , emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def vcf = vcf ? "--input_vcf ${vcf}" : "" + if ("$vcf" == "${prefix}.vcf") error "Input and output names are the same, set prefix in module configuration to disambiguate!" + if ("$bam" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!" + + """ + svtyper \\ + $vcf \\ + --bam $bam \\ + --lib_info ${prefix}.json \\ + --output_vcf ${prefix}.vcf \\ + --ref_fasta $fasta \\ + --write_alignment ${prefix}.bam \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + svtyper: \$(echo \$(svtyper -h 2>&1 | grep "version:" | sed 's/^version: v//')) + END_VERSIONS + """ + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.json + touch ${prefix}.vcf + touch ${prefix}.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + svtyper: \$(echo \$(svtyper -h 2>&1 | grep "version:" | sed 's/^version: v//')) + END_VERSIONS + """ +} diff --git a/modules/nf-core/svtyper/svtyper/meta.yml b/modules/nf-core/svtyper/svtyper/meta.yml new file mode 100644 index 00000000000..fddeb843fee --- /dev/null +++ b/modules/nf-core/svtyper/svtyper/meta.yml @@ -0,0 +1,66 @@ +name: "svtyper_svtyper" +description: SVTyper performs breakpoint genotyping of structural variants (SVs) using whole genome sequencing data +keywords: + - sv + - structural variants + - genotyping +tools: + - "svtyper": + description: "Compute genotype of structural variants based on breakpoint depth" + homepage: "https://github.com/hall-lab/svtyper" + documentation: " https://github.com/hall-lab/svtyper" + tool_dev_url: "https://github.com/hall-lab/svtyper" + doi: "doi:10.1038/nmeth.3505" + licence: "['MIT']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - meta2: + type: map + description: | + Groovy Map containing sample information for FASTA file + e.g. [ id:'fasta'] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - vcf: + type: file + description: Matching VCF of alignments + pattern: "*.vcf" + - fasta: + type: file + description: FASTA file used to generate alignments + pattern: "*.{fa,fasta}" + - fai: + type: file + description: FAI file used to generate alignments + pattern: "*.{fai}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - json: + type: file + description: JSON file including Library information + pattern: "*.json" + - gt_vcf: + type: file + description: Genotyped SVs + pattern: "*.vcf" + - relevant_bam: + type: file + description: Relevant alignments + pattern: "*.bam" +authors: + - "@kubranarci" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 8c7a090a4ce..fdef9817421 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3433,6 +3433,10 @@ svtk/vcf2bed: - modules/nf-core/svtk/vcf2bed/** - tests/modules/nf-core/svtk/vcf2bed/** +svtyper/svtyper: + - modules/nf-core/svtyper/svtyper/** + - tests/modules/nf-core/svtyper/svtyper/** + tabix/bgzip: - modules/nf-core/tabix/bgzip/** - tests/modules/nf-core/tabix/bgzip/** diff --git a/tests/modules/nf-core/svtyper/svtyper/main.nf b/tests/modules/nf-core/svtyper/svtyper/main.nf new file mode 100644 index 00000000000..33a21d16b3c --- /dev/null +++ b/tests/modules/nf-core/svtyper/svtyper/main.nf @@ -0,0 +1,25 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SVTYPER_SVTYPER } from '../../../../../modules/nf-core/svtyper/svtyper/main.nf' + + +workflow test_svtyper_svtyper { + fa = [ + [id:"ref"], + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + ] + fai = [ + [id:"ref"], + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + ] + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true) + ] + + SVTYPER_SVTYPER ( input, fa, fai ) +} diff --git a/tests/modules/nf-core/svtyper/svtyper/nextflow.config b/tests/modules/nf-core/svtyper/svtyper/nextflow.config new file mode 100644 index 00000000000..6d85453e533 --- /dev/null +++ b/tests/modules/nf-core/svtyper/svtyper/nextflow.config @@ -0,0 +1,6 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + +} diff --git a/tests/modules/nf-core/svtyper/svtyper/test.yml b/tests/modules/nf-core/svtyper/svtyper/test.yml new file mode 100644 index 00000000000..0f1cca1ccfe --- /dev/null +++ b/tests/modules/nf-core/svtyper/svtyper/test.yml @@ -0,0 +1,13 @@ +- name: svtyper svtyper test_svtyper_svtyper + command: nextflow run ./tests/modules/nf-core/svtyper/svtyper -entry test_svtyper_svtyper -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/svtyper/svtyper/nextflow.config + tags: + - svtyper + - svtyper/svtyper + files: + - path: output/svtyper/test.bam + md5sum: fd8be50a3a684180bc1224380cc25f4f + - path: output/svtyper/test.json + md5sum: eb817fcba642335bdc9dd0e55cd3bad5 + - path: output/svtyper/test.vcf + md5sum: 5025b4bff3db5c819d962a318a6d176a + - path: output/svtyper/versions.yml From c0c79f6f8f027f75262a797525713178de4b60e7 Mon Sep 17 00:00:00 2001 From: "Miguel A. Ibarra-Arellano" Date: Fri, 31 Mar 2023 13:31:10 +0200 Subject: [PATCH 027/120] Deepcell - Mesmer segmentation for tissues (#3187) * start process of adding mesmer as an nf-core tool * close but not enough * test works * works with optional arguments * new tests * pass test with membrane channel * passes all test, move to sub module * add deepcell/mesmer conda exception * Add test_data link * Passes docker test * Fix typo * [automated] Fix linting with Prettier * Answered review comments. * Update tests/modules/nf-core/deepcell/mesmer/main.nf Co-authored-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> * Fixed resolving issues. * Fixed linting error. * Revert to explicitly calling python. --------- Co-authored-by: nf-core-bot Co-authored-by: Florian Wuennemann Co-authored-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> --- .github/workflows/pytest-workflow.yml | 2 + modules/nf-core/deepcell/mesmer/main.nf | 39 +++++++++++++++ modules/nf-core/deepcell/mesmer/meta.yml | 49 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/config/test_data.config | 2 +- tests/modules/nf-core/deepcell/mesmer/main.nf | 15 ++++++ .../nf-core/deepcell/mesmer/nextflow.config | 12 +++++ .../modules/nf-core/deepcell/mesmer/test.yml | 9 ++++ 8 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 modules/nf-core/deepcell/mesmer/main.nf create mode 100644 modules/nf-core/deepcell/mesmer/meta.yml create mode 100644 tests/modules/nf-core/deepcell/mesmer/main.nf create mode 100644 tests/modules/nf-core/deepcell/mesmer/nextflow.config create mode 100644 tests/modules/nf-core/deepcell/mesmer/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 6701a64e368..d4efa3dd665 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -58,6 +58,8 @@ jobs: tags: cellranger/mkgtf - profile: "conda" tags: cellranger/mkref + - profile: "conda" + tags: deepcell/mesmer - profile: "conda" tags: deepvariant - profile: "conda" diff --git a/modules/nf-core/deepcell/mesmer/main.nf b/modules/nf-core/deepcell/mesmer/main.nf new file mode 100644 index 00000000000..f3c02f687b7 --- /dev/null +++ b/modules/nf-core/deepcell/mesmer/main.nf @@ -0,0 +1,39 @@ +process DEEPCELL_MESMER { + tag "$meta.id" + label 'process_single' + + container "vanvalenlab/deepcell-applications:0.4.0" + + input: + tuple val(meta) , path(img) + tuple val(meta2), path(membrane_img) + + // Output a .tif image, don't touch versions + output: + tuple val(meta), path("mask.tif"), emit: mask + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def membrane_command = membrane_img ? "--membrane-image $membrane_img" : "" + def VERSION = "0.4.0" + + """ + python /usr/src/app/run_app.py mesmer \ + --squeeze \ + --nuclear-image $img \ + --output-directory . \ + --output-name mask.tif \ + $membrane_command \ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deepcell_mesmer:: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/deepcell/mesmer/meta.yml b/modules/nf-core/deepcell/mesmer/meta.yml new file mode 100644 index 00000000000..c4c7715869a --- /dev/null +++ b/modules/nf-core/deepcell/mesmer/meta.yml @@ -0,0 +1,49 @@ +name: "deepcell_mesmer" +description: Deepcell/mesmer segmentation for whole-cell +keywords: + - imaging + - spatial_omics + - segmentation +tools: + - "mesmer": + description: "Deep cell is a collection of tools to segment imaging data" + homepage: "https://github.com/vanvalenlab/deepcell-tf" + documentation: "https://github.com/vanvalenlab/intro-to-deepcell/tree/master/pretrained_models" + tool_dev_url: "https://githu/b.com/vanvalenlab/deepcell-tf" + doi: "https://doi.org/10.1038/s41587-021-01094-0" + licence: "APACHE2" + +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + # We always need to have an image of the tissue. (That's the whole point fo cell segmentation) + - img: + type: file + description: Multichannel image file + pattern: "*.{tiff,tif,h5,hdf5}" + +output: + #Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + # + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - mask: + type: file + description: File containing the mask. + pattern: "*.{tif, tiff}" + +authors: + - "@migueLib" + - "@chiarasch" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index fdef9817421..fcca78cb186 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -858,6 +858,10 @@ deepbgc/pipeline: - modules/nf-core/deepbgc/pipeline/** - tests/modules/nf-core/deepbgc/pipeline/** +deepcell/mesmer: + - modules/nf-core/deepcell/mesmer/** + - tests/modules/nf-core/deepcell/mesmer/** + deeptools/bamcoverage: - modules/nf-core/deeptools/bamcoverage/** - tests/modules/nf-core/deeptools/bamcoverage/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index c701b985ffe..c2de3b57d4c 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -231,7 +231,7 @@ params { vep_cache = "${params.test_data_base}/data/genomics/homo_sapiens/genome/vep.tar.gz" affy_array_samplesheet = "${params.test_data_base}/data/genomics/homo_sapiens/array_expression/GSE38751.csv" affy_array_celfiles_tar = "${params.test_data_base}/data/genomics/homo_sapiens/array_expression/GSE38751_RAW.tar" - + } 'pangenome' { pangenome_fa = "${params.test_data_base}/data/pangenomics/homo_sapiens/pangenome.fa" diff --git a/tests/modules/nf-core/deepcell/mesmer/main.nf b/tests/modules/nf-core/deepcell/mesmer/main.nf new file mode 100644 index 00000000000..62fdca1ee2a --- /dev/null +++ b/tests/modules/nf-core/deepcell/mesmer/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { DEEPCELL_MESMER } from '../../../../../modules/nf-core/deepcell/mesmer/main.nf' + +workflow test_deepcell_mesmer { + + img = [ + [ id:'test_img'], // meta map + file(params.test_data['imaging']['segmentation']['image'], checkIfExists: true) + ] + + DEEPCELL_MESMER ( img, [[:],[]]) +} diff --git a/tests/modules/nf-core/deepcell/mesmer/nextflow.config b/tests/modules/nf-core/deepcell/mesmer/nextflow.config new file mode 100644 index 00000000000..37d70a3a89c --- /dev/null +++ b/tests/modules/nf-core/deepcell/mesmer/nextflow.config @@ -0,0 +1,12 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: "DEEPCELL_MESMER" { + ext.args = '--image-mpp=0.65 --compartment=whole-cell --nuclear-channel 0 --membrane-channel 1' + } + +} + +docker.runOptions = '--entrypoint ""' +singularity.runOptions = '-B "$HOME"' diff --git a/tests/modules/nf-core/deepcell/mesmer/test.yml b/tests/modules/nf-core/deepcell/mesmer/test.yml new file mode 100644 index 00000000000..594700e705d --- /dev/null +++ b/tests/modules/nf-core/deepcell/mesmer/test.yml @@ -0,0 +1,9 @@ +- name: deepcell mesmer test_deepcell_mesmer + command: nextflow run ./tests/modules/nf-core/deepcell/mesmer -entry test_deepcell_mesmer -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/deepcell/mesmer/nextflow.config + tags: + - deepcell + - deepcell/mesmer + files: + - path: output/deepcell/mask.tif + md5sum: 1550535389bd24d4ea4a8288502b0afa + - path: output/deepcell/versions.yml From 7578eb938f900a6643b35261bfe130e983c4e6d4 Mon Sep 17 00:00:00 2001 From: LaurenceKuhl Date: Fri, 31 Mar 2023 13:47:23 +0200 Subject: [PATCH 028/120] new module: crisprcleanr (#3197) * Adding crisprcleanR * adding the crisprcleanr in the pytest_modules * Update modules/nf-core/crisprcleanr/meta.yml Co-authored-by: Jonathan Manning * Update modules/nf-core/crisprcleanr/meta.yml Co-authored-by: Jonathan Manning * Update modules/nf-core/crisprcleanr/main.nf Co-authored-by: Jonathan Manning * update the test_data.config * rename library to library_file * Moved modules to a submodules (normalize) * try to fix the versions.yml? * Adding the nextflow.config..... * fixed everything i broke because i changed the submodule name.. * Fix the pytest_modules and ran linting * Remove depracated parameter * Remove the mdsum computation so that it passes with conda * Ran prettier * Revert to first commit to see if it removes all the mods of test_data * Copy pasted the test_data.config from the main branch from the nf-core repo and added my few lines * Align the emits and modify meta.id to prefix, add check for the version file --------- Co-authored-by: Jonathan Manning --- .../nf-core/crisprcleanr/normalize/main.nf | 52 +++++++++++++++++++ .../nf-core/crisprcleanr/normalize/meta.yml | 48 +++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/config/test_data.config | 25 ++++----- .../nf-core/crisprcleanr/normalize/main.nf | 15 ++++++ .../crisprcleanr/normalize/nextflow.config | 5 ++ .../nf-core/crisprcleanr/normalize/test.yml | 10 ++++ 7 files changed, 147 insertions(+), 12 deletions(-) create mode 100644 modules/nf-core/crisprcleanr/normalize/main.nf create mode 100644 modules/nf-core/crisprcleanr/normalize/meta.yml create mode 100644 tests/modules/nf-core/crisprcleanr/normalize/main.nf create mode 100644 tests/modules/nf-core/crisprcleanr/normalize/nextflow.config create mode 100644 tests/modules/nf-core/crisprcleanr/normalize/test.yml diff --git a/modules/nf-core/crisprcleanr/normalize/main.nf b/modules/nf-core/crisprcleanr/normalize/main.nf new file mode 100644 index 00000000000..9cf0f0ea256 --- /dev/null +++ b/modules/nf-core/crisprcleanr/normalize/main.nf @@ -0,0 +1,52 @@ +process CRISPRCLEANR_NORMALIZE { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::r-crisprcleanr=3.0.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/r-crisprcleanr:3.0.0--r42hdfd78af_1': + 'quay.io/biocontainers/r-crisprcleanr:3.0.0--r42hdfd78af_1' }" + + input: + tuple val(meta), path(count_file), path(library_file) + val(min_reads) + val(min_targeted_genes) + + output: + tuple val(meta), path("*_norm_table.tsv"), emit: norm_count_file + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + #!/usr/bin/env Rscript + library(CRISPRcleanR) + library <- read.delim('${library_file}', header=T,sep="\t") + row.names(library) <- library[["CODE"]] + normANDfcs <- ccr.NormfoldChanges('${count_file}',saveToFig = FALSE,min_reads=${min_reads},EXPname='${meta.id}', libraryAnnotation=library,display=FALSE) + gwSortedFCs <- ccr.logFCs2chromPos(normANDfcs[["logFCs"]],library) + correctedFCs <- ccr.GWclean(gwSortedFCs,display=FALSE,label='${meta.id}') + correctedCounts <- ccr.correctCounts('${meta.id}', + normANDfcs[["norm_counts"]], + correctedFCs, + library, + minTargetedGenes=${min_targeted_genes}, + OutDir='./') + + write.table(correctedCounts, file=paste0("${prefix}","_norm_table.tsv"),row.names=FALSE,quote=FALSE,sep="\t") + + version_file_path <- "versions.yml" + version_crisprcleanr <- paste(unlist(packageVersion("CRISPRcleanR")), collapse = ".") + f <- file(version_file_path, "w") + writeLines('"${task.process}":', f) + writeLines(" crisprcleanr: ", f, sep = "") + writeLines(version_crisprcleanr, f) + close(f) + + """ +} diff --git a/modules/nf-core/crisprcleanr/normalize/meta.yml b/modules/nf-core/crisprcleanr/normalize/meta.yml new file mode 100644 index 00000000000..aea1dfb611b --- /dev/null +++ b/modules/nf-core/crisprcleanr/normalize/meta.yml @@ -0,0 +1,48 @@ +name: "crisprcleanr_normalize" +description: remove false positives of functional crispr genomics due to CNVs +keywords: + - sort + - CNV + - correction + - CRISPR +tools: + - "crisprcleanr": + description: "Analysis of CRISPR functional genomics, remove false positive due to CNVs." + homepage: "https://github.com/francescojm/CRISPRcleanR" + documentation: "https://github.com/francescojm/CRISPRcleanR/blob/master/Quick_start.pdf" + tool_dev_url: "https://github.com/francescojm/CRISPRcleanR/tree/v3.0.0" + doi: "https://doi.org/10.1186/s12864-018-4989-y" + licence: "['MIT']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - count_file: + type: file + description: sgRNA raw counts + pattern: "*.tsv" + - library_file: + type: file + description: sgRNA library + pattern: "*.tsv" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - norm_count_file: + type: file + description: normalized count file + pattern: "*.tsv" + +authors: + - "@LaurenceKuhl" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index fcca78cb186..b97fc068225 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -774,6 +774,10 @@ cooler/zoomify: - modules/nf-core/cooler/zoomify/** - tests/modules/nf-core/cooler/zoomify/** +crisprcleanr/normalize: + - modules/nf-core/crisprcleanr/normalize/** + - tests/modules/nf-core/crisprcleanr/normalize/** + coreograph: - modules/nf-core/coreograph/** - tests/modules/nf-core/coreograph/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index c2de3b57d4c..05917aa6367 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -226,7 +226,8 @@ params { vcfanno_toml = "${params.test_data_base}/data/genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno.toml" prg_input = "${params.test_data_base}/data/genomics/homo_sapiens/genome/PRG_test.zip" - + crispr_functional_counts = "${params.test_data_base}/data/genomics/homo_sapiens/genome/tsv/functional_genomics_counts.tsv" + crispr_functional_library = "${params.test_data_base}/data/genomics/homo_sapiens/genome/tsv/library_functional_genomics.tsv" vep_cache = "${params.test_data_base}/data/genomics/homo_sapiens/genome/vep.tar.gz" affy_array_samplesheet = "${params.test_data_base}/data/genomics/homo_sapiens/array_expression/GSE38751.csv" @@ -570,27 +571,27 @@ params { plant_wga_pixel_class = "${params.test_data_base}/data/imaging/ilp/plant_wga.pixel_prob.ilp" } 'tiff' { - mouse_heart_wga = "${params.test_data_base}/data/imaging/tiff/mindagap.mouse_heart.wga.tiff" + mouse_heart_wga = "${params.test_data_base}/data/imaging/tiff/mindagap.mouse_heart.wga.tiff" } 'ome-tiff' { - cycif_tonsil_channels = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-channels.csv" - cycif_tonsil_cycle1 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif" - cycif_tonsil_cycle2 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle2.ome.tif" - cycif_tonsil_cycle3 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle3.ome.tif" + cycif_tonsil_channels = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-channels.csv" + cycif_tonsil_cycle1 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif" + cycif_tonsil_cycle2 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle2.ome.tif" + cycif_tonsil_cycle3 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle3.ome.tif" } 'registration' { - markers = "${params.test_data_base}/data/imaging/registration/markers.csv" - cycle1 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif" - cycle2 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle2.ome.tif" + markers = "${params.test_data_base}/data/imaging/registration/markers.csv" + cycle1 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif" + cycle2 = "${params.test_data_base}/data/imaging/ome-tiff/cycif-tonsil-cycle2.ome.tif" } 'segmentation' { - markers = "${params.test_data_base}/data/imaging/segmentation/markers.csv" - image = "${params.test_data_base}/data/imaging/segmentation/cycif_tonsil_registered.ome.tif" + markers = "${params.test_data_base}/data/imaging/segmentation/markers.csv" + image = "${params.test_data_base}/data/imaging/segmentation/cycif_tonsil_registered.ome.tif" } 'quantification' { markers = "${params.test_data_base}/data/imaging/quantification/markers.csv" image = "${params.test_data_base}/data/imaging/quantification/cycif_tonsil_registered.ome.tif" - mask = "${params.test_data_base}/data/imaging/quantification/cell.ome.tif" + mask = "${params.test_data_base}/data/imaging/quantification/cell.ome.tif" } 'downstream' { markers = "${params.test_data_base}/data/imaging/downstream/markers.csv" diff --git a/tests/modules/nf-core/crisprcleanr/normalize/main.nf b/tests/modules/nf-core/crisprcleanr/normalize/main.nf new file mode 100644 index 00000000000..1ccbd2d3bc3 --- /dev/null +++ b/tests/modules/nf-core/crisprcleanr/normalize/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CRISPRCLEANR_NORMALIZE } from '../../../../../modules/nf-core/crisprcleanr/normalize/main.nf' +workflow test_crisprcleanr_normalize { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['genome']['crispr_functional_counts'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['crispr_functional_library'], checkIfExists: true) + ] + + CRISPRCLEANR_NORMALIZE ( input, 30, 5) +} diff --git a/tests/modules/nf-core/crisprcleanr/normalize/nextflow.config b/tests/modules/nf-core/crisprcleanr/normalize/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/crisprcleanr/normalize/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/crisprcleanr/normalize/test.yml b/tests/modules/nf-core/crisprcleanr/normalize/test.yml new file mode 100644 index 00000000000..6560aa28873 --- /dev/null +++ b/tests/modules/nf-core/crisprcleanr/normalize/test.yml @@ -0,0 +1,10 @@ +- name: crisprcleanr normalize test_crisprcleanr_normalize + command: nextflow run ./tests/modules/nf-core/crisprcleanr/normalize -entry test_crisprcleanr_normalize -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/crisprcleanr/normalize/nextflow.config + tags: + - crisprcleanr + - crisprcleanr/normalize + files: + - path: output/crisprcleanr/test_norm_table.tsv + contains: + - "sgRNA" + - path: output/crisprcleanr/versions.yml From 0367c23758d83fc6973a8cd35ecba40a0cfcf2af Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:06:23 +0200 Subject: [PATCH 029/120] fix tiddit sv (#3231) update regex --- modules/nf-core/tiddit/sv/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/tiddit/sv/main.nf b/modules/nf-core/tiddit/sv/main.nf index 45f9588a9ed..27b6450a732 100644 --- a/modules/nf-core/tiddit/sv/main.nf +++ b/modules/nf-core/tiddit/sv/main.nf @@ -23,7 +23,7 @@ process TIDDIT_SV { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def bwa_command = bwa_index ? "[[ -d $bwa_index ]] && for i in $bwa_index/*; do [[ -f $fasta && ! \"\$i\" =~ .*\"$fasta\".* ]] && ln -s \$i ${fasta}.\${i##*.} || ln -s \$i .; done" : "" + def bwa_command = bwa_index ? "[[ -d $bwa_index ]] && for i in $bwa_index/*; do [[ -f $fasta && ! \"\$i\" =~ .*\"$fasta.\".* ]] && ln -s \$i ${fasta}.\${i##*.} || ln -s \$i .; done" : "" """ $bwa_command From 497959008150b4b0df530d74941a448f8cf0d60e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kre=C5=A1imir=20Be=C5=A1tak?= <86408271+kbestak@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:27:10 +0200 Subject: [PATCH 030/120] Backsub - pixel-by-pixel channel subtraction (#3189) * First commit of the day * Second commit * merging from upstream * Adjusted versioning * Adjusted test to public data * Exclude conda test * Added stub * Quick fix for markerfile * Fixed version numbering and output name --------- Co-authored-by: Florian Wuennemann --- .github/workflows/pytest-workflow.yml | 2 + modules/nf-core/backsub/main.nf | 46 ++++++++++++ modules/nf-core/backsub/meta.yml | 73 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 + tests/modules/nf-core/backsub/main.nf | 20 +++++ tests/modules/nf-core/backsub/nextflow.config | 9 +++ tests/modules/nf-core/backsub/test.yml | 10 +++ 7 files changed, 164 insertions(+) create mode 100644 modules/nf-core/backsub/main.nf create mode 100644 modules/nf-core/backsub/meta.yml create mode 100644 tests/modules/nf-core/backsub/main.nf create mode 100644 tests/modules/nf-core/backsub/nextflow.config create mode 100644 tests/modules/nf-core/backsub/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index d4efa3dd665..cd3e7464fce 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -46,6 +46,8 @@ jobs: tags: mcquant - profile: "conda" tags: bases2fastq + - profile: "conda" + tags: backsub - profile: "conda" tags: bcl2fastq - profile: "conda" diff --git a/modules/nf-core/backsub/main.nf b/modules/nf-core/backsub/main.nf new file mode 100644 index 00000000000..2d24277677e --- /dev/null +++ b/modules/nf-core/backsub/main.nf @@ -0,0 +1,46 @@ +process BACKSUB { + tag "$meta.id" + label 'process_single' + + container "ghcr.io/schapirolabor/background_subtraction:v0.3.4" + + input: + tuple val(meta) , path(image) + tuple val(meta2), path(markerfile) + + output: + tuple val(meta), path("${prefix}.backsub.ome.tif"), emit: backsub_tif + tuple val(meta2), path("*.csv") , emit: markerout + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + """ + python3 /background_subtraction/background_sub.py \ + -o "${prefix}.backsub.ome.tif" \ + -mo markers_bs.csv \ + -r $image \ + -m $markerfile \ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + backsub: \$(python3 /background_subtraction/background_sub.py --version | sed 's/v//g') + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + """ + touch "${prefix}.backsub.ome.tif" + touch "markers_bs.csv" + cat <<-END_VERSIONS > versions.yml + "${task.process}": + backsub: \$(python3 /background_subtraction/background_sub.py --version | sed 's/v//g') + END_VERSIONS + """ +} diff --git a/modules/nf-core/backsub/meta.yml b/modules/nf-core/backsub/meta.yml new file mode 100644 index 00000000000..fedd7ddcd5f --- /dev/null +++ b/modules/nf-core/backsub/meta.yml @@ -0,0 +1,73 @@ +name: "backsub" +description: Pixel-by-pixel channel subtraction scaled by exposure times of pre-stitched `tif` images. +keywords: + - background + - cycif + - autofluorescence + - image_analysis + - mcmicro + - highly_multiplexed_imaging + +tools: + - "backsub": + description: "Module for pixel-by-pixel channel subtraction scaled by exposure times" + homepage: "https://github.com/SchapiroLabor/Background_subtraction" + documentation: "https://github.com/SchapiroLabor/Background_subtraction/blob/master/README.md" + tool_dev_url: "https://github.com/SchapiroLabor/Background_subtraction" + doi: "" + licence: "MIT licence" + +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + + - image: + type: file + description: Multi-channel image file + pattern: "*.{tif,tiff}" + + - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + + - markerfile: + type: file + description: Marker file with channel names, exposure times, and specified background to subtract (and remove to exclude channels from output) + pattern: "*.csv" + +output: + #Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - backsub_tif: + type: file + description: Background corrected pyramidal ome.tif + pattern: "*.{tif}" + + - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + + - markerout: + type: file + description: Marker file adjusted to match the background corrected image + pattern: "*.{csv}" +authors: + - "@kbestak" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index b97fc068225..9b58ed1d997 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -162,6 +162,10 @@ authentict/deam2cont: - modules/nf-core/authentict/deam2cont/** - tests/modules/nf-core/authentict/deam2cont/** +backsub: + - modules/nf-core/backsub/** + - tests/modules/nf-core/backsub/** + bakta/bakta: - modules/nf-core/bakta/bakta/** - tests/modules/nf-core/bakta/bakta/** diff --git a/tests/modules/nf-core/backsub/main.nf b/tests/modules/nf-core/backsub/main.nf new file mode 100644 index 00000000000..98197ee45e5 --- /dev/null +++ b/tests/modules/nf-core/backsub/main.nf @@ -0,0 +1,20 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BACKSUB } from '../../../../modules/nf-core/backsub/main.nf' + +workflow test_backsub { + + image = [ + [ id:'test' ], // meta map + file(params.test_data['imaging']['background_subtraction']['image'], checkIfExists: true) + ] + + markerfile = [ + [ id:'test' ], // meta map + file(params.test_data['imaging']['background_subtraction']['markers'], checkIfExists: true) + ] + + BACKSUB ( image, markerfile ) +} diff --git a/tests/modules/nf-core/backsub/nextflow.config b/tests/modules/nf-core/backsub/nextflow.config new file mode 100644 index 00000000000..b7f91f4159e --- /dev/null +++ b/tests/modules/nf-core/backsub/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: "BACKSUB" { + ext.args = '--pixel-size 0.6 --pyramid False' + } + +} diff --git a/tests/modules/nf-core/backsub/test.yml b/tests/modules/nf-core/backsub/test.yml new file mode 100644 index 00000000000..fb4dd61cc80 --- /dev/null +++ b/tests/modules/nf-core/backsub/test.yml @@ -0,0 +1,10 @@ +- name: backsub test_backsub + command: nextflow run ./tests/modules/nf-core/backsub -entry test_backsub -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/backsub/nextflow.config + tags: + - backsub + files: + - path: output/backsub/markers_bs.csv + md5sum: 28fddf3b89ed0a9b17b1f8f28e754612 + - path: output/backsub/test.backsub.ome.tif + md5sum: 2eff69d894d7ad2509695228f17b6bd1 + - path: output/backsub/versions.yml From 2d34b7ffd1e672521d5480f368028ddd1fa5ea21 Mon Sep 17 00:00:00 2001 From: Damon-Lee Pointon <51855558+DLBPointon@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:37:09 +0100 Subject: [PATCH 031/120] New Module: paftools/sam2paf (#3220) * new file: modules/nf-core/paftools/sam2paf/main.nf new file: modules/nf-core/paftools/sam2paf/meta.yml new file: tests/modules/nf-core/paftools/sam2paf/main.nf new file: tests/modules/nf-core/paftools/sam2paf/nextflow.config new file: tests/modules/nf-core/paftools/sam2paf/test.yml modified: tests/config/pytest_modules.yml * deleted: tests/modules/nf-core/paftools/sam2paf/error deleted: tests/modules/nf-core/paftools/sam2paf/out * Linting fix * fixing the pytest * Adding version output * Adding an input channel * Adding the when statement * ext.args not needed for this module --- modules/nf-core/paftools/sam2paf/main.nf | 45 +++++++++++++++++++ modules/nf-core/paftools/sam2paf/meta.yml | 39 ++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../modules/nf-core/paftools/sam2paf/main.nf | 16 +++++++ .../nf-core/paftools/sam2paf/nextflow.config | 5 +++ .../modules/nf-core/paftools/sam2paf/test.yml | 8 ++++ 6 files changed, 117 insertions(+) create mode 100644 modules/nf-core/paftools/sam2paf/main.nf create mode 100644 modules/nf-core/paftools/sam2paf/meta.yml create mode 100644 tests/modules/nf-core/paftools/sam2paf/main.nf create mode 100644 tests/modules/nf-core/paftools/sam2paf/nextflow.config create mode 100644 tests/modules/nf-core/paftools/sam2paf/test.yml diff --git a/modules/nf-core/paftools/sam2paf/main.nf b/modules/nf-core/paftools/sam2paf/main.nf new file mode 100644 index 00000000000..e881d7716ae --- /dev/null +++ b/modules/nf-core/paftools/sam2paf/main.nf @@ -0,0 +1,45 @@ +process PAFTOOLS_SAM2PAF { + tag "$meta.id" + label 'process_low' + + // Note: the versions here need to match the versions used in the mulled container below and minimap2/index + conda "bioconda::minimap2=2.24 bioconda::samtools=1.14" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' : + 'quay.io/biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), file("*.paf") , emit: paf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: "" + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + samtools view -h ${bam} | paftools.js sam2paf - > ${prefix}.paf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + paftools.js: \$(paftools.js --version) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + touch ${prefix}.paf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + paftools.js: \$(paftools.js --version) + END VERSIONS + """ +} diff --git a/modules/nf-core/paftools/sam2paf/meta.yml b/modules/nf-core/paftools/sam2paf/meta.yml new file mode 100644 index 00000000000..bc08f9a9f95 --- /dev/null +++ b/modules/nf-core/paftools/sam2paf/meta.yml @@ -0,0 +1,39 @@ +name: paftools_sam2paf +description: A program to convert bam into paf. +keywords: + - paf + - bam + - conversion +tools: + - paftools: + description: | + A program to manipulate paf files / convert to and from paf. + homepage: https://github.com/lh3/minimap2 + documentation: https://github.com/lh3/minimap2/blob/master/README.md + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: An input bam file to be converted into paf. +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - paf: + type: file + description: | + An output paf containing detailed data about the sample + pattern: "${prefix}.paf" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@DLBPointon" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 9b58ed1d997..6409d6a3865 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2367,6 +2367,10 @@ optitype: - modules/nf-core/optitype/** - tests/modules/nf-core/optitype/** +paftools/sam2paf: + - modules/nf-core/paftools/sam2paf/** + - test/modules/nf-core/paftools/sam2paf/** + pairix: - modules/nf-core/pairix/** - tests/modules/nf-core/pairix/** diff --git a/tests/modules/nf-core/paftools/sam2paf/main.nf b/tests/modules/nf-core/paftools/sam2paf/main.nf new file mode 100644 index 00000000000..f84a6f09bf3 --- /dev/null +++ b/tests/modules/nf-core/paftools/sam2paf/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 +include { PAFTOOLS_SAM2PAF } from '../../../../../modules/nf-core/paftools/sam2paf/main.nf' + +workflow test_paftools_sam2paf { + + input = [ + [id:'test'], + file(params.test_data['homo_sapiens']['scramble']['bam'], + checkIfExists: true) + ] + + PAFTOOLS_SAM2PAF ( input ) + +} diff --git a/tests/modules/nf-core/paftools/sam2paf/nextflow.config b/tests/modules/nf-core/paftools/sam2paf/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/paftools/sam2paf/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/paftools/sam2paf/test.yml b/tests/modules/nf-core/paftools/sam2paf/test.yml new file mode 100644 index 00000000000..e0ccf6e5f40 --- /dev/null +++ b/tests/modules/nf-core/paftools/sam2paf/test.yml @@ -0,0 +1,8 @@ +- name: paftools test_paftools_sam2paf + command: nextflow run main.nf -entry test_paftools_sam2paf -c ../../../../config/nextflow.config -c nextflow.config + tags: + - paftools + files: + - path: output/paftools/test.paf + md5sum: bf981d964f3ffa6feac079199e157330 + - path: output/paftools/versions.yml From 1d7cad0ad4f325d9b13ad33cb1e0d1fe45e54833 Mon Sep 17 00:00:00 2001 From: Selina Carlhoff <73653549+scarlhoff@users.noreply.github.com> Date: Fri, 31 Mar 2023 15:49:39 +0200 Subject: [PATCH 032/120] New subworkflow: bam_docounts_contamination_angsd (#3233) * started building subworkflow, needs tests * angsd contam tests for subworkflow and module * started building subworkflow, needs tests * angsd contam tests for subworkflow and module * Apply suggestions from code review * code review suggestions Co-authored-by: Thiseas C. Lamnidis --------- Co-authored-by: Thiseas C. Lamnidis --- .../bam_docounts_contamination_angsd/main.nf | 36 +++++++++++++++++ .../bam_docounts_contamination_angsd/meta.yml | 40 +++++++++++++++++++ .../nextflow.config | 7 ++++ tests/config/pytest_modules.yml | 4 ++ .../nf-core/angsd/contamination/main.nf | 4 +- .../nf-core/angsd/contamination/test.yml | 2 +- .../bam_docounts_contamination_angsd/main.nf | 31 ++++++++++++++ .../nextflow.config | 9 +++++ .../bam_docounts_contamination_angsd/test.yml | 13 ++++++ 9 files changed, 143 insertions(+), 3 deletions(-) create mode 100644 subworkflows/nf-core/bam_docounts_contamination_angsd/main.nf create mode 100644 subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml create mode 100644 subworkflows/nf-core/bam_docounts_contamination_angsd/nextflow.config create mode 100644 tests/subworkflows/nf-core/bam_docounts_contamination_angsd/main.nf create mode 100644 tests/subworkflows/nf-core/bam_docounts_contamination_angsd/nextflow.config create mode 100644 tests/subworkflows/nf-core/bam_docounts_contamination_angsd/test.yml diff --git a/subworkflows/nf-core/bam_docounts_contamination_angsd/main.nf b/subworkflows/nf-core/bam_docounts_contamination_angsd/main.nf new file mode 100644 index 00000000000..97620c3e07f --- /dev/null +++ b/subworkflows/nf-core/bam_docounts_contamination_angsd/main.nf @@ -0,0 +1,36 @@ +// +// ANGSD doCounts and contamination estimation on the X-chromosome +// + +include { ANGSD_DOCOUNTS } from '../../../modules/nf-core/angsd/docounts/main' +include { ANGSD_CONTAMINATION } from '../../../modules/nf-core/angsd/contamination/main' + +workflow BAM_DOCOUNTS_CONTAMINATION_ANGSD { + + take: + ch_bam // channel: [ val(meta), [ bam ] ] + ch_bai // channel: [ val(meta), [ bai ] ] + ch_hapmap_file // channel: [ val(meta), [ hapmap_file ] ] + + main: + ch_versions = Channel.empty() + + ch_input = ch_bam + .join( ch_bai ) + .map{ + meta, bam, bai -> + [ meta, bam, bai, [] ] + } + + ANGSD_DOCOUNTS ( ch_input ) + ch_versions = ch_versions.mix(ANGSD_DOCOUNTS.out.versions.first()) + ch_icounts = ANGSD_DOCOUNTS.out.icounts + + ANGSD_CONTAMINATION ( ch_icounts, ch_hapmap_file ) + ch_versions = ch_versions.mix(ANGSD_CONTAMINATION.out.versions.first()) + + emit: + txt = ANGSD_CONTAMINATION.out.txt // channel: [ val(meta), [ txt ] ] + versions = ch_versions // channel: [ path(versions.yml) ] +} + diff --git a/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml b/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml new file mode 100644 index 00000000000..844537c6d2d --- /dev/null +++ b/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml @@ -0,0 +1,40 @@ +name: "bam_docounts_contamination_angsd" +description: Calculate contamination of the X-chromosome with ANGSD +keywords: + - angsd + - bam + - contamination + - docounts +modules: + - angsd/docounts + - angsd/contamination +input: + - meta: + type: map + description: | + Groovy Map containing sample information + - bam: + type: file + description: BAM or CRAM file + pattern: "*.{bam,cram}" + - bai: + type: file + description: BAM/SAM samtools index + pattern: "*.{bai,csi}" + - hapmap_file: + type: +output: + - meta: + type: map + description: | + Groovy Map containing sample information + - txt: + type: file + description: Contamination estimation file + pattern: "*.txt" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@scarlhoff" diff --git a/subworkflows/nf-core/bam_docounts_contamination_angsd/nextflow.config b/subworkflows/nf-core/bam_docounts_contamination_angsd/nextflow.config new file mode 100644 index 00000000000..b50c5039a5d --- /dev/null +++ b/subworkflows/nf-core/bam_docounts_contamination_angsd/nextflow.config @@ -0,0 +1,7 @@ +process { + + withName: ANGSD_DOCOUNTS { + ext.args = "-iCounts 1" + } + +} diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 6409d6a3865..b4307612e6c 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3249,6 +3249,10 @@ subworkflows/bam_dedup_stats_samtools_umitools: - subworkflows/nf-core/bam_dedup_stats_samtools_umitools/** - tests/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/** +subworkflows/bam_docounts_contamination_angsd: + - subworkflows/nf-core/bam_docounts_contamination_angsd/** + - tests/subworkflows/nf-core/bam_docounts_contamination_angsd/** + subworkflows/bam_markduplicates_picard: - subworkflows/nf-core/bam_markduplicates_picard/** - tests/subworkflows/nf-core/bam_markduplicates_picard/** diff --git a/tests/modules/nf-core/angsd/contamination/main.nf b/tests/modules/nf-core/angsd/contamination/main.nf index a96362b0f31..2c2b528090c 100644 --- a/tests/modules/nf-core/angsd/contamination/main.nf +++ b/tests/modules/nf-core/angsd/contamination/main.nf @@ -6,7 +6,7 @@ include { ANGSD_CONTAMINATION } from '../../../../../modules/nf-core/angsd/conta include { ANGSD_DOCOUNTS } from '../../../../../modules/nf-core/angsd/docounts/main.nf' workflow test_angsd_contamination { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_markduplicates_sorted_bam'], checkIfExists: true), @@ -14,7 +14,7 @@ workflow test_angsd_contamination { [] ] - hapmap_file = [ [id:'test2'], file("https://github.com/jbv2/nf-core-test-datasets/raw/modules/data/delete_me/angsd/HapMapChrX.gz")] + hapmap_file = [ [id:'test2'], file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/angsd/HapMapChrX.gz")] ANGSD_DOCOUNTS ( input ) ANGSD_CONTAMINATION ( ANGSD_DOCOUNTS.out.icounts, hapmap_file ) diff --git a/tests/modules/nf-core/angsd/contamination/test.yml b/tests/modules/nf-core/angsd/contamination/test.yml index 7679727f9be..63f63b0cdc2 100644 --- a/tests/modules/nf-core/angsd/contamination/test.yml +++ b/tests/modules/nf-core/angsd/contamination/test.yml @@ -1,8 +1,8 @@ - name: angsd contamination test_angsd_contamination command: nextflow run ./tests/modules/nf-core/angsd/contamination -entry test_angsd_contamination -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/angsd/contamination/nextflow.config tags: - - angsd/contamination - angsd + - angsd/contamination files: - path: output/angsd/test.txt contains: diff --git a/tests/subworkflows/nf-core/bam_docounts_contamination_angsd/main.nf b/tests/subworkflows/nf-core/bam_docounts_contamination_angsd/main.nf new file mode 100644 index 00000000000..853a2f55809 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_docounts_contamination_angsd/main.nf @@ -0,0 +1,31 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BAM_DOCOUNTS_CONTAMINATION_ANGSD } from '../../../../subworkflows/nf-core/bam_docounts_contamination_angsd/main.nf' + +workflow test_bam_docounts_contamination_angsd { + + input = [ + [ + [ id:'test', single_end: false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_markduplicates_sorted_bam'], checkIfExists: true) + ] + ] + + bai = [ + [ + [ id:'test', single_end: false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_markduplicates_sorted_bam_bai'], checkIfExists: true) + ] + ] + + hapmap_file = [ + [ + [ id:'test2' ], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/angsd/HapMapChrX.gz", checkIfExists: true) + ] + ] + + BAM_DOCOUNTS_CONTAMINATION_ANGSD ( Channel.fromList(input), Channel.fromList(bai), Channel.fromList(hapmap_file) ) +} diff --git a/tests/subworkflows/nf-core/bam_docounts_contamination_angsd/nextflow.config b/tests/subworkflows/nf-core/bam_docounts_contamination_angsd/nextflow.config new file mode 100644 index 00000000000..ea05d229e81 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_docounts_contamination_angsd/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: ANGSD_DOCOUNTS { + ext.args = "-iCounts 1" + } + +} diff --git a/tests/subworkflows/nf-core/bam_docounts_contamination_angsd/test.yml b/tests/subworkflows/nf-core/bam_docounts_contamination_angsd/test.yml new file mode 100644 index 00000000000..dba6ae3b0e3 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_docounts_contamination_angsd/test.yml @@ -0,0 +1,13 @@ +- name: bam_docounts_contamination_angsd test_bam_docounts_contamination_angsd + command: nextflow run ./tests/subworkflows/nf-core/bam_docounts_contamination_angsd -entry test_bam_docounts_contamination_angsd -c ./tests/config/nextflow.config + tags: + - angsd + - angsd/contamination + - angsd/docounts + - subworkflows + - subworkflows/bam_docounts_contamination_angsd + files: + - path: output/angsd/test.txt + contains: + - "Method1: old_llh" + - "Method2: old_llh" From cf2ac696baab513367a02b9542e39a232fad47b8 Mon Sep 17 00:00:00 2001 From: paulwolk <60699553+paulwolk@users.noreply.github.com> Date: Fri, 31 Mar 2023 16:37:09 +0200 Subject: [PATCH 033/120] add module: nanocomp (#3171) * init nanocomp * fix tests for nanocomp module * modify tests * [automated] Fix linting with Prettier * fix nanocomp tests * remove tag * remove verbose from nanocomb process * added meta to nanocomp input & output * detect input filetype automatically * updated input pattern in nanocomp meta.yml * more detailed process output & stub for nanocomp * shorter channel emit names * fix eclint check * added possibility to add prefix for nanocomp * meta id instead of empty string for prefix, delete forgotten debug print * run prettier * add prefix to test --------- Co-authored-by: nf-core-bot --- modules/nf-core/nanocomp/main.nf | 137 ++++++++++++++++++ modules/nf-core/nanocomp/meta.yml | 107 ++++++++++++++ tests/config/pytest_modules.yml | 4 + tests/modules/nf-core/nanocomp/main.nf | 16 ++ .../modules/nf-core/nanocomp/nextflow.config | 5 + tests/modules/nf-core/nanocomp/test.yml | 94 ++++++++++++ 6 files changed, 363 insertions(+) create mode 100755 modules/nf-core/nanocomp/main.nf create mode 100755 modules/nf-core/nanocomp/meta.yml create mode 100755 tests/modules/nf-core/nanocomp/main.nf create mode 100644 tests/modules/nf-core/nanocomp/nextflow.config create mode 100755 tests/modules/nf-core/nanocomp/test.yml diff --git a/modules/nf-core/nanocomp/main.nf b/modules/nf-core/nanocomp/main.nf new file mode 100755 index 00000000000..7d261b05e0b --- /dev/null +++ b/modules/nf-core/nanocomp/main.nf @@ -0,0 +1,137 @@ +process NANOCOMP { + label 'process_medium' + + conda "bioconda:nanocomp=1.21.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/nanocomp:1.21.0--pyhdfd78af_0': + 'quay.io/biocontainers/nanocomp:1.21.0--pyhdfd78af_0' }" + + input: + tuple val(meta), path(filelist) + + output: + tuple val(meta), path("*NanoComp-report.html"), emit: report_html + tuple val(meta), path("*NanoComp_lengths_violin.html"), emit: lengths_violin_html + tuple val(meta), path("*NanoComp_log_length_violin.html"), emit: log_length_violin_html + tuple val(meta), path("*NanoComp_N50.html"), emit: n50_html + tuple val(meta), path("*NanoComp_number_of_reads.html"), emit: number_of_reads_html + tuple val(meta), path("*NanoComp_OverlayHistogram.html"), emit: overlay_histogram_html + tuple val(meta), path("*NanoComp_OverlayHistogram_Normalized.html"), emit: overlay_histogram_normalized_html + tuple val(meta), path("*NanoComp_OverlayLogHistogram.html"), emit: overlay_log_histogram_html + tuple val(meta), path("*NanoComp_OverlayLogHistogram_Normalized.html"), emit: overlay_log_histogram_normalized_html + tuple val(meta), path("*NanoComp_total_throughput.html"), emit: total_throughput_html + tuple val(meta), path("*NanoComp_quals_violin.html"), emit: quals_violin_html, optional: true + tuple val(meta), path("*NanoComp_OverlayHistogram_Identity.html"), emit: overlay_histogram_identity_html, optional: true + tuple val(meta), path("*NanoComp_OverlayHistogram_PhredScore.html"), emit: overlay_histogram_phredscore_html, optional: true + tuple val(meta), path("*NanoComp_percentIdentity_violin.html"), emit: percent_identity_violin_html, optional: true + tuple val(meta), path("*NanoComp_ActivePoresOverTime.html"), emit: active_pores_over_time_html, optional: true + tuple val(meta), path("*NanoComp_CumulativeYieldPlot_Gigabases.html"), emit: cumulative_yield_plot_gigabases_html, optional: true + tuple val(meta), path("*NanoComp_sequencing_speed_over_time.html"), emit: sequencing_speed_over_time_html, optional: true + tuple val(meta), path("*NanoStats.txt"), emit: stats_txt + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + if (prefix == ""){ + prefixflag = "" + } else { + prefixflag = "--prefix " + prefix + } + + //determine input file type + filetypes = [] + for (file in filelist){ + tokenized_filename = file.getName().tokenize('.') + if (tokenized_filename.size() < 2){ + throw new java.lang.IndexOutOfBoundsException("Every input file to nanocomp has to have a file ending.") + } + + first_namepart = true + extension_found = false + + for (namepart in tokenized_filename){ + if (namepart == ""){ + continue + } + + // prevent the file name to be seen as extension + if (first_namepart == true){ + first_namepart = false + continue + } + + if (["fq","fastq"].contains(namepart)){ + filetypes.add("fastq") + extension_found = true + break + } else if (["fasta", "fna", "ffn", "faa", "frn", "fa"].contains(namepart)) { + filetypes.add("fasta") + extension_found = true + break + } else if (namepart == "bam") { + filetypes.add("bam") + extension_found = true + break + } else if (namepart == "txt") { + filetypes.add("summary") + extension_found = true + break + } + } + + if (extension_found == false){ + throw new java.lang.IllegalArgumentException("There was no suitable filetype found for " + file.getName() + + ". NanoComp only accepts fasta (fasta, fna, ffn, faa, frn, fa), fastq (fastq, fq), bam and Nanopore sequencing summary (txt).") + } + } + + filetypes.unique() + if (filetypes.size() < 1){ + throw new java.lang.IllegalArgumentException("There was no suitable filetype found in NanoComp input. Please use fasta, fastq, bam or Nanopore sequencing summary.") + } + if (filetypes.size() > 1){ + throw new java.lang.IllegalArgumentException("You gave different filetypes to NanoComp. Please use only *one* of fasta, fastq, bam or Nanopore sequencing summary.") + } + filetype = filetypes[0] + + """ + NanoComp \\ + --$filetype $filelist \\ + --threads $task.cpus \\ + $prefixflag \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + nanocomp: \$(echo \$(NanoComp --version 2>&1) | sed 's/^.*NanoComp //; s/Using.*\$//' )) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch versions.yml + touch "${prefix}"NanoComp_lengths_violin.html + touch "${prefix}"NanoComp_log_length_violin.html + touch "${prefix}"NanoComp_N50.html + touch "${prefix}"NanoComp_number_of_reads.html + touch "${prefix}"NanoComp_OverlayHistogram.html + touch "${prefix}"NanoComp_OverlayHistogram_Normalized.html + touch "${prefix}"NanoComp_OverlayLogHistogram.html + touch "${prefix}"NanoComp_OverlayLogHistogram_Normalized.html + touch "${prefix}"NanoComp-report.html + touch "${prefix}"NanoComp_total_throughput.html + touch "${prefix}"NanoComp_quals_violin.html + touch "${prefix}"NanoComp_OverlayHistogram_Identity.html + touch "${prefix}"NanoComp_OverlayHistogram_PhredScore.html + touch "${prefix}"NanoComp_percentIdentity_violin.html + touch "${prefix}"NanoComp_ActivePoresOverTime.html + touch "${prefix}"NanoComp_CumulativeYieldPlot_Gigabases.html + touch "${prefix}"NanoComp_sequencing_speed_over_time.html + touch "${prefix}"NanoStats.txt + """ +} diff --git a/modules/nf-core/nanocomp/meta.yml b/modules/nf-core/nanocomp/meta.yml new file mode 100755 index 00000000000..dbd2b261f82 --- /dev/null +++ b/modules/nf-core/nanocomp/meta.yml @@ -0,0 +1,107 @@ +name: "nanocomp" +description: Compare multiple runs of long read sequencing data and alignments +keywords: + - bam + - fasta + - fastq + - qc + - nanopore +tools: + - "nanocomp": + description: "Compare multiple runs of long read sequencing data and alignments" + homepage: "https://github.com/wdecoster/nanocomp" + documentation: "https://github.com/wdecoster/nanocomp" + licence: "MIT License" + +input: + - meta: + type: map + description: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - filelist: + type: file + description: List of all the files you want to compare, they have to be all the same filetype (either fastq, fasta, bam or Nanopore sequencing summary) + pattern: "*.{fastq,fq,fna,ffn,faa,frn,fa,fasta,txt,bam}" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - meta: + type: map + description: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - report_html: + type: file + description: Summary of all collected statistics + pattern: "*NanoComp-report.html" + - lengths_violin_html: + type: file + description: Violin plot of the sequence lengths + pattern: "*NanoComp_lengths_violin.html" + - log_length_violin_html: + type: file + description: Violin plot of the sequence lengths, log function applied + pattern: "*NanoComp_log_length_violin.html" + - n50_html: + type: file + description: Bar plot of N50 sequence length per sample + pattern: "*NanoComp_N50.html" + - number_of_reads_html: + type: file + description: Bar plot of number of reads per sample + pattern: "*NanoComp_number_of_reads.html" + - overlay_histogram_html: + type: file + description: Histogram of all read lengths per sample + pattern: "*NanoComp_OverlayHistogram.html" + - overlay_histogram_normalized_html: + type: file + description: Normalized histogram of all read lengths per sample + pattern: "*NanoComp_OverlayHistogram_Normalized.html" + - overlay_log_histogram_html: + type: file + description: Histogram of all read lengths per sample, log function applied + pattern: "*NanoComp_OverlayLogHistogram.html" + - overlay_log_histogram_normalized_html: + type: file + description: Normalized histogram of all read lengths per sample, log function applied + pattern: "*NanoComp_OverlayLogHistogram_Normalized.html" + - total_throughput_html: + type: file + description: Barplot comparing throughput in bases + pattern: "*NanoComp_total_throughput.html" + - quals_violin_html: + type: file + description: Violin plot of base qualities, only for bam, fastq and sequencing summary input + pattern: "*NanoComp_quals_violin.html" + - overlay_histogram_identity_html: + type: file + description: Histogram of perfect reference identity, only for bam input + pattern: "*NanoComp_OverlayHistogram_Identity.html" + - overlay_histogram_phredscore_html: + type: file + description: Histogram of phred scores, only for bam input + pattern: "*NanoComp_OverlayHistogram_PhredScore.html" + - percent_identity_violin_html: + type: file + description: Violin plot comparing perfect reference identity, only for bam input + pattern: "*NanoComp_percentIdentity_violin.html" + - active_pores_over_time_html: + type: file + description: Scatter plot of active pores over time, only for sequencing summary input + pattern: "*NanoComp_ActivePoresOverTime.html" + - cumulative_yield_plot_gigabases_html: + type: file + description: Scatter plot of cumulative yield, only for sequencing summary input + pattern: "*NanoComp_CumulativeYieldPlot_Gigabases.html" + - sequencing_speed_over_time_html: + type: file + description: Scatter plot of sequencing speed over time, only for sequencing summary input + pattern: "*NanoComp_sequencing_speed_over_time.html" + - stats_txt: + type: file + description: txt file with basic statistics + pattern: "*NanoStats.txt" + +authors: + - "@paulwolk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index b4307612e6c..2ceee40a201 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2283,6 +2283,10 @@ mykrobe/predict: - modules/nf-core/mykrobe/predict/** - tests/modules/nf-core/mykrobe/predict/** +nanocomp: + - modules/nf-core/nanocomp/** + - tests/modules/nf-core/nanocomp/** + nanolyse: - modules/nf-core/nanolyse/** - tests/modules/nf-core/nanolyse/** diff --git a/tests/modules/nf-core/nanocomp/main.nf b/tests/modules/nf-core/nanocomp/main.nf new file mode 100755 index 00000000000..da2530accb3 --- /dev/null +++ b/tests/modules/nf-core/nanocomp/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { NANOCOMP } from '../../../../modules/nf-core/nanocomp/main.nf' + +workflow test_nanocomp_fastq { + + input = [[id: "test_"],[file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true)]] + NANOCOMP ( input ) +} + +workflow test_nanocomp_summary { + input = [[id: "test_"],[file(params.test_data['sarscov2']['nanopore']['test_sequencing_summary'], checkIfExists: true)]] + NANOCOMP ( input ) +} \ No newline at end of file diff --git a/tests/modules/nf-core/nanocomp/nextflow.config b/tests/modules/nf-core/nanocomp/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/nanocomp/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/nanocomp/test.yml b/tests/modules/nf-core/nanocomp/test.yml new file mode 100755 index 00000000000..a96866b451a --- /dev/null +++ b/tests/modules/nf-core/nanocomp/test.yml @@ -0,0 +1,94 @@ +- name: nanocomp test_nanocomp_fastq + command: nextflow run ./tests/modules/nf-core/nanocomp -entry test_nanocomp_fastq -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/nanocomp/nextflow.config + tags: + - nanocomp + files: + - path: output/nanocomp/test_NanoComp-report.html + contains: + - "NanoComp Report" + - path: output/nanocomp/test_NanoComp_N50.html + contains: + - "Comparing read length N50" + - path: output/nanocomp/test_NanoComp_OverlayHistogram.html + contains: + - "Histogram of read lengths" + - path: output/nanocomp/test_NanoComp_OverlayHistogram_Normalized.html + contains: + - "Normalized histogram of read lengths" + - path: output/nanocomp/test_NanoComp_OverlayLogHistogram.html + contains: + - "Histogram of log transformed read lengths" + - path: output/nanocomp/test_NanoComp_OverlayLogHistogram_Normalized.html + contains: + - "Normalized histogram of log transformed read lengths" + - path: output/nanocomp/test_NanoComp_lengths_violin.html + contains: + - "Comparing read length" + - path: output/nanocomp/test_NanoComp_log_length_violin.html + contains: + - "Comparing log-transformed read length" + - path: output/nanocomp/test_NanoComp_number_of_reads.html + contains: + - "Comparing number of reads" + - path: output/nanocomp/test_NanoComp_quals_violin.html + contains: + - "Comparing average base call quality score" + - path: output/nanocomp/test_NanoComp_total_throughput.html + contains: + - "Comparing throughput in bases" + - path: output/nanocomp/test_NanoStats.txt + contains: + - "General summary" + - path: output/nanocomp/versions.yml + +- name: nanocomp test_nanocomp_summary + command: nextflow run ./tests/modules/nf-core/nanocomp -entry test_nanocomp_summary -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/nanocomp/nextflow.config + tags: + - nanocomp + files: + - path: output/nanocomp/test_NanoComp-report.html + contains: + - "NanoComp Report" + - path: output/nanocomp/test_NanoComp_ActivePoresOverTime.html + contains: + - "Active pores over time" + - path: output/nanocomp/test_NanoComp_CumulativeYieldPlot_Gigabases.html + contains: + - "Cumulative yield" + - path: output/nanocomp/test_NanoComp_N50.html + contains: + - "Comparing read length N50" + - path: output/nanocomp/test_NanoComp_OverlayHistogram.html + contains: + - "Histogram of read lengths" + - path: output/nanocomp/test_NanoComp_OverlayHistogram_Normalized.html + contains: + - "Normalized histogram of read lengths" + - path: output/nanocomp/test_NanoComp_OverlayLogHistogram.html + contains: + - "Histogram of log transformed read lengths" + - path: output/nanocomp/test_NanoComp_OverlayLogHistogram_Normalized.html + contains: + - "Normalized histogram of log transformed read lengths" + - path: output/nanocomp/test_NanoComp_lengths_violin.html + contains: + - "Comparing read length" + - path: output/nanocomp/test_NanoComp_log_length_violin.html + contains: + - "Comparing log-transformed read length" + - path: output/nanocomp/test_NanoComp_number_of_reads.html + contains: + - "Comparing number of reads" + - path: output/nanocomp/test_NanoComp_quals_violin.html + contains: + - "Comparing average base call quality score" + - path: output/nanocomp/test_NanoComp_sequencing_speed_over_time.html + contains: + - "Sequencing speed over time" + - path: output/nanocomp/test_NanoComp_total_throughput.html + contains: + - "Comparing throughput in bases" + - path: output/nanocomp/test_NanoStats.txt + contains: + - "General summary" + - path: output/nanocomp/versions.yml From d33e1ba8b6806fa096071eb515622da753a4b8e5 Mon Sep 17 00:00:00 2001 From: Damon-Lee Pointon <51855558+DLBPointon@users.noreply.github.com> Date: Fri, 31 Mar 2023 16:37:22 +0100 Subject: [PATCH 034/120] Windowmasker version fix (#3238) * Fix to version control #3236 * Fix to version control #3236 --- modules/nf-core/windowmasker/mk_counts/main.nf | 4 ++-- modules/nf-core/windowmasker/ustat/main.nf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/windowmasker/mk_counts/main.nf b/modules/nf-core/windowmasker/mk_counts/main.nf index 59f9640dd0b..c3516bc02a3 100644 --- a/modules/nf-core/windowmasker/mk_counts/main.nf +++ b/modules/nf-core/windowmasker/mk_counts/main.nf @@ -37,7 +37,7 @@ process WINDOWMASKER_MKCOUNTS { cat <<-END_VERSIONS > versions.yml "${task.process}": - windowmasker: \$(windowmasker -version-full | head -n 1) + windowmasker: \$(windowmasker -version-full | head -n 1 | sed 's/^.*windowmasker: //; s/ .*\$//') END_VERSIONS """ @@ -49,7 +49,7 @@ process WINDOWMASKER_MKCOUNTS { cat <<-END_VERSIONS > versions.yml "${task.process}": - windowmasker: \$(windowmasker -version-full | head -n 1) + windowmasker: \$(windowmasker -version-full | head -n 1 | sed 's/^.*windowmasker: //; s/ .*\$//') END_VERSIONS """ } diff --git a/modules/nf-core/windowmasker/ustat/main.nf b/modules/nf-core/windowmasker/ustat/main.nf index f7516005a2c..b288ad7b645 100644 --- a/modules/nf-core/windowmasker/ustat/main.nf +++ b/modules/nf-core/windowmasker/ustat/main.nf @@ -41,7 +41,7 @@ process WINDOWMASKER_USTAT { cat <<-END_VERSIONS > versions.yml "${task.process}": - windowmasker: \$(windowmasker -version-full | head -n 1) + windowmasker: \$(windowmasker -version-full | head -n 1 | sed 's/^.*windowmasker: //; s/ .*\$//') END_VERSIONS """ @@ -63,7 +63,7 @@ process WINDOWMASKER_USTAT { cat <<-END_VERSIONS > versions.yml "${task.process}": - windowmasker: \$(windowmasker -version-full | head -n 1) + windowmasker: \$(windowmasker -version-full | head -n 1 | sed 's/^.*windowmasker: //; s/ .*\$//') END_VERSIONS """ } From c41e911bf1b23931bc38f9204872d2eada604921 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Fri, 31 Mar 2023 16:50:44 +0100 Subject: [PATCH 035/120] Bump shinyngs versions, add minor fixes to shinyngs/app module (#3227) * Bump shinyngs version * Add contrast_stats_assay to test args * Bump shinyngs version * Update md5sum for shinyngs/app * Set tag correctly * Revert shinyngs for static exploratory until I resolve libicui18n.so.58 issue * Fix secrets usage instructions * Shinyngs again- maybe the new docker container will work for exploratory too * revert exploratory again due to libicui18n.so.58 issue --- modules/nf-core/shinyngs/app/main.nf | 13 +++++++------ modules/nf-core/shinyngs/staticdifferential/main.nf | 6 +++--- .../nf-core/shinyngs/validatefomcomponents/main.nf | 6 +++--- tests/modules/nf-core/shinyngs/app/main.nf | 8 ++++++-- tests/modules/nf-core/shinyngs/app/test.yml | 6 ++++-- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/modules/nf-core/shinyngs/app/main.nf b/modules/nf-core/shinyngs/app/main.nf index 2e361a1de36..67aa04c2b2f 100644 --- a/modules/nf-core/shinyngs/app/main.nf +++ b/modules/nf-core/shinyngs/app/main.nf @@ -1,6 +1,6 @@ process SHINYNGS_APP { - tag '$sample' + tag "$meta.id" label 'process_single' // To be able to pass the necessary secrets for shinyapps.io deployment, @@ -8,20 +8,20 @@ process SHINYNGS_APP { // following in the nextflow.config: // // withName: SHINYNGS_APP { - // secret 'SHINYAPPS_TOKEN' - // secret 'SHINYAPPS_SECRET + // secret = [ 'SHINYAPPS_TOKEN', 'SHINYAPPS_SECRET' ] // } // // Those values must then be set in your Nextflow secrets. - conda "bioconda::r-shinyngs=1.3.2" + conda "bioconda::r-shinyngs=1.6.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs%3A1.3.2--r41hdfd78af_0': - 'quay.io/biocontainers/r-shinyngs:1.3.2--r41hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.6.0--r42hdfd78af_1': + 'quay.io/biocontainers/r-shinyngs:1.6.0--r42hdfd78af_1' }" input: tuple val(meta), path(sample), path(feature_meta), path(assay_files) // Experiment-level info tuple val(meta2), path(contrasts), path(differential_results) // Differential info: contrasts and differential stats + val(contrast_stats_assay) output: tuple val(meta), path("*/data.rds"), path("*/app.R") , emit: app @@ -42,6 +42,7 @@ process SHINYNGS_APP { --feature_metadata $feature_meta \\ --assay_files ${assay_files.join(',')} \\ --contrast_file $contrasts \\ + --contrast_stats_assay $contrast_stats_assay \\ --differential_results ${differential_results.join(',')} \\ --output_dir $prefix \\ $args \\ diff --git a/modules/nf-core/shinyngs/staticdifferential/main.nf b/modules/nf-core/shinyngs/staticdifferential/main.nf index f6ab21573a6..1f9604c31a4 100644 --- a/modules/nf-core/shinyngs/staticdifferential/main.nf +++ b/modules/nf-core/shinyngs/staticdifferential/main.nf @@ -2,10 +2,10 @@ process SHINYNGS_STATICDIFFERENTIAL { tag "$meta.id" label 'process_single' - conda "bioconda::r-shinyngs=1.5.9" + conda "bioconda::r-shinyngs=1.6.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.5.9--r42hdfd78af_0': - 'quay.io/biocontainers/r-shinyngs:1.5.9--r42hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.6.0--r42hdfd78af_1': + 'quay.io/biocontainers/r-shinyngs:1.6.0--r42hdfd78af_1' }" input: tuple val(meta), path(differential_result) // Differential info: contrast and differential stats diff --git a/modules/nf-core/shinyngs/validatefomcomponents/main.nf b/modules/nf-core/shinyngs/validatefomcomponents/main.nf index 0e5202eede8..8bf8edf0831 100644 --- a/modules/nf-core/shinyngs/validatefomcomponents/main.nf +++ b/modules/nf-core/shinyngs/validatefomcomponents/main.nf @@ -2,10 +2,10 @@ process SHINYNGS_VALIDATEFOMCOMPONENTS { tag "$sample" label 'process_single' - conda "bioconda::r-shinyngs=1.5.9" + conda "bioconda::r-shinyngs=1.6.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.5.9--r42hdfd78af_0': - 'quay.io/biocontainers/r-shinyngs:1.5.9--r42hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.6.0--r42hdfd78af_1': + 'quay.io/biocontainers/r-shinyngs:1.6.0--r42hdfd78af_1' }" input: tuple val(meta), path(sample), path(assay_files) diff --git a/tests/modules/nf-core/shinyngs/app/main.nf b/tests/modules/nf-core/shinyngs/app/main.nf index ad25313319c..e49ee69a08f 100644 --- a/tests/modules/nf-core/shinyngs/app/main.nf +++ b/tests/modules/nf-core/shinyngs/app/main.nf @@ -22,10 +22,12 @@ workflow test_shinyngs_app_multi_matrix { expression_differential = file(params.test_data['mus_musculus']['genome']['deseq_results'], checkIfExists: true) expression_differential.copyTo('second_contrast_stats.tsv') second_contrast_stats = file('second_contrast_stats.tsv') + contrast_stats_assay = Channel.value(1) SHINYNGS_APP ( [ [ "id":"SRP254919" ], expression_sample_sheet, expression_feature_meta, [ raw_expression_matrix_file, normalised_expression_matrix_file ] ], - [ [ "id":"SRP254919" ], expression_contrasts, [ expression_differential, second_contrast_stats ] ] + [ [ "id":"SRP254919" ], expression_contrasts, [ expression_differential, second_contrast_stats ] ], + contrast_stats_assay ) } @@ -42,10 +44,12 @@ workflow test_shinyngs_app_single_matrix { expression_differential = file(params.test_data['mus_musculus']['genome']['deseq_results'], checkIfExists: true) expression_differential.copyTo('second_contrast_stats.tsv') second_contrast_stats = file('second_contrast_stats.tsv') + contrast_stats_assay = Channel.value(1) SHINYNGS_APP ( [ [ "id":"SRP254919" ], expression_sample_sheet, expression_feature_meta, [ expression_matrix_file ] ], - [ [ "id":"SRP254919" ], expression_contrasts, [ expression_differential, second_contrast_stats ] ] + [ [ "id":"SRP254919" ], expression_contrasts, [ expression_differential, second_contrast_stats ] ], + contrast_stats_assay ) } diff --git a/tests/modules/nf-core/shinyngs/app/test.yml b/tests/modules/nf-core/shinyngs/app/test.yml index 3d4ac3b77a3..a5c0ad67781 100644 --- a/tests/modules/nf-core/shinyngs/app/test.yml +++ b/tests/modules/nf-core/shinyngs/app/test.yml @@ -7,7 +7,8 @@ - path: output/shinyngs/SRP254919/app.R md5sum: bedcfc45b6cdcc2b8fe3627987e2b17a - path: output/shinyngs/SRP254919/data.rds - md5sum: bc88bef6d652863349fbb351000374c6 + md5sum: 0586736611a66cc0dc784d378b87b050 + - path: output/shinyngs/versions.yml - name: shinyngs app test_shinyngs_app_single_matrix command: nextflow run ./tests/modules/nf-core/shinyngs/app -entry test_shinyngs_app_single_matrix -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/shinyngs/app/nextflow.config @@ -18,4 +19,5 @@ - path: output/shinyngs/SRP254919/app.R md5sum: bedcfc45b6cdcc2b8fe3627987e2b17a - path: output/shinyngs/SRP254919/data.rds - md5sum: a8a925ba74623961d22b9d3b13fbfe43 + md5sum: 0dc671ba12f2d69723a9adb40d1f1bfa + - path: output/shinyngs/versions.yml From 64f51d7635f83826d54af7ce208c55d1bd934e93 Mon Sep 17 00:00:00 2001 From: Florian Wuennemann Date: Sat, 1 Apr 2023 13:25:05 +0200 Subject: [PATCH 036/120] Cellpose fix metayml (#3241) * Fixed meta.yml and optional input file. * Added optional description for model file. * Fixed error in meta.yml --- modules/nf-core/cellpose/main.nf | 5 ++++- modules/nf-core/cellpose/meta.yml | 7 +++---- tests/modules/nf-core/cellpose/main.nf | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/nf-core/cellpose/main.nf b/modules/nf-core/cellpose/main.nf index a0925a9ab51..849cdd7fac6 100644 --- a/modules/nf-core/cellpose/main.nf +++ b/modules/nf-core/cellpose/main.nf @@ -10,6 +10,7 @@ process CELLPOSE { input: tuple val(meta), path(image) + path(model) output: tuple val(meta), path("*masks.tif"), emit: mask @@ -21,12 +22,14 @@ process CELLPOSE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION='2.1.1' + def model_command = model ? "--pretrained_model $model" : "" + def VERSION = '2.1.1' """ cellpose \ --image_path $image \ --save_tif \ --verbose \ + $model_command \ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/cellpose/meta.yml b/modules/nf-core/cellpose/meta.yml index dc5c71d57af..033ea613f6b 100644 --- a/modules/nf-core/cellpose/meta.yml +++ b/modules/nf-core/cellpose/meta.yml @@ -22,9 +22,8 @@ input: description: tif file for ready for segmentation pattern: "*.{tif,tiff}" - model: - type: pretrained model from the model zoo - description: string for picking a pretrained model - pattern: "{nuclei,cyto,cyto2,tissuenet,tissuenet,TN1,TN2,TN3,LC1,LC2,LC3,LC4}" + type: file + description: Optional input file. Cellpose 2 model trained by user using human-in-the-loop approach. output: - meta: @@ -36,7 +35,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - image_mask: + - mask: type: tif_file description: labelled mask output from cellpose in tif format pattern: "*.{tif, tiff}" diff --git a/tests/modules/nf-core/cellpose/main.nf b/tests/modules/nf-core/cellpose/main.nf index 03eba69ff2b..58bf310c3b0 100644 --- a/tests/modules/nf-core/cellpose/main.nf +++ b/tests/modules/nf-core/cellpose/main.nf @@ -11,5 +11,5 @@ workflow test_cellpose { file(params.test_data['imaging']['segmentation']['image'], checkIfExists: true) ] - CELLPOSE ( input ) + CELLPOSE ( input, [] ) } From 00567d35852dfde7e30a707b8d2e415dfa9d5970 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Mon, 3 Apr 2023 14:23:26 +0200 Subject: [PATCH 037/120] update bcftools/annotate (#3249) * update bcftools annotate * add index * update channel structures * review suggestions --- modules/nf-core/bcftools/annotate/main.nf | 46 ++++++++++++++----- modules/nf-core/bcftools/annotate/meta.yml | 23 +++++++--- .../modules/nf-core/bcftools/annotate/main.nf | 23 ++++++---- .../nf-core/bcftools/annotate/nextflow.config | 16 +++++-- .../nf-core/bcftools/annotate/test.yml | 13 +++++- 5 files changed, 88 insertions(+), 33 deletions(-) diff --git a/modules/nf-core/bcftools/annotate/main.nf b/modules/nf-core/bcftools/annotate/main.nf index a7e0398d353..c529f2c2025 100644 --- a/modules/nf-core/bcftools/annotate/main.nf +++ b/modules/nf-core/bcftools/annotate/main.nf @@ -8,29 +8,34 @@ process BCFTOOLS_ANNOTATE { 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" input: - tuple val(meta), path(input) + tuple val(meta), path(input), path(index), path(annotations), path(annotations_index) + path(header_lines) output: - tuple val(meta), path("*_annotated.vcf.gz"), optional:true , emit: vcf - tuple val(meta), path("*_annotated.bcf") , optional:true , emit: bcf - path "versions.yml" , emit: versions + tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.gz}"), emit: vcf + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - - def matcher = input ==~ /\S+\.*vcf\.\S*/ - def output_suffix = matcher ? "vcf.gz" : "bcf" - def output_type_compressed = matcher ? "z" : "b" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def header_file = header_lines ? "--header-lines ${header_lines}" : '' + def annotations_file = annotations ? "--annotations ${annotations}" : '' + def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : + args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : + args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : + args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : + "vcf" + if ("$input" == "${prefix}.${extension}") error "Input and output names are the same, set prefix in module configuration to disambiguate!" """ bcftools \\ annotate \\ $args \\ - --output ${prefix}_annotated.${output_suffix} \\ - --output-type $output_type_compressed \\ + $annotations_file \\ + $header_file \\ + --output ${prefix}.${extension} \\ --threads $task.cpus \\ $input @@ -39,4 +44,21 @@ process BCFTOOLS_ANNOTATE { bcftools: \$( bcftools --version |& sed '1!d; s/^.*bcftools //' ) END_VERSIONS """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : + args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : + args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : + args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : + "vcf" + """ + touch ${prefix}.${extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bcftools: \$( bcftools --version |& sed '1!d; s/^.*bcftools //' ) + END_VERSIONS + """ } diff --git a/modules/nf-core/bcftools/annotate/meta.yml b/modules/nf-core/bcftools/annotate/meta.yml index afe447c1c00..60f053ea2f9 100644 --- a/modules/nf-core/bcftools/annotate/meta.yml +++ b/modules/nf-core/bcftools/annotate/meta.yml @@ -21,8 +21,21 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - input: - type: files + type: file description: Query VCF or BCF file, can be either uncompressed or compressed + - index: + type: file + description: Index of the query VCF or BCF file + - annotations: + type: file + description: Bgzip-compressed file with annotations + - annotations_index: + type: file + description: Index of the annotations file + - header_lines: + type: file + description: Contains lines to append to the output VCF header + output: - meta: type: map @@ -36,10 +49,8 @@ output: - vcf: type: file description: Compressed annotated VCF file - pattern: "*_annotated.vcf.gz" - - bcf: - type: file - description: Compressed annotated BCF file - pattern: "*_annotated.bcf" + pattern: "*{vcf,vcf.gz,bcf,bcf.gz}" + authors: - "@projectoriented" + - "@ramprasadn" diff --git a/tests/modules/nf-core/bcftools/annotate/main.nf b/tests/modules/nf-core/bcftools/annotate/main.nf index df59b6465c9..f2108a3bdd2 100644 --- a/tests/modules/nf-core/bcftools/annotate/main.nf +++ b/tests/modules/nf-core/bcftools/annotate/main.nf @@ -2,22 +2,27 @@ nextflow.enable.dsl = 2 -include { BCFTOOLS_ANNOTATE } from '../../../../../modules/nf-core/bcftools/annotate/main.nf' +include { BCFTOOLS_ANNOTATE as BCFTOOLS_ANNOTATE_VCF } from '../../../../../modules/nf-core/bcftools/annotate/main.nf' +include { BCFTOOLS_ANNOTATE as BCFTOOLS_ANNOTATE_BCF } from '../../../../../modules/nf-core/bcftools/annotate/main.nf' workflow test_bcftools_annotate_out_vcf { - input = [ - [ id:'test_compressed_vcf', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), + [],[] + ] - BCFTOOLS_ANNOTATE ( input ) + BCFTOOLS_ANNOTATE_VCF ( input, [] ) } workflow test_bcftools_annotate_out_bcf { - input = [ - [ id:'test_compressed_bcf', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_bcf'], checkIfExists: true) ] + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_bcf'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), + [],[] + ] - BCFTOOLS_ANNOTATE ( input ) + BCFTOOLS_ANNOTATE_BCF ( input, [] ) } diff --git a/tests/modules/nf-core/bcftools/annotate/nextflow.config b/tests/modules/nf-core/bcftools/annotate/nextflow.config index 2670da17ccc..7bbdca53227 100644 --- a/tests/modules/nf-core/bcftools/annotate/nextflow.config +++ b/tests/modules/nf-core/bcftools/annotate/nextflow.config @@ -1,5 +1,13 @@ process { - ext.args = "-x ID,INFO/DP,FORMAT/DP" - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file + withName: 'BCFTOOLS_ANNOTATE_VCF' { + ext.args = "-x ID,INFO/DP,FORMAT/DP --output-type v" + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + } + + withName: 'BCFTOOLS_ANNOTATE_BCF' { + ext.args = "-x ID,INFO/DP,FORMAT/DP --output-type u" + ext.prefix = { "${meta.id}_ann" } + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + } + +} diff --git a/tests/modules/nf-core/bcftools/annotate/test.yml b/tests/modules/nf-core/bcftools/annotate/test.yml index f2b776b07b7..34d54e83413 100644 --- a/tests/modules/nf-core/bcftools/annotate/test.yml +++ b/tests/modules/nf-core/bcftools/annotate/test.yml @@ -4,7 +4,7 @@ - bcftools/annotate - bcftools files: - - path: output/bcftools/test_compressed_vcf_annotated.vcf.gz + - path: output/bcftools/test.vcf - path: output/bcftools/versions.yml - name: bcftools annotate test_bcftools_annotate_out_bcf @@ -13,5 +13,14 @@ - bcftools/annotate - bcftools files: - - path: output/bcftools/test_compressed_bcf_annotated.bcf + - path: output/bcftools/test_ann.bcf + - path: output/bcftools/versions.yml + +- name: bcftools annotate test_bcftools_annotate_out_bcf_stub + command: nextflow run ./tests/modules/nf-core/bcftools/annotate -entry test_bcftools_annotate_out_bcf -c ./tests/config/nextflow.config -stub + tags: + - bcftools/annotate + - bcftools + files: + - path: output/bcftools/test_ann.bcf - path: output/bcftools/versions.yml From 2cdfcf3a921b190ff37079b1f62ae957d5e6fd0a Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Mon, 3 Apr 2023 14:40:12 +0100 Subject: [PATCH 038/120] entrezdirect/esearch test fix (#3243) --- tests/modules/nf-core/entrezdirect/esearch/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/nf-core/entrezdirect/esearch/main.nf b/tests/modules/nf-core/entrezdirect/esearch/main.nf index 4c29a0c8b25..a57727c3ffe 100644 --- a/tests/modules/nf-core/entrezdirect/esearch/main.nf +++ b/tests/modules/nf-core/entrezdirect/esearch/main.nf @@ -2,8 +2,8 @@ nextflow.enable.dsl = 2 -include { ENTREZDIRECT_ESEARCH as ENTREZDIRECT_ESEARCHP } from "../../../../modules/entrezdirect/esearch/main.nf" -include { ENTREZDIRECT_ESEARCH } from "../../../../modules/entrezdirect/esearch/main.nf" +include { ENTREZDIRECT_ESEARCH as ENTREZDIRECT_ESEARCHP } from '../../../../../modules/nf-core/entrezdirect/esearch/main.nf' +include { ENTREZDIRECT_ESEARCH } from '../../../../../modules/nf-core/entrezdirect/esearch/main.nf' // // Test with PubMed database, using date range and spell check, From 811756ecb0068a4059094341abe6f44abc0bfec5 Mon Sep 17 00:00:00 2001 From: Florian Wuennemann Date: Mon, 3 Apr 2023 16:03:48 +0200 Subject: [PATCH 039/120] Added args to main.nf (#3252) * Added args to main.nf * Fixed test-yml check. --- modules/nf-core/mcquant/main.nf | 3 ++- tests/modules/nf-core/mcquant/nextflow.config | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/mcquant/main.nf b/modules/nf-core/mcquant/main.nf index b78e87f500e..507ee3aa06f 100644 --- a/modules/nf-core/mcquant/main.nf +++ b/modules/nf-core/mcquant/main.nf @@ -26,7 +26,8 @@ process MCQUANT { --masks $mask \ --image $image \ --channel_names $markerfile \ - --output . + --output . \ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/nf-core/mcquant/nextflow.config b/tests/modules/nf-core/mcquant/nextflow.config index 50f50a7a357..fab862c47f1 100644 --- a/tests/modules/nf-core/mcquant/nextflow.config +++ b/tests/modules/nf-core/mcquant/nextflow.config @@ -1,5 +1,9 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file + + withName: "MCQUANT" { + ext.args = '--intensity_props intensity_sum' + } + +} From 2e2f8581f4d2ab4729c2b7bd5da8400b54fb8fdf Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Mon, 3 Apr 2023 16:58:44 +0200 Subject: [PATCH 040/120] Add cadd module (#3216) * add cadd * update meta.yaml * Update tests/modules/nf-core/cadd/test.yml Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update tests/modules/nf-core/cadd/test.yml Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> --------- Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/nf-core/cadd/main.nf | 55 ++++++++++++++++++++++ modules/nf-core/cadd/meta.yml | 48 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/cadd/main.nf | 15 ++++++ tests/modules/nf-core/cadd/nextflow.config | 5 ++ tests/modules/nf-core/cadd/test.yml | 7 +++ 6 files changed, 134 insertions(+) create mode 100644 modules/nf-core/cadd/main.nf create mode 100644 modules/nf-core/cadd/meta.yml create mode 100644 tests/modules/nf-core/cadd/main.nf create mode 100644 tests/modules/nf-core/cadd/nextflow.config create mode 100644 tests/modules/nf-core/cadd/test.yml diff --git a/modules/nf-core/cadd/main.nf b/modules/nf-core/cadd/main.nf new file mode 100644 index 00000000000..ce1e369dbc5 --- /dev/null +++ b/modules/nf-core/cadd/main.nf @@ -0,0 +1,55 @@ +process CADD { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::cadd-scripts=1.6 anaconda::conda=4.14.0 conda-forge::mamba=1.4.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-8d145e7b16a8ca4bf920e6ca464763df6f0a56a2:d4e457a2edecb2b10e915c01d8f46e29e236b648-0': + 'quay.io/biocontainers/mulled-v2-8d145e7b16a8ca4bf920e6ca464763df6f0a56a2:d4e457a2edecb2b10e915c01d8f46e29e236b648-0' }" + + containerOptions { + (workflow.containerEngine == 'singularity') ? + "--writable -B ${annotation_dir}:/usr/local/share/cadd-scripts-1.6-1/data/annotations" : + "--privileged -v ${annotation_dir}:/usr/local/share/cadd-scripts-1.6-1/data/annotations" + } + + input: + tuple val(meta), path(vcf) + path(annotation_dir) + + output: + tuple val(meta), path("*.tsv.gz"), emit: tsv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = "1.6" // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + """ + cadd.sh \\ + -o ${prefix}.tsv.gz \\ + $args \\ + $vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cadd: $VERSION + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = "1.6" // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + """ + touch ${prefix}.tsv.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cadd: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/cadd/meta.yml b/modules/nf-core/cadd/meta.yml new file mode 100644 index 00000000000..0dd0fb2623c --- /dev/null +++ b/modules/nf-core/cadd/meta.yml @@ -0,0 +1,48 @@ +name: "cadd" +description: CADD is a tool for scoring the deleteriousness of single nucleotide variants as well as insertion/deletions variants in the human genome. +keywords: + - cadd + - annotate +tools: + - "cadd": + description: "CADD scripts release for offline scoring" + homepage: "https://cadd.gs.washington.edu/" + documentation: "https://github.com/kircherlab/CADD-scripts/blob/master/README.md" + tool_dev_url: "https://github.com/kircherlab/CADD-scripts/" + doi: "10.1093/nar/gky1016" + licence: "['Restricted. Free for non-commercial users.']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: Input file for annotation in vcf or vcf.gz format + pattern: "*.{vcf,vcf.gz}" + - annotation_dir: + type: file + description: | + Path to folder containing the vcf files with precomputed CADD scores. + This folder contains the uncompressed files that would otherwise be in data/annotation folder as described in https://github.com/kircherlab/CADD-scripts/#manual-installation. + pattern: "*.{vcf,vcf.gz}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - tsv: + type: file + description: Annotated tsv file + pattern: "*.{tsv,tsv.gz}" + +authors: + - "@ramprasadn" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 2ceee40a201..6d847d3e315 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -576,6 +576,10 @@ bwameth/index: - modules/nf-core/bwameth/index/** - tests/modules/nf-core/bwameth/index/** +cadd: + - modules/nf-core/cadd/** + - tests/modules/nf-core/cadd/** + calder2: - modules/nf-core/calder2/** - tests/modules/nf-core/calder2/** diff --git a/tests/modules/nf-core/cadd/main.nf b/tests/modules/nf-core/cadd/main.nf new file mode 100644 index 00000000000..62476a14bc7 --- /dev/null +++ b/tests/modules/nf-core/cadd/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CADD } from '../../../../modules/nf-core/cadd/main.nf' + +workflow test_cadd { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true) + ] + + CADD ( input, file("$PWD") ) +} diff --git a/tests/modules/nf-core/cadd/nextflow.config b/tests/modules/nf-core/cadd/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/cadd/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/cadd/test.yml b/tests/modules/nf-core/cadd/test.yml new file mode 100644 index 00000000000..4bb7e25b179 --- /dev/null +++ b/tests/modules/nf-core/cadd/test.yml @@ -0,0 +1,7 @@ +- name: "cadd" + command: nextflow run ./tests/modules/nf-core/cadd -entry test_cadd -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/cadd/nextflow.config -stub + tags: + - "cadd" + files: + - path: "output/cadd/test.tsv.gz" + - path: "output/cadd/versions.yml" From c1207678470e58881e27baf31e3dec150001fea6 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Tue, 4 Apr 2023 09:27:13 +0100 Subject: [PATCH 041/120] Added the MD5 checksums for the delly/call tests (#3246) Indicate why we can't have MD5 checksums for the delly/call tests --- tests/modules/nf-core/delly/call/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modules/nf-core/delly/call/test.yml b/tests/modules/nf-core/delly/call/test.yml index 508ab9c311f..cdc22f0dcf8 100644 --- a/tests/modules/nf-core/delly/call/test.yml +++ b/tests/modules/nf-core/delly/call/test.yml @@ -4,7 +4,7 @@ - delly - delly/call files: - - path: output/delly/test.bcf + - path: output/delly/test.bcf # No md5sum because the file includes a timestamp - path: output/delly/test.bcf.csi md5sum: 66545c77fc791a02dadc7fc252d04635 - path: output/delly/versions.yml @@ -15,7 +15,7 @@ - delly - delly/call files: - - path: output/delly/test.vcf.gz + - path: output/delly/test.vcf.gz # No md5sum because the file includes a timestamp - path: output/delly/test.vcf.gz.tbi md5sum: e7180bb953d2bd657c420a5f76a7164d - path: output/delly/versions.yml @@ -26,7 +26,7 @@ - delly - delly/call files: - - path: output/delly/test.bcf + - path: output/delly/test.bcf # No md5sum because the file includes a timestamp - path: output/delly/test.bcf.csi md5sum: a2ba4f0b32a6ea857ec8a5b3068f168f - path: output/delly/versions.yml @@ -37,7 +37,7 @@ - delly - delly/call files: - - path: output/delly/test.vcf.gz + - path: output/delly/test.vcf.gz # No md5sum because the file includes a timestamp - path: output/delly/test.vcf.gz.tbi md5sum: e7180bb953d2bd657c420a5f76a7164d - path: output/delly/versions.yml From d67b7b655bd89a04fb227b2cfb35832e8d1c3371 Mon Sep 17 00:00:00 2001 From: Florian Wuennemann Date: Tue, 4 Apr 2023 13:55:28 +0200 Subject: [PATCH 042/120] Changed container version (#3259) Based on discussion with the biocontainer team, the base image for this container was changed to include procps: https://github.com/BioContainers/containers/pull/512 --- modules/nf-core/cellpose/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/cellpose/main.nf b/modules/nf-core/cellpose/main.nf index 849cdd7fac6..fdf4d171641 100644 --- a/modules/nf-core/cellpose/main.nf +++ b/modules/nf-core/cellpose/main.nf @@ -6,7 +6,7 @@ process CELLPOSE { if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { exit 1, "I did not manage to create a cellpose module in Conda that works in all OSes. Please use Docker / Singularity / Podman instead."} - container "biocontainers/cellpose:2.1.1_cv1" + container "biocontainers/cellpose:2.1.1_cv2" input: tuple val(meta), path(image) From faada161c93754eb930d0796f3a3740b29a32a87 Mon Sep 17 00:00:00 2001 From: Alexander Ramos Date: Tue, 4 Apr 2023 12:45:37 -0600 Subject: [PATCH 043/120] Windowmasker/convert (#3152) * added module windowmasker/convert * fixed issue with nf-core modules create-test-yml * use 4x left-padding spaces * use sed in version output * added meta to input and output * updated tests for each output format * add stub * removed duplicated entry for wisecondorx/convert --- modules/nf-core/windowmasker/convert/main.nf | 56 +++++++++++++++++++ modules/nf-core/windowmasker/convert/meta.yml | 39 +++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../nf-core/windowmasker/convert/main.nf | 35 ++++++++++++ .../windowmasker/convert/nextflow.config | 17 ++++++ .../nf-core/windowmasker/convert/test.yml | 35 ++++++++++++ 6 files changed, 186 insertions(+) create mode 100644 modules/nf-core/windowmasker/convert/main.nf create mode 100644 modules/nf-core/windowmasker/convert/meta.yml create mode 100644 tests/modules/nf-core/windowmasker/convert/main.nf create mode 100644 tests/modules/nf-core/windowmasker/convert/nextflow.config create mode 100644 tests/modules/nf-core/windowmasker/convert/test.yml diff --git a/modules/nf-core/windowmasker/convert/main.nf b/modules/nf-core/windowmasker/convert/main.nf new file mode 100644 index 00000000000..77e943d84e6 --- /dev/null +++ b/modules/nf-core/windowmasker/convert/main.nf @@ -0,0 +1,56 @@ +process WINDOWMASKER_CONVERT { + tag "$meta.id" + label 'process_single' + + conda "bioconda::blast=2.13.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/blast:2.13.0--hf3cf87c_0': + 'quay.io/biocontainers/blast:2.13.0--hf3cf87c_0' }" + + input: + tuple val(meta), path(counts) + + output: + tuple val(meta), path("${output}"), emit: converted + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def outfmt = args.contains('-sformat binary') ? 'binary' : + args.contains('-sformat oascii') ? 'oascii' : + args.contains('-sformat obinary') ? 'obinary' : + 'ascii' + output = "${prefix}.${outfmt}" + """ + windowmasker -convert \\ + -in $counts \\ + -out $output \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + windowmasker: \$(windowmasker -version-full | head -n 1 | sed 's/^.*windowmasker: //; s/ .*\$//') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def outfmt = args.contains('-sformat binary') ? 'binary' : + args.contains('-sformat oascii') ? 'oascii' : + args.contains('-sformat obinary') ? 'obinary' : + 'ascii' + output = "${prefix}.${outfmt}" + """ + touch ${output} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + windowmasker: \$(windowmasker -version-full | head -n 1 | sed 's/^.*windowmasker: //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/windowmasker/convert/meta.yml b/modules/nf-core/windowmasker/convert/meta.yml new file mode 100644 index 00000000000..eccb6f30c24 --- /dev/null +++ b/modules/nf-core/windowmasker/convert/meta.yml @@ -0,0 +1,39 @@ +name: "windowmasker_convert" +description: Masks out highly repetitive DNA sequences with low complexity in a genome +keywords: + - fasta + - blast + - windowmasker +tools: + - windowmasker: + description: "A program to mask highly repetitive and low complexity DNA sequences within a genome." + homepage: "https://blast.ncbi.nlm.nih.gov/Blast.cgi" + documentation: "ftp://ftp.ncbi.nlm.nih.gov/pub/agarwala/windowmasker/README.windowmasker" + doi: 10.1016/S0022-2836(05)80360-2 + licence: ["US-Government-Work"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - counts: + type: file + description: valid unit counts file + pattern: "*.{ascii,binary,oascii,obinary,txt}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - counts: + type: file + description: valid unit counts file + pattern: "*.{ascii,binary,oascii,obinary}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@alxndrdiaz" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 6d847d3e315..d0dcb0a7989 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3682,6 +3682,10 @@ whamg: - modules/nf-core/whamg/** - tests/modules/nf-core/whamg/** +windowmasker/convert: + - modules/nf-core/windowmasker/convert/** + - tests/modules/nf-core/windowmasker/convert/** + windowmasker/mk_counts: - modules/nf-core/windowmasker/mk_counts/** - tests/modules/windowmasker/mk_counts/** diff --git a/tests/modules/nf-core/windowmasker/convert/main.nf b/tests/modules/nf-core/windowmasker/convert/main.nf new file mode 100644 index 00000000000..7b9d4d50a65 --- /dev/null +++ b/tests/modules/nf-core/windowmasker/convert/main.nf @@ -0,0 +1,35 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { WINDOWMASKER_MKCOUNTS } from '../../../../../modules/nf-core/windowmasker/mk_counts/main.nf' +include { WINDOWMASKER_CONVERT as WINDOWMASKER_CONVERT_OASCII } from '../../../../../modules/nf-core/windowmasker/convert/main.nf' +include { WINDOWMASKER_CONVERT as WINDOWMASKER_CONVERT_BINARY } from '../../../../../modules/nf-core/windowmasker/convert/main.nf' +include { WINDOWMASKER_CONVERT as WINDOWMASKER_CONVERT_OBINARY } from '../../../../../modules/nf-core/windowmasker/convert/main.nf' + +workflow test_windowmasker_convert_oascii { + + input = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + WINDOWMASKER_MKCOUNTS ( [ [id:'test'], input ] ) + + WINDOWMASKER_CONVERT_OASCII ( WINDOWMASKER_MKCOUNTS.out.counts ) +} + +workflow test_windowmasker_convert_binary { + + input = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + WINDOWMASKER_MKCOUNTS ( [ [id:'test'], input ] ) + + WINDOWMASKER_CONVERT_BINARY ( WINDOWMASKER_MKCOUNTS.out.counts ) +} + +workflow test_windowmasker_convert_obinary { + + input = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + WINDOWMASKER_MKCOUNTS ( [ [id:'test'], input ] ) + + WINDOWMASKER_CONVERT_OBINARY ( WINDOWMASKER_MKCOUNTS.out.counts ) +} \ No newline at end of file diff --git a/tests/modules/nf-core/windowmasker/convert/nextflow.config b/tests/modules/nf-core/windowmasker/convert/nextflow.config new file mode 100644 index 00000000000..956fc0706f5 --- /dev/null +++ b/tests/modules/nf-core/windowmasker/convert/nextflow.config @@ -0,0 +1,17 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: WINDOWMASKER_CONVERT_OASCII { + ext.args = '-sformat oascii' + } + + withName: WINDOWMASKER_CONVERT_BINARY { + ext.args = '-sformat binary' + } + + withName: WINDOWMASKER_CONVERT_OBINARY { + ext.args = '-sformat obinary' + } + +} diff --git a/tests/modules/nf-core/windowmasker/convert/test.yml b/tests/modules/nf-core/windowmasker/convert/test.yml new file mode 100644 index 00000000000..0945ccb5640 --- /dev/null +++ b/tests/modules/nf-core/windowmasker/convert/test.yml @@ -0,0 +1,35 @@ +- name: windowmasker convert test_windowmasker_convert_oascii + command: nextflow run ./tests/modules/nf-core/windowmasker/convert -entry test_windowmasker_convert_oascii -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/windowmasker/convert/nextflow.config + tags: + - windowmasker + - windowmasker/convert + files: + - path: output/windowmasker/test.oascii + md5sum: 0f04a2ea77f7d462283c330adfc0feb8 + - path: output/windowmasker/test.txt + md5sum: 902be82b1b12b7cd1637ed9a7ab1fc7a + - path: output/windowmasker/versions.yml + +- name: windowmasker convert test_windowmasker_convert_binary + command: nextflow run ./tests/modules/nf-core/windowmasker/convert -entry test_windowmasker_convert_binary -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/windowmasker/convert/nextflow.config + tags: + - windowmasker + - windowmasker/convert + files: + - path: output/windowmasker/test.binary + md5sum: f2daa5581b4868fddc1eab9d1649399e + - path: output/windowmasker/test.txt + md5sum: 902be82b1b12b7cd1637ed9a7ab1fc7a + - path: output/windowmasker/versions.yml + +- name: windowmasker convert test_windowmasker_convert_obinary + command: nextflow run ./tests/modules/nf-core/windowmasker/convert -entry test_windowmasker_convert_obinary -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/windowmasker/convert/nextflow.config + tags: + - windowmasker + - windowmasker/convert + files: + - path: output/windowmasker/test.obinary + md5sum: bd1625db3a96dfad8ebccce424235172 + - path: output/windowmasker/test.txt + md5sum: 902be82b1b12b7cd1637ed9a7ab1fc7a + - path: output/windowmasker/versions.yml From 1fda5ab75106682f329bde25d4226640d353c3d7 Mon Sep 17 00:00:00 2001 From: SusiJo <43847534+SusiJo@users.noreply.github.com> Date: Wed, 5 Apr 2023 08:12:27 +0200 Subject: [PATCH 044/120] Updated container for Ascat and fixed seed for reproducibility (#3260) * fix task.ext.args2 directive * add fixed seed for reproducibility * add md5sums --- modules/nf-core/ascat/main.nf | 11 ++-- tests/modules/nf-core/ascat/main.nf | 49 +++++++-------- tests/modules/nf-core/ascat/test.yml | 90 ++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 29 deletions(-) diff --git a/modules/nf-core/ascat/main.nf b/modules/nf-core/ascat/main.nf index 88ee819d148..de9a555db09 100644 --- a/modules/nf-core/ascat/main.nf +++ b/modules/nf-core/ascat/main.nf @@ -2,10 +2,10 @@ process ASCAT { tag "$meta.id" label 'process_medium' - conda "bioconda::ascat=3.0.0 bioconda::cancerit-allelecount=4.3.0" + conda "bioconda::ascat=3.1.1 bioconda::cancerit-allelecount=4.3.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-c278c7398beb73294d78639a864352abef2931ce:dfe5aaa885de434adb2b490b68972c5840c6d761-0': - 'quay.io/biocontainers/mulled-v2-c278c7398beb73294d78639a864352abef2931ce:dfe5aaa885de434adb2b490b68972c5840c6d761-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-c278c7398beb73294d78639a864352abef2931ce:ba3e6d2157eac2d38d22e62ec87675e12adb1010-0': + 'quay.io/biocontainers/mulled-v2-c278c7398beb73294d78639a864352abef2931ce:ba3e6d2157eac2d38d22e62ec87675e12adb1010-0' }" input: tuple val(meta), path(input_normal), path(index_normal), path(input_tumor), path(index_tumor) @@ -81,7 +81,8 @@ process ASCAT { $min_map_qual_arg $fasta_arg $skip_allele_counting_tumour_arg - $skip_allele_counting_normal_arg + $skip_allele_counting_normal_arg, + seed = 42 ) @@ -116,7 +117,7 @@ process ASCAT { } #Segment the data - ascat.bc = ascat.aspcf(ascat.bc) + ascat.bc = ascat.aspcf(ascat.bc, seed=42) #Plot the segmented data ascat.plotSegmentedData(ascat.bc) diff --git a/tests/modules/nf-core/ascat/main.nf b/tests/modules/nf-core/ascat/main.nf index cf76c6f0b12..97a77437af9 100644 --- a/tests/modules/nf-core/ascat/main.nf +++ b/tests/modules/nf-core/ascat/main.nf @@ -10,8 +10,6 @@ include { UNZIP as UNZIP_LOCI } from '../../../../modules/nf-core/u include { UNZIP as UNZIP_GC } from '../../../../modules/nf-core/unzip/main.nf' include { UNZIP as UNZIP_RT } from '../../../../modules/nf-core/unzip/main.nf' - - workflow test_ascat { input = [ [ id:'test', single_end:false ], // meta map @@ -29,25 +27,29 @@ workflow test_ascat { // wget http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00154/alignment/HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai // wget http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00155/alignment/HG00155.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam // wget http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase1/data/HG00155/alignment/HG00155.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai +// wget https://www.dropbox.com/s/l3m0yvyca86lpwb/G1000_loci_hg19.zip +// wget https://www.dropbox.com/s/3fzvir3uqe3073d/G1000_alleles_hg19.zip +// wget https://www.dropbox.com/s/v0tgr1esyoh1krw/GC_G1000_hg19.zip +// wget https://www.dropbox.com/s/50n7xb06x318tgl/RT_G1000_hg19.zip // workflow test_ascat_with_ploidy_and_purity { // input = [ [ id:'test', single_end:false ], // meta map -// file("/mnt/volume/ascat/HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam", checkIfExists: true), -// file("/mnt/volume/ascat/HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai", checkIfExists: true), -// file("/mnt/volume/ascat/HG00155.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam", checkIfExists: true), -// file("/mnt/volume/ascat/HG00155.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai", checkIfExists: true) +// file("HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam", checkIfExists: true), +// file("HG00154.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai", checkIfExists: true), +// file("HG00155.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam", checkIfExists: true), +// file("HG00155.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123.bam.bai", checkIfExists: true) // ] -// allele_path = file("/mnt/volume/repos/modules/test_ascat2/G1000_alleles_hg19.zip", checkIfExists: true) +// allele_path = file("G1000_alleles_hg19.zip", checkIfExists: true) // allele_files = [[ id: allele_path.BaseName ], allele_path ] -// loci_path = file("/mnt/volume/repos/modules/test_ascat2/G1000_loci_hg19.zip", checkIfExists: true) +// loci_path = file("G1000_loci_hg19.zip", checkIfExists: true) // loci_files = [[ id: loci_path.BaseName ], loci_path ] -// gc_path = file("/mnt/volume/repos/modules/test_ascat2/GC_G1000_hg19.zip", checkIfExists: true) +// gc_path = file("GC_G1000_hg19.zip", checkIfExists: true) // gc_file = [[ id: gc_path.BaseName ], gc_path ] -// rt_path = file("/mnt/volume/repos/modules/test_ascat2/RT_G1000_hg19.zip", checkIfExists: true) +// rt_path = file("RT_G1000_hg19.zip", checkIfExists: true) // rt_file = [[ id: rt_path.BaseName ], rt_path ] // UNZIP_ALLELES(allele_files) @@ -60,10 +62,7 @@ workflow test_ascat { // [], // optional bed_file for WES // [], // optional fasta // UNZIP_GC.out.unzipped_archive.map{ it[1] }, // optional GC_correction -// []) // optional RT_correction - -// - +// []) // optional RT_correction // } // extended tests running with 1000 genomes data. Data is downloaded as follows: @@ -71,28 +70,31 @@ workflow test_ascat { // wget ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase3/data/HG00145/alignment/HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram // wget ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase3/data/HG00146/alignment/HG00146.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram.crai // wget ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/phase3/data/HG00146/alignment/HG00146.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram +// wget https://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/reference/human_g1k_v37.fasta.gz +// wget https://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/reference/human_g1k_v37.fasta.fai + // workflow test_ascat_with_crams { // input = [ // [ id:'test', single_end:false ], // meta map -// file("/mnt/volume/ascat/HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram", checkIfExists: true), -// file("/mnt/volume/ascat/HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram.crai", checkIfExists: true), -// file("/mnt/volume/ascat/HG00146.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram", checkIfExists: true), -// file("/mnt/volume/ascat/HG00146.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram.crai", checkIfExists: true) +// file("HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram", checkIfExists: true), +// file("HG00145.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram.crai", checkIfExists: true), +// file("HG00146.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram", checkIfExists: true), +// file("HG00146.mapped.ILLUMINA.bwa.GBR.low_coverage.20120522.bam.cram.crai", checkIfExists: true) // ] -// allele_path = file("/mnt/volume/repos/modules/test_ascat2/G1000_alleles_hg19.zip", checkIfExists: true) +// allele_path = file("G1000_alleles_hg19.zip", checkIfExists: true) // allele_files = [[ id: allele_path.BaseName ], allele_path ] -// loci_path = file("/mnt/volume/repos/modules/test_ascat2/G1000_loci_hg19.zip", checkIfExists: true) +// loci_path = file("G1000_loci_hg19.zip", checkIfExists: true) // loci_files = [[ id: loci_path.BaseName ], loci_path ] -// gc_path = file("/mnt/volume/repos/modules/test_ascat2/GC_G1000_hg19.zip", checkIfExists: true) +// gc_path = file("GC_G1000_hg19.zip", checkIfExists: true) // gc_file = [[ id: gc_path.BaseName ], gc_path ] -// rt_path = file("/mnt/volume/repos/modules/test_ascat2/RT_G1000_hg19.zip", checkIfExists: true) +// rt_path = file("RT_G1000_hg19.zip", checkIfExists: true) // rt_file = [[ id: rt_path.BaseName ], rt_path ] -// fasta = file("/mnt/volume/ascat/human_g1k_v37.fasta", checkIfExists: true) +// fasta = file("human_g1k_v37.fasta", checkIfExists: true) // UNZIP_ALLELES(allele_files) // UNZIP_LOCI(loci_files) @@ -106,7 +108,6 @@ workflow test_ascat { // fasta, // UNZIP_GC.out.unzipped_archive.map{ it[1] }, // UNZIP_RT.out.unzipped_archive.map{ it[1] }) - // } diff --git a/tests/modules/nf-core/ascat/test.yml b/tests/modules/nf-core/ascat/test.yml index 760f4b0e8b4..b710c443c82 100644 --- a/tests/modules/nf-core/ascat/test.yml +++ b/tests/modules/nf-core/ascat/test.yml @@ -21,3 +21,93 @@ - path: output/ascat/test.tumour_normalLogR.txt - path: output/ascat/test.tumour_tumourBAF.txt - path: output/ascat/test.tumour_tumourLogR.txt +# - name: ascat test_ascat_with_ploidy_and_purity +# command: nextflow run ./tests/modules/nf-core/ascat -entry test_ascat_with_ploidy_and_purity -c ./tests/config/nextflow.config +# tags: +# - ascat +# - bam +# files: +# - path: output/ascat/test.normal_alleleFrequencies_chr22.txt +# md5sum: 34a7ff0d88d232e6dca236f74bd616a3 +# - path: output/ascat/test.tumour_normalLogR.txt +# md5sum: ad3583bb9f02ce371b3c6e738e01253c +# - path: output/ascat/test.segments.txt +# md5sum: 0eba21b2c35bd6b20422b5d3f0d5268a +# - path: output/ascat/test.tumour_normalBAF.txt +# md5sum: 0d6ce73d3220237681bf24ec4119e1fa +# - path: output/ascat/test.tumour_tumourBAF.txt +# md5sum: 80eaf8b11b072523f8cc5f1c0810df09 +# - path: output/ascat/test.after_correction_gc.test.tumour.germline.png +# md5sum: a26376403f8118a391f0408d9260b8cd +# - path: output/ascat/test.cnvs.txt +# md5sum: 4f99f706b2e498182bbddfaf8b0fafda +# - path: output/ascat/test.normal_alleleFrequencies_chr21.txt +# md5sum: 83665d6887709676ed28a3df9398cfed +# - path: output/ascat/test.tumour.sunrise.png +# md5sum: 025d911f77cc48e02be88c027a0f5c13 +# - path: output/ascat/test.tumour_alleleFrequencies_chr21.txt +# md5sum: 3774b4cb495816ee481b907c3e515f19 +# - path: output/ascat/test.before_correction.test.tumour.germline.png +# md5sum: a26376403f8118a391f0408d9260b8cd +# - path: output/ascat/test.metrics.txt +# md5sum: 0983a53cc0db5918b55d04d9e8a3d96a +# - path: output/ascat/test.tumour.ASCATprofile.png +# md5sum: 7a90b51e32ee779f18979217416475b9 +# - path: output/ascat/test.purityploidy.txt +# md5sum: 48fa643c43bf81e76668f58c0fcf4cdd +# - path: output/ascat/test.before_correction.test.tumour.tumour.png +# md5sum: 30b9ead13a68cfa6a68d1e8512383c64 +# - path: output/ascat/test.tumour.ASPCF.png +# md5sum: 071538088f2e41d335aa530761c5e1e9 +# - path: output/ascat/test.tumour.rawprofile.png +# md5sum: 64e700602181e5323c1ff6d5cc48b29a +# - path: output/ascat/test.after_correction_gc.test.tumour.tumour.png +# md5sum: f3f7bcda5023092a0facb826099f134e +# - path: output/ascat/test.tumour_tumourLogR.txt +# md5sum: 1a7add5dd2697dbee1ec83c887ff0a81 +# - path: output/ascat/test.tumour_alleleFrequencies_chr22.txt +# md5sum: d8e1eed4d6d1a91532adac1ce5a111cb + +# - name: ascat test_ascat_with_ploidy_and_purity +# command: nextflow run ./tests/modules/nf-core/ascat -entry test_ascat_with_crams -c ./tests/config/nextflow.config +# tags: +# - ascat +# - cram +# files: +# - path: output/ascat/test.after_correction_gc_rt.test.tumour.tumour.png +# md5sum: 04fb5a06abaa64eeb6008f3ff321b806 +# - path: output/ascat/test.tumour_alleleFrequencies_chr22.txt +# md5sum: 17058c76cc3772363700ce6b604ad4e9 +# - path: output/ascat/test.tumour.sunrise.png +# md5sum: 1c933eb599628c7ae6fc64cf2093f2fb +# - path: output/ascat/test.after_correction_gc_rt.test.tumour.germline.png +# md5sum: 1e29c586cff82140c653232da5f780e6 +# - path: output/ascat/test.before_correction.test.tumour.germline.png +# md5sum: 1e29c586cff82140c653232da5f780e6 +# - path: output/ascat/test.tumour_normalBAF.txt +# md5sum: 2e5c32f9ba7a573974c55abb59ae7c7d +# - path: output/ascat/test.normal_alleleFrequencies_chr21.txt +# md5sum: 349d516eb745002265cee66fe9ff3c72 +# - path: output/ascat/test.tumour_normalLogR.txt +# md5sum: 557b158d19f1b3c678a7e2638c1a595a +# - path: output/ascat/test.metrics.txt +# md5sum: 59b6db8eea49d45845d03962161e1747 +# - path: output/ascat/test.tumour_alleleFrequencies_chr21.txt +# md5sum: 60637b7eba083c3f9af3e37055bae43b +# - path: output/ascat/test.cnvs.txt +# md5sum: 68b329da9893e34099c7d8ad5cb9c940 +# - path: output/ascat/test.segments.txt +# md5sum: 68b329da9893e34099c7d8ad5cb9c940 +# - path: output/ascat/test.before_correction.test.tumour.tumour.png +# md5sum: 81397df24928ff2aa6e6b99475f2f580 +# - path: output/ascat/test.tumour_tumourBAF.txt +# md5sum: c63500836886125aa0450691377d857e +# - path: output/ascat/test.tumour.ASPCF.png +# md5sum: d2ca81a06d65fbe491894612c9ebc238 +# - path: output/ascat/test.normal_alleleFrequencies_chr22.txt +# md5sum: e439014caab3a0f03efb563741d5da08 +# - path: output/ascat/test.tumour_tumourLogR.txt +# md5sum: ebcd14ecdaaecf47e0d647d3871d3739 +# - path: output/ascat/test.purityploidy.txt +# md5sum: f1484c2b120834d3db8774ad02a038b + From 30b2bac6fd22994d34a3b42c35f907f744f0a7c9 Mon Sep 17 00:00:00 2001 From: Louis LE NEZET <58640615+LouisLeNezet@users.noreply.github.com> Date: Wed, 5 Apr 2023 11:42:34 +0200 Subject: [PATCH 045/120] =?UTF-8?q?Add=20new=20subworkflow=20and=20modify?= =?UTF-8?q?=20some=20mistakes=20in=20makewindows=20and=20phase=E2=80=A6=20?= =?UTF-8?q?(#3250)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add new subworkflow and modify some mistakes in makewindows and phasecommon modules * Delete whitespaces * Add new test for phasing an individual based on a panel * Update test.yml * Update test.yml * Update subworkflows/nf-core/vcf_phase_shapeit5/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Update subworkflows/nf-core/vcf_phase_shapeit5/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Change structure comment of channels * Allign and use ch_ for all channels * Add groupKey() before groupTuple() * Add group size to the groupTuple() * Change size group computation * Update subworkflows/nf-core/vcf_phase_shapeit5/main.nf Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Change chunk number computation * Change meta.id field for each chunk and set it back * Set the prefix as meta.id only for phase_common * Delete whitespace * Modify meta manipulation * Add control of confusing input / ouptut * Change pedigree position in input * Update phaserare testing * Delete ligate sorting * Change input order in switch * Better padding * Improve meta.id manipulation --------- Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- modules/nf-core/bedtools/makewindows/meta.yml | 4 +- modules/nf-core/shapeit5/ligate/main.nf | 2 +- modules/nf-core/shapeit5/ligate/meta.yml | 4 +- modules/nf-core/shapeit5/phasecommon/main.nf | 10 +- modules/nf-core/shapeit5/phasecommon/meta.yml | 10 +- modules/nf-core/shapeit5/phaserare/main.nf | 5 +- .../nf-core/vcf_impute_glimpse/meta.yml | 10 +- .../nf-core/vcf_phase_shapeit5/main.nf | 97 +++++++++++++++++++ .../nf-core/vcf_phase_shapeit5/meta.yml | 71 ++++++++++++++ tests/config/pytest_modules.yml | 4 + tests/modules/nf-core/shapeit5/ligate/main.nf | 25 +++-- .../nf-core/shapeit5/ligate/nextflow.config | 3 +- .../modules/nf-core/shapeit5/ligate/test.yml | 8 +- .../nf-core/shapeit5/phasecommon/main.nf | 6 +- .../nf-core/shapeit5/phasecommon/test.yml | 4 +- .../nf-core/shapeit5/phaserare/main.nf | 7 +- .../shapeit5/phaserare/nextflow.config | 3 + .../nf-core/shapeit5/phaserare/test.yml | 6 +- tests/modules/nf-core/shapeit5/switch/main.nf | 4 +- .../modules/nf-core/shapeit5/switch/test.yml | 4 +- .../nf-core/vcf_phase_shapeit5/main.nf | 52 ++++++++++ .../vcf_phase_shapeit5/nextflow.config | 13 +++ .../nf-core/vcf_phase_shapeit5/test.yml | 57 +++++++++++ 23 files changed, 360 insertions(+), 49 deletions(-) create mode 100644 subworkflows/nf-core/vcf_phase_shapeit5/main.nf create mode 100644 subworkflows/nf-core/vcf_phase_shapeit5/meta.yml create mode 100644 tests/subworkflows/nf-core/vcf_phase_shapeit5/main.nf create mode 100644 tests/subworkflows/nf-core/vcf_phase_shapeit5/nextflow.config create mode 100644 tests/subworkflows/nf-core/vcf_phase_shapeit5/test.yml diff --git a/modules/nf-core/bedtools/makewindows/meta.yml b/modules/nf-core/bedtools/makewindows/meta.yml index 307f4cd2a9d..f543da69c2d 100644 --- a/modules/nf-core/bedtools/makewindows/meta.yml +++ b/modules/nf-core/bedtools/makewindows/meta.yml @@ -32,10 +32,10 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - tab: + - bed: type: file description: BED file containing the windows - pattern: "*.tab" + pattern: "*.bed" authors: - "@kevbrick" - "@nvnieuwk" diff --git a/modules/nf-core/shapeit5/ligate/main.nf b/modules/nf-core/shapeit5/ligate/main.nf index a5c42d161aa..4ab53a3572a 100644 --- a/modules/nf-core/shapeit5/ligate/main.nf +++ b/modules/nf-core/shapeit5/ligate/main.nf @@ -22,7 +22,7 @@ process SHAPEIT5_LIGATE { def prefix = task.ext.prefix ?: "${meta.id}" def suffix = task.ext.suffix ?: "vcf.gz" """ - printf "%s\\n" $input_list | tr -d '[],' | sort > all_files.txt + printf "%s\\n" $input_list | tr -d '[],' > all_files.txt SHAPEIT5_ligate \\ $args \\ diff --git a/modules/nf-core/shapeit5/ligate/meta.yml b/modules/nf-core/shapeit5/ligate/meta.yml index 26de7c93ab0..bbc8e57e8f8 100644 --- a/modules/nf-core/shapeit5/ligate/meta.yml +++ b/modules/nf-core/shapeit5/ligate/meta.yml @@ -24,7 +24,9 @@ input: - input_list: type: file - description: VCF/BCF files containing genotype probabilities (GP field). + description: | + VCF/BCF files containing genotype probabilities (GP field). + The files should be ordered by genomic position. pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}" - input_list_index: diff --git a/modules/nf-core/shapeit5/phasecommon/main.nf b/modules/nf-core/shapeit5/phasecommon/main.nf index 356a94d6a86..b7ffa42e0fd 100644 --- a/modules/nf-core/shapeit5/phasecommon/main.nf +++ b/modules/nf-core/shapeit5/phasecommon/main.nf @@ -8,7 +8,7 @@ process SHAPEIT5_PHASECOMMON { 'quay.io/biocontainers/shapeit5:1.0.0--h0c8ee15_0'}" input: - tuple val(meta) , path(input), path(input_index), val(region), path(pedigree) + tuple val(meta) , path(input), path(input_index), path(pedigree), val(region) tuple val(meta2), path(reference), path(reference_index) tuple val(meta3), path(scaffold), path(scaffold_index) tuple val(meta4), path(map) @@ -23,19 +23,15 @@ process SHAPEIT5_PHASECOMMON { script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}_${region.replace(":","_")}" + def prefix = task.ext.prefix ?: "${meta.id}" def suffix = task.ext.suffix ?: "vcf.gz" + if ("$input" == "${prefix}.${suffix}") error "Input and output names are the same, set prefix in module configuration to disambiguate!" def map_command = map ? "--map $map" : "" def reference_command = reference ? "--reference $reference" : "" def scaffold_command = scaffold ? "--scaffold $scaffold" : "" def pedigree_command = pedigree ? "--pedigree $pedigree" : "" - meta.put("SHAPEIT5_PHASECOMMON", ["reference":"", "map":"", "scaffold":""]) - meta.SHAPEIT5_PHASECOMMON.reference = reference ? meta2 :"None" - meta.SHAPEIT5_PHASECOMMON.map = map ? meta3 :"None" - meta.SHAPEIT5_PHASECOMMON.scaffold = scaffold ? meta4 :"None" - """ SHAPEIT5_phase_common \\ $args \\ diff --git a/modules/nf-core/shapeit5/phasecommon/meta.yml b/modules/nf-core/shapeit5/phasecommon/meta.yml index f8b082d4b6d..0cb5ab0881c 100644 --- a/modules/nf-core/shapeit5/phasecommon/meta.yml +++ b/modules/nf-core/shapeit5/phasecommon/meta.yml @@ -29,17 +29,17 @@ input: type: file description: Index file of the input VCF/BCF file containing genotype likelihoods. pattern: "*.{vcf.gz.csi,bcf.gz.csi}" + - pedigree: + type: file + description: | + Pedigree information in the following format: offspring father mother. + pattern: "*.{txt, tsv}" - region: type: string description: | Target region, usually a full chromosome (e.g. chr20:1000000-2000000 or chr20). For chrX, please treat PAR and non-PAR regions as different choromosome in order to avoid mixing ploidy. pattern: "chrXX:leftBufferPosition-rightBufferPosition" - - pedigree: - type: file - description: | - Pedigree information in the following format: offspring father mother. - pattern: "*.{txt, tsv}" - reference: type: file description: Reference panel of haplotypes in VCF/BCF format. diff --git a/modules/nf-core/shapeit5/phaserare/main.nf b/modules/nf-core/shapeit5/phaserare/main.nf index 7ef0d674703..e0fb3f5a375 100644 --- a/modules/nf-core/shapeit5/phaserare/main.nf +++ b/modules/nf-core/shapeit5/phaserare/main.nf @@ -18,7 +18,7 @@ process SHAPEIT5_PHASERARE { 'quay.io/biocontainers/shapeit5:1.0.0--h0c8ee15_0' }" input: - tuple val(meta) , path(input_plain), path(input_plain_index), val(input_region), path(pedigree) + tuple val(meta) , path(input_plain), path(input_plain_index), path(pedigree), val(input_region) tuple val(meta2), path(scaffold) , path(scaffold_index) , val(scaffold_region) tuple val(meta3), path(map) @@ -32,8 +32,9 @@ process SHAPEIT5_PHASERARE { script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}_${input_region.replace(":","_")}" + def prefix = task.ext.prefix ?: "${meta.id}" def suffix = task.ext.suffix ?: "vcf.gz" + if ("$input_plain" == "${prefix}.${suffix}") error "Input and output names are the same, set prefix in module configuration to disambiguate!" def map_command = map ? "--map $map" : "" def pedigree_command = pedigree ? "--pedigree $pedigree" : "" diff --git a/subworkflows/nf-core/vcf_impute_glimpse/meta.yml b/subworkflows/nf-core/vcf_impute_glimpse/meta.yml index a063904a137..e4908e0435e 100644 --- a/subworkflows/nf-core/vcf_impute_glimpse/meta.yml +++ b/subworkflows/nf-core/vcf_impute_glimpse/meta.yml @@ -30,8 +30,9 @@ input: - ch_map: type: file - description: File containing the genetic map. - Structure: [gmap] + description: | + File containing the genetic map. + Structure: [gmap] - ch_infos: type: file @@ -45,8 +46,9 @@ input: output: - chunk_chr: type: file - description: Tab delimited output txt file containing buffer and imputation regions. - Structure: [meta, txt] + description: | + Tab delimited output txt file containing buffer and imputation regions. + Structure: [meta, txt] - phased_variants: type: file diff --git a/subworkflows/nf-core/vcf_phase_shapeit5/main.nf b/subworkflows/nf-core/vcf_phase_shapeit5/main.nf new file mode 100644 index 00000000000..0ddebcb3d41 --- /dev/null +++ b/subworkflows/nf-core/vcf_phase_shapeit5/main.nf @@ -0,0 +1,97 @@ +include { BEDTOOLS_MAKEWINDOWS } from '../../../modules/nf-core/bedtools/makewindows/main.nf' +include { SHAPEIT5_PHASECOMMON } from '../../../modules/nf-core/shapeit5/phasecommon/main' +include { SHAPEIT5_LIGATE } from '../../../modules/nf-core/shapeit5/ligate/main' +include { BCFTOOLS_INDEX as VCF_INDEX1 } from '../../../modules/nf-core/bcftools/index/main.nf' +include { BCFTOOLS_INDEX as VCF_INDEX2 } from '../../../modules/nf-core/bcftools/index/main.nf' + +workflow VCF_PHASE_SHAPEIT5 { + + take: + ch_vcf // channel (mandatory): [ val(meta), path(vcf), path(csi), path(pedigree), val(region) ] + ch_ref // channel (optional) : [ val(meta), path(ref), path(csi) ] + ch_scaffold // channel (optional) : [ val(meta), path(scaffold), path(csi) ] + ch_map // channel (optional) : [ val(meta), path(map)] + + main: + + ch_versions = Channel.empty() + + // It is needed to generate a file containing the region to phase in a Chr \tab Start \tab End format + // The meta map needing to be conserved the following steps a required + + // Keep the meta map and the region in two separated channel but keed id field to link them back + ch_region = ch_vcf + .multiMap { meta, vcf, csi, pedigree, region -> + metadata: [ meta.id, meta] + region : [ meta.id, region] + } + + // Create the File in bed format and use the meta id for the file name + ch_merged_region = ch_region.region + .collectFile { metaid, region -> ["${metaid}.bed", region.replace(":","\t").replace("-","\t")] } + .map { file -> [file.baseName, file] } + + // Link back the meta map with the file + ch_region_file = ch_region.metadata + .join(ch_merged_region, failOnMismatch:true, failOnDuplicate:true) + .map { mid, meta, region_file -> [meta, region_file]} + + BEDTOOLS_MAKEWINDOWS(ch_region_file) + ch_versions = ch_versions.mix(BEDTOOLS_MAKEWINDOWS.out.versions.first()) + + ch_chunk_output = BEDTOOLS_MAKEWINDOWS.out.bed + .splitCsv(header: ['Chr', 'Start', 'End'], sep: "\t", skip: 0) + .map { meta, it -> [meta, it["Chr"]+":"+it["Start"]+"-"+it["End"]]} + + // Count the number of chunks + ch_chunks_number = BEDTOOLS_MAKEWINDOWS.out.bed + .map { meta, bed -> [meta, bed.countLines().intValue()]} + + ch_phase_input = ch_vcf + .map { meta, vcf, index, pedigree, region -> + [meta, vcf, index, pedigree] } + .combine(ch_chunk_output, by:0) + .map { meta, vcf, index, pedigree, chunk -> + [meta + [id: "${meta.id}_${chunk.replace(":","-")}"], // The meta.id field need to be modified to be unique for each chunk + vcf, index, pedigree, chunk]} + + SHAPEIT5_PHASECOMMON ( ch_phase_input, + ch_ref, + ch_scaffold, + ch_map ) + ch_versions = ch_versions.mix(SHAPEIT5_PHASECOMMON.out.versions.first()) + + VCF_INDEX1(SHAPEIT5_PHASECOMMON.out.phased_variant) + ch_versions = ch_versions.mix(VCF_INDEX1.out.versions.first()) + + ch_ligate_input = SHAPEIT5_PHASECOMMON.out.phased_variant + .join(VCF_INDEX1.out.csi, failOnMismatch:true, failOnDuplicate:true) + .view() + .map{ meta, vcf, csi -> + newmeta = meta + [id: meta.id.split("_")[0..-2].join("_")] + [newmeta, vcf, csi]}.view() + .combine(ch_chunks_number, by:0) + .map{meta, vcf, csi, chunks_num -> + [groupKey(meta, chunks_num), vcf, csi]} + .groupTuple() + .map{ meta, vcf, csi -> + [ meta, + vcf.sort { a, b -> + def aStart = a.getName().split('-')[-2].toInteger() + def bStart = b.getName().split('-')[-2].toInteger() + aStart <=> bStart}, + csi]} + + SHAPEIT5_LIGATE(ch_ligate_input) + ch_versions = ch_versions.mix(SHAPEIT5_LIGATE.out.versions.first()) + + VCF_INDEX2(SHAPEIT5_LIGATE.out.merged_variants) + ch_versions = ch_versions.mix(VCF_INDEX2.out.versions.first()) + + emit: + bed = BEDTOOLS_MAKEWINDOWS.out.bed // channel: [ val(meta), bed ] + variants_phased = SHAPEIT5_LIGATE.out.merged_variants // channel: [ val(meta), vcf ] + variants_index = VCF_INDEX2.out.csi // channel: [ val(meta), csi ] + versions = ch_versions // channel: [ versions.yml ] +} + diff --git a/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml b/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml new file mode 100644 index 00000000000..e2b9aebb047 --- /dev/null +++ b/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml @@ -0,0 +1,71 @@ +name: "vcf_phase_shapeit5" +description: Phase vcf panel with Shapeit5 tools +keywords: + - chunk + - phase + - ligate + - index + - vcf + +modules: + - bedtools/makewindows + - shapeit5/phasecommon + - shapeit5/ligate + - bcftools/index + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - ch_vcf: + type: file + description: | + Target dataset in VCF/BCF format defined at all variable positions. + Index file of the input VCF/BCF file containing genotype likelihoods. + Pedigree information in the following format: offspring father mother. + Target region, usually a full chromosome (e.g. chr20:1000000-2000000 or chr20). + The file could possibly be without GT field (for efficiency reasons a file containing only the positions is recommended). + Structure: [ val(meta), path(vcf), path(csi), path(pedigree), val(region) ] + - ch_ref: + type: file + description: | + Reference panel of haplotypes in VCF/BCF format. + Index file of the Reference panel file. + Structure: [ val(meta), path(ref), path(csi) ] + - ch_scaffold: + type: file + description: | + Scaffold of haplotypes in VCF/BCF format. + Index file of the Scaffold of haplotypes file. + Structure: [ val(meta), path(scaffold), path(csi) ] + - ch_map: + type: file + description: File containing the genetic map. + Structure: [val(meta), path(map)] + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - bed: + type: file + description: BED file containing the windows + pattern: "*.bed" + - variants_phased: + type: file + description: Phased haplotypes in VCF/BCF format. + pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}" + - variants_index: + type: file + description: CSI bcftools index + pattern: "*.csi" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@LouisLeNezet" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index d0dcb0a7989..616563e9c2e 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3421,6 +3421,10 @@ subworkflows/vcf_impute_glimpse: - subworkflows/nf-core/vcf_impute_glimpse/** - tests/subworkflows/nf-core/vcf_impute_glimpse/** +subworkflows/vcf_phase_shapeit5: + - subworkflows/nf-core/vcf_phase_shapeit5/** + - tests/subworkflows/nf-core/vcf_phase_shapeit5/** + survivor/filter: - modules/nf-core/survivor/filter/** - tests/modules/nf-core/survivor/filter/** diff --git a/tests/modules/nf-core/shapeit5/ligate/main.nf b/tests/modules/nf-core/shapeit5/ligate/main.nf index 19790f256c3..3b92a03ed8f 100644 --- a/tests/modules/nf-core/shapeit5/ligate/main.nf +++ b/tests/modules/nf-core/shapeit5/ligate/main.nf @@ -29,18 +29,31 @@ workflow test_shapeit5_ligate { region = Channel.of("chr21:16600000-16750000", "chr21:16650000-16800000") sample = Channel.of([[]]) - phase_input = Channel.of([[ id:'NA12878_1X', single_end:false ]]) + phase_input = Channel.of([[ id:'NA12878_1X']]) .combine(BCFTOOLS_VIEW.out.vcf.collect().map{it[1]}) .combine(BCFTOOLS_INDEX.out.csi.collect().map{it[1]}) + .combine(sample).view() .combine(region) - .combine(sample) + .map{ meta, vcf, csi, sample, region -> + [meta + [region: region.replace(":","_")], + vcf, csi, sample, region]} + SHAPEIT5_PHASECOMMON ( phase_input, ref_panel, scaffold, map ) - BCFTOOLS_INDEX2 ( SHAPEIT5_PHASECOMMON.output.phased_variant ) - - ligate_input = SHAPEIT5_PHASECOMMON.output.phased_variant.groupTuple() - .join(BCFTOOLS_INDEX2.out.csi.groupTuple()) + phased_variant = SHAPEIT5_PHASECOMMON.output.phased_variant + .map{ meta, vcf -> [meta.subMap(["id"]), vcf]} + .view() + + BCFTOOLS_INDEX2 ( phased_variant ) + + ligate_input = phased_variant.groupTuple() + .join(BCFTOOLS_INDEX2.out.csi.groupTuple()) + .map { meta, vcf, csi -> + [meta, + vcf.sort{ a, b -> + a.getName() <=> b.getName()}, + csi]} ligate_input.view() SHAPEIT5_LIGATE ( ligate_input ) diff --git a/tests/modules/nf-core/shapeit5/ligate/nextflow.config b/tests/modules/nf-core/shapeit5/ligate/nextflow.config index b2a4d19ae3b..665b5b02e5f 100644 --- a/tests/modules/nf-core/shapeit5/ligate/nextflow.config +++ b/tests/modules/nf-core/shapeit5/ligate/nextflow.config @@ -8,7 +8,8 @@ process { withName: SHAPEIT5_PHASECOMMON { ext.args = [ ].join(' ') - ext.suffix = "vcf.gz" + ext.suffix = "bcf" + ext.prefix = { "${meta.id}_${meta.region}" } } publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } diff --git a/tests/modules/nf-core/shapeit5/ligate/test.yml b/tests/modules/nf-core/shapeit5/ligate/test.yml index 9ddc591adcb..d60fb8e47f0 100644 --- a/tests/modules/nf-core/shapeit5/ligate/test.yml +++ b/tests/modules/nf-core/shapeit5/ligate/test.yml @@ -6,10 +6,10 @@ files: - path: output/bcftools/NA12878_1X.vcf.gz - path: output/bcftools/NA12878_1X.vcf.gz.csi - - path: output/bcftools/NA12878_1X_chr21_16600000-16750000.vcf.gz.csi - - path: output/bcftools/NA12878_1X_chr21_16650000-16800000.vcf.gz.csi + - path: output/bcftools/NA12878_1X_chr21_16600000-16750000.bcf.csi + - path: output/bcftools/NA12878_1X_chr21_16650000-16800000.bcf.csi - path: output/bcftools/versions.yml - path: output/shapeit5/NA12878_1X.vcf.gz - - path: output/shapeit5/NA12878_1X_chr21_16600000-16750000.vcf.gz - - path: output/shapeit5/NA12878_1X_chr21_16650000-16800000.vcf.gz + - path: output/shapeit5/NA12878_1X_chr21_16600000-16750000.bcf + - path: output/shapeit5/NA12878_1X_chr21_16650000-16800000.bcf - path: output/shapeit5/versions.yml diff --git a/tests/modules/nf-core/shapeit5/phasecommon/main.nf b/tests/modules/nf-core/shapeit5/phasecommon/main.nf index 7788a8ab869..42a64dac8c3 100644 --- a/tests/modules/nf-core/shapeit5/phasecommon/main.nf +++ b/tests/modules/nf-core/shapeit5/phasecommon/main.nf @@ -10,8 +10,8 @@ workflow test_shapeit5_phasecommon_without_map { [ id:'input', single_end:false ], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true), - "chr21", - [] + [], + "chr21" ]) ref_panel = Channel.of([[],[],[]]) @@ -27,8 +27,8 @@ workflow test_shapeit5_phasecommon_with_map { [ id:'input', single_end:false ], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true), + [], "chr21", - [] ]) ref_panel = Channel.of([[],[],[]]) diff --git a/tests/modules/nf-core/shapeit5/phasecommon/test.yml b/tests/modules/nf-core/shapeit5/phasecommon/test.yml index bc85bfe07e4..29e2286051d 100644 --- a/tests/modules/nf-core/shapeit5/phasecommon/test.yml +++ b/tests/modules/nf-core/shapeit5/phasecommon/test.yml @@ -4,7 +4,7 @@ - shapeit5 - shapeit5/phasecommon files: - - path: output/shapeit5/input_chr21.vcf.gz + - path: output/shapeit5/input.vcf.gz - path: output/shapeit5/versions.yml - name: shapeit5 phasecommon test_shapeit5_phasecommon_with_map @@ -13,5 +13,5 @@ - shapeit5 - shapeit5/phasecommon files: - - path: output/shapeit5/input_chr21.vcf.gz + - path: output/shapeit5/input.vcf.gz - path: output/shapeit5/versions.yml diff --git a/tests/modules/nf-core/shapeit5/phaserare/main.nf b/tests/modules/nf-core/shapeit5/phaserare/main.nf index 4ec0d66b923..d307d2be07c 100644 --- a/tests/modules/nf-core/shapeit5/phaserare/main.nf +++ b/tests/modules/nf-core/shapeit5/phaserare/main.nf @@ -9,11 +9,11 @@ include { BCFTOOLS_INDEX } from '../../../../../modules/nf-core/bcftools/i workflow test_shapeit5_phaserare { input_vcf = Channel.of([ - [ id:'input', single_end:false ], // meta map + [ id:'panel', single_end:false ], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true), + [], "chr21", - [] ]) ref_panel = Channel.of([[],[],[]]) @@ -27,14 +27,13 @@ workflow test_shapeit5_phaserare { scaffold = SHAPEIT5_PHASECOMMON.out.phased_variant .join(BCFTOOLS_INDEX.out.csi) .combine(Channel.of("chr21:16600000-16800000")) - .view() input_vcf = Channel.of([ [ id:'input', single_end:false ], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true), + [], "chr21:16600000-16800000", - [] ]) SHAPEIT5_PHASERARE ( input_vcf, scaffold, map ) diff --git a/tests/modules/nf-core/shapeit5/phaserare/nextflow.config b/tests/modules/nf-core/shapeit5/phaserare/nextflow.config index 74ff894a2b1..c03786f297b 100644 --- a/tests/modules/nf-core/shapeit5/phaserare/nextflow.config +++ b/tests/modules/nf-core/shapeit5/phaserare/nextflow.config @@ -4,6 +4,9 @@ process { "--filter-maf 0.001" ].join(' ') } + withName: SHAPEIT5_PHASERARE{ + ext.suffix="bcf" + } publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } } \ No newline at end of file diff --git a/tests/modules/nf-core/shapeit5/phaserare/test.yml b/tests/modules/nf-core/shapeit5/phaserare/test.yml index 087044440d9..3f3642fe3f6 100644 --- a/tests/modules/nf-core/shapeit5/phaserare/test.yml +++ b/tests/modules/nf-core/shapeit5/phaserare/test.yml @@ -4,8 +4,8 @@ - shapeit5 - shapeit5/phaserare files: - - path: output/bcftools/input_chr21.vcf.gz.csi + - path: output/bcftools/panel.vcf.gz.csi - path: output/bcftools/versions.yml - - path: output/shapeit5/input_chr21.vcf.gz - - path: output/shapeit5/input_chr21_16600000-16800000.vcf.gz + - path: output/shapeit5/input.bcf + - path: output/shapeit5/panel.vcf.gz - path: output/shapeit5/versions.yml diff --git a/tests/modules/nf-core/shapeit5/switch/main.nf b/tests/modules/nf-core/shapeit5/switch/main.nf index bfd61767f79..525c789f2a1 100644 --- a/tests/modules/nf-core/shapeit5/switch/main.nf +++ b/tests/modules/nf-core/shapeit5/switch/main.nf @@ -11,8 +11,8 @@ workflow test_shapeit5_switch { [ id:'input', single_end:false ], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true), - "chr21", - [] + [], + "chr21" ]) ref_panel = Channel.of([[],[],[]]) diff --git a/tests/modules/nf-core/shapeit5/switch/test.yml b/tests/modules/nf-core/shapeit5/switch/test.yml index d8f07bf2c53..25314edeb46 100644 --- a/tests/modules/nf-core/shapeit5/switch/test.yml +++ b/tests/modules/nf-core/shapeit5/switch/test.yml @@ -4,7 +4,7 @@ - shapeit5/switch - shapeit5 files: - - path: output/bcftools/input_chr21.vcf.gz.csi + - path: output/bcftools/input.vcf.gz.csi - path: output/bcftools/versions.yml - path: output/shapeit5/input.block.switch.txt.gz - path: output/shapeit5/input.calibration.switch.txt.gz @@ -18,5 +18,5 @@ - path: output/shapeit5/input.variant.switch.txt.gz - path: output/shapeit5/input.variant.typing.txt.gz md5sum: 2d224ffc41ae40263b7c2d3b35fe5eeb - - path: output/shapeit5/input_chr21.vcf.gz + - path: output/shapeit5/input.vcf.gz - path: output/shapeit5/versions.yml diff --git a/tests/subworkflows/nf-core/vcf_phase_shapeit5/main.nf b/tests/subworkflows/nf-core/vcf_phase_shapeit5/main.nf new file mode 100644 index 00000000000..789711b9ba4 --- /dev/null +++ b/tests/subworkflows/nf-core/vcf_phase_shapeit5/main.nf @@ -0,0 +1,52 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { VCF_PHASE_SHAPEIT5 } from '../../../../subworkflows/nf-core/vcf_phase_shapeit5/main.nf' +include { BCFTOOLS_VIEW } from '../../../../modules/nf-core/bcftools/view/main.nf' +include { BCFTOOLS_INDEX } from '../../../../modules/nf-core/bcftools/index/main.nf' + +workflow test_vcf_phase_shapeit5_panel { + + ref_panel = Channel.of([ + [ id:'input_1-ind_2',region:"chr21:16600115-16799989"], + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", + checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", + checkIfExists: true), + [], + "chr21:16600115-16799989" + ]) + + VCF_PHASE_SHAPEIT5 ( ref_panel, Channel.of([[],[],[]]).collect(),Channel.of([[],[],[]]).collect(),Channel.of([[],[]]).collect() ) +} + +workflow test_vcf_phase_shapeit5_ind { + input_vcf = Channel.of([ + [ id:'input_1-ind_2',region:"chr21:16600115-16799989"], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", + checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", + checkIfExists: true) + ]) + ref_panel = Channel.of([ + [ id:'ref-panel'], + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", + checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", + checkIfExists: true) + ]) + ch_map = Channel.of([ + [ id:'map_1'], + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true) + ]) + BCFTOOLS_VIEW(input_vcf, [], [], []) + BCFTOOLS_INDEX(BCFTOOLS_VIEW.out.vcf) + + input_vcf = BCFTOOLS_VIEW.out.vcf + .join(BCFTOOLS_INDEX.out.csi) + .combine(Channel.of([[],"chr21:16600115-16799989"])) + + VCF_PHASE_SHAPEIT5 ( input_vcf, ref_panel.collect(),Channel.of([[],[],[]]).collect(),ch_map.collect()) + +} diff --git a/tests/subworkflows/nf-core/vcf_phase_shapeit5/nextflow.config b/tests/subworkflows/nf-core/vcf_phase_shapeit5/nextflow.config new file mode 100644 index 00000000000..41602e9fd07 --- /dev/null +++ b/tests/subworkflows/nf-core/vcf_phase_shapeit5/nextflow.config @@ -0,0 +1,13 @@ +process { + withName: BEDTOOLS_MAKEWINDOWS { + ext.args = '-w 60000 -s 40000' + ext.prefix = { "${meta.id}_${meta.region}" } + } + withName: BCFTOOLS_VIEW { + ext.args = [ + "-e 'GT=\"./.\"||GT=\".\"'" + ].join(' ') + } + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/subworkflows/nf-core/vcf_phase_shapeit5/test.yml b/tests/subworkflows/nf-core/vcf_phase_shapeit5/test.yml new file mode 100644 index 00000000000..53ef8463391 --- /dev/null +++ b/tests/subworkflows/nf-core/vcf_phase_shapeit5/test.yml @@ -0,0 +1,57 @@ +- name: vcf_phase_shapeit5 test_vcf_phase_shapeit5_panel + command: nextflow run ./tests/subworkflows/nf-core/vcf_phase_shapeit5 -entry test_vcf_phase_shapeit5_panel -c ./tests/config/nextflow.config + tags: + - bcftools + - bcftools/index + - bedtools + - bedtools/makewindows + - shapeit5 + - shapeit5/ligate + - shapeit5/phasecommon + - subworkflows + - subworkflows/vcf_phase_shapeit5 + files: + - path: output/bedtools/input_1-ind_2_chr21:16600115-16799989.bed + md5sum: d2ae8a51fbfe83eb5c4fe782752ed069 + - path: output/shapeit5/input_1-ind_2.vcf.gz + - path: output/shapeit5/input_1-ind_2_chr21-16600115-16660115.vcf.gz + - path: output/shapeit5/input_1-ind_2_chr21-16640115-16700115.vcf.gz + - path: output/shapeit5/input_1-ind_2_chr21-16680115-16740115.vcf.gz + - path: output/shapeit5/input_1-ind_2_chr21-16720115-16780115.vcf.gz + - path: output/shapeit5/input_1-ind_2_chr21-16760115-16799989.vcf.gz + - path: output/vcf/input_1-ind_2.vcf.gz.csi + - path: output/vcf/input_1-ind_2_chr21-16600115-16660115.vcf.gz.csi + - path: output/vcf/input_1-ind_2_chr21-16640115-16700115.vcf.gz.csi + - path: output/vcf/input_1-ind_2_chr21-16680115-16740115.vcf.gz.csi + - path: output/vcf/input_1-ind_2_chr21-16720115-16780115.vcf.gz.csi + - path: output/vcf/input_1-ind_2_chr21-16760115-16799989.vcf.gz.csi + +- name: vcf_phase_shapeit5 test_vcf_phase_shapeit5_ind + command: nextflow run ./tests/subworkflows/nf-core/vcf_phase_shapeit5 -entry test_vcf_phase_shapeit5_ind -c ./tests/config/nextflow.config + tags: + - bcftools + - bcftools/index + - bedtools + - bedtools/makewindows + - shapeit5 + - shapeit5/ligate + - shapeit5/phasecommon + - subworkflows + - subworkflows/vcf_phase_shapeit5 + files: + - path: output/bcftools/input_1-ind_2.vcf.gz + - path: output/bcftools/input_1-ind_2.vcf.gz.csi + - path: output/bedtools/input_1-ind_2_chr21:16600115-16799989.bed + md5sum: d2ae8a51fbfe83eb5c4fe782752ed069 + - path: output/shapeit5/input_1-ind_2.vcf.gz + - path: output/shapeit5/input_1-ind_2_chr21-16600115-16660115.vcf.gz + - path: output/shapeit5/input_1-ind_2_chr21-16640115-16700115.vcf.gz + - path: output/shapeit5/input_1-ind_2_chr21-16680115-16740115.vcf.gz + - path: output/shapeit5/input_1-ind_2_chr21-16720115-16780115.vcf.gz + - path: output/shapeit5/input_1-ind_2_chr21-16760115-16799989.vcf.gz + - path: output/vcf/input_1-ind_2.vcf.gz.csi + - path: output/vcf/input_1-ind_2_chr21-16600115-16660115.vcf.gz.csi + - path: output/vcf/input_1-ind_2_chr21-16640115-16700115.vcf.gz.csi + - path: output/vcf/input_1-ind_2_chr21-16680115-16740115.vcf.gz.csi + - path: output/vcf/input_1-ind_2_chr21-16720115-16780115.vcf.gz.csi + - path: output/vcf/input_1-ind_2_chr21-16760115-16799989.vcf.gz.csi From b030c7bb686c669dd5a67012a311f01e55883486 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Wed, 5 Apr 2023 10:59:12 +0100 Subject: [PATCH 046/120] Fixed the `bamcmp`module tests (#3245) * These channels now need a meta map * Fixed the MD5 checksums --- tests/modules/nf-core/bamcmp/main.nf | 10 ++++++++-- tests/modules/nf-core/bamcmp/test.yml | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/modules/nf-core/bamcmp/main.nf b/tests/modules/nf-core/bamcmp/main.nf index 85d0dc5ad3c..523f1e392bb 100644 --- a/tests/modules/nf-core/bamcmp/main.nf +++ b/tests/modules/nf-core/bamcmp/main.nf @@ -19,8 +19,14 @@ workflow test_bamcmp { [ file(params.test_data['homo_sapiens']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] ] - fasta1 = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fasta2 = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta1 = [ + [ id:'homo_sapiens_genome'], // meta map + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + fasta2 = [ + [ id:'sarscov2_genome'], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] BWA_INDEX ( fasta1 ) BWA_MEM ( input, BWA_INDEX.out.index, false ) diff --git a/tests/modules/nf-core/bamcmp/test.yml b/tests/modules/nf-core/bamcmp/test.yml index a7b65bae1f5..47cdaba8171 100644 --- a/tests/modules/nf-core/bamcmp/test.yml +++ b/tests/modules/nf-core/bamcmp/test.yml @@ -4,8 +4,8 @@ - bamcmp files: - path: output/bamcmp/test_contamination.bam - md5sum: 1fe730936d489c637479c1e51dd8ca55 + md5sum: 5379655d8befef5a3c4b4e56c20de15f - path: output/bamcmp/test_primary.bam - md5sum: 80b9abd8ef83e63548a9b8b82be2a034 + md5sum: e267741b9549068cd6f5fc98d8ff529d - path: output/bamcmp/versions.yml md5sum: 34d569665ff0459e84114e966dd3483b From ca5d67df0f89b671c19f5e15062e9f8f75cd3624 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Wed, 5 Apr 2023 10:59:23 +0100 Subject: [PATCH 047/120] Cannot use MD5 checksums because the files contain the date of the day (#3242) * Cannot use MD5 checksums because the files contain the date of the day * Completed the renaming of bam_variant_calling_freebayes to bam_variant_calling_sort_freebayes_bcftools * Explain why we can't have MD5 checksums --- tests/config/pytest_modules.yml | 6 ++--- tests/modules/nf-core/freebayes/test.yml | 23 +++++++++++-------- .../main.nf | 0 .../nextflow.config | 0 .../test.yml | 10 ++++---- 5 files changed, 22 insertions(+), 17 deletions(-) rename tests/subworkflows/nf-core/{bam_variant_calling_freebayes => bam_variant_calling_sort_freebayes_bcftools}/main.nf (100%) rename tests/subworkflows/nf-core/{bam_variant_calling_freebayes => bam_variant_calling_sort_freebayes_bcftools}/nextflow.config (100%) rename tests/subworkflows/nf-core/{bam_variant_calling_freebayes => bam_variant_calling_sort_freebayes_bcftools}/test.yml (65%) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 616563e9c2e..5225f5d1dda 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3297,9 +3297,9 @@ subworkflows/bam_tumor_normal_somatic_variant_calling_gatk: - subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/** - tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/** -subworkflows/bam_variant_calling_freebayes: - - subworkflows/nf-core/bam_variant_calling_freebayes/** - - tests/subworkflows/nf-core/bam_variant_calling_freebayes/** +subworkflows/bam_variant_calling_sort_freebayes_bcftools: + - subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/** + - tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/** subworkflows/bam_variant_demix_boot_freyja: - subworkflows/nf-core/bam_variant_demix_boot_freyja/** diff --git a/tests/modules/nf-core/freebayes/test.yml b/tests/modules/nf-core/freebayes/test.yml index 943e6db1681..0413abe6a49 100644 --- a/tests/modules/nf-core/freebayes/test.yml +++ b/tests/modules/nf-core/freebayes/test.yml @@ -3,8 +3,9 @@ tags: - freebayes files: - - path: output/freebayes/test.vcf.gz - md5sum: 4978a2f69d7419db9e5a740cba925d19 + - path: output/freebayes/test.vcf.gz # No md5sum because the file includes a timestamp + contains: + - "MT192765.1\t10214\t.\tATTTAC\tATTAC\t29.8242" - path: output/freebayes/versions.yml - name: freebayes test_freebayes_bed @@ -12,8 +13,7 @@ tags: - freebayes files: - - path: output/freebayes/test.vcf.gz - md5sum: dfb4e3539ebb058ca966d6185e139063 + - path: output/freebayes/test.vcf.gz # No md5sum because the file includes a timestamp - path: output/freebayes/versions.yml - name: freebayes test_freebayes_cram @@ -21,8 +21,9 @@ tags: - freebayes files: - - path: output/freebayes/test.vcf.gz - md5sum: 178263bc22b281fa3a664835b3a8e7c8 + - path: output/freebayes/test.vcf.gz # No md5sum because the file includes a timestamp + contains: + - "chr22\t1982\t.\tA\tG\t459.724" - path: output/freebayes/versions.yml - name: freebayes test_freebayes_somatic @@ -30,8 +31,9 @@ tags: - freebayes files: - - path: output/freebayes/test.vcf.gz - md5sum: 17f07152aa92ef3ac492893b2b55d9fd + - path: output/freebayes/test.vcf.gz # No md5sum because the file includes a timestamp + contains: + - "chr22\t1982\t.\tA\tG\t670.615" - path: output/freebayes/versions.yml - name: freebayes test_freebayes_somatic_cram_intervals @@ -39,6 +41,7 @@ tags: - freebayes files: - - path: output/freebayes/test.vcf.gz - md5sum: f5a3a6090d7ffac889a2bf4c23c93a86 + - path: output/freebayes/test.vcf.gz # No md5sum because the file includes a timestamp + contains: + - "chr22\t1982\t.\tA\tG\t670.615" - path: output/freebayes/versions.yml diff --git a/tests/subworkflows/nf-core/bam_variant_calling_freebayes/main.nf b/tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/main.nf similarity index 100% rename from tests/subworkflows/nf-core/bam_variant_calling_freebayes/main.nf rename to tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/main.nf diff --git a/tests/subworkflows/nf-core/bam_variant_calling_freebayes/nextflow.config b/tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/nextflow.config similarity index 100% rename from tests/subworkflows/nf-core/bam_variant_calling_freebayes/nextflow.config rename to tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/nextflow.config diff --git a/tests/subworkflows/nf-core/bam_variant_calling_freebayes/test.yml b/tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/test.yml similarity index 65% rename from tests/subworkflows/nf-core/bam_variant_calling_freebayes/test.yml rename to tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/test.yml index 9cdeded2951..97227984095 100644 --- a/tests/subworkflows/nf-core/bam_variant_calling_freebayes/test.yml +++ b/tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/test.yml @@ -1,4 +1,4 @@ -- name: bam_variant_calling_freebayes test_bam_variant_calling_sort_freebayes_bcftools +- name: bam_variant_calling_sort_freebayes_bcftools test_bam_variant_calling_sort_freebayes_bcftools command: nextflow run ./tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools -entry test_bam_variant_calling_sort_freebayes_bcftools -c ./tests/config/nextflow.config tags: - bcftools @@ -9,8 +9,10 @@ - subworkflows/bam_variant_calling_sort_freebayes_bcftools files: - path: output/bcftools/aligned.sorted.vcf.gz - md5sum: 346be926e2d8b1f57188bea16e43ece6 + contains: + - "chr22\t1982\t.\tA\tG\t459.724" - path: output/bcftools/aligned.sorted.vcf.gz.csi - md5sum: 70f91929264347b73c7a4c91e2c6606d + md5sum: 93ecb3ee8fb165cbd754e1a1676e41fe - path: output/freebayes/aligned.vcf.gz - md5sum: 2226beea7f94e4672d158b9067f19aaa + contains: + - "chr22\t1982\t.\tA\tG\t459.724" From 700486852c27d8d44bd750799c69f208bb624fed Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 5 Apr 2023 15:13:42 +0200 Subject: [PATCH 048/120] gatk/markduplicatesspark: add bam index output (#3263) add bam index output --- modules/nf-core/gatk4/markduplicatesspark/main.nf | 1 + modules/nf-core/gatk4/markduplicatesspark/meta.yml | 10 +++++++--- .../modules/nf-core/gatk4/markduplicatesspark/test.yml | 6 +++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/gatk4/markduplicatesspark/main.nf b/modules/nf-core/gatk4/markduplicatesspark/main.nf index 18fe6325e54..b1716584d58 100644 --- a/modules/nf-core/gatk4/markduplicatesspark/main.nf +++ b/modules/nf-core/gatk4/markduplicatesspark/main.nf @@ -13,6 +13,7 @@ process GATK4_MARKDUPLICATES_SPARK { output: tuple val(meta), path("${prefix}"), emit: output + tuple val(meta), path("${prefix}.bai"), emit: bam_index, optional:true tuple val(meta), path("*.metrics"), emit: metrics, optional: true path "versions.yml" , emit: versions diff --git a/modules/nf-core/gatk4/markduplicatesspark/meta.yml b/modules/nf-core/gatk4/markduplicatesspark/meta.yml index 59be9b6dacf..00d080801a6 100644 --- a/modules/nf-core/gatk4/markduplicatesspark/meta.yml +++ b/modules/nf-core/gatk4/markduplicatesspark/meta.yml @@ -49,10 +49,14 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - bam: + - output: type: file - description: Marked duplicates BAM file - pattern: "*.{bam}" + description: Marked duplicates BAM/CRAM file + pattern: "*.{bam,cram}" + - bam_index: + type: file + description: Optional BAM index file + pattern: "*.bai" authors: - "@ajodeh-juma" diff --git a/tests/modules/nf-core/gatk4/markduplicatesspark/test.yml b/tests/modules/nf-core/gatk4/markduplicatesspark/test.yml index 91e045f9b69..2d3a184fd21 100644 --- a/tests/modules/nf-core/gatk4/markduplicatesspark/test.yml +++ b/tests/modules/nf-core/gatk4/markduplicatesspark/test.yml @@ -6,6 +6,8 @@ files: - path: output/gatk4/test.bam md5sum: dc1a09ac6371aab7c50d1a554baa06d3 + - path: output/gatk4/test.bam.bai + md5sum: 253c47e57247a2cee11afcbb414122a4 - path: output/gatk4/versions.yml - name: gatk4 markduplicatesspark test_gatk4_markduplicates_spark_multiple_bams @@ -15,7 +17,7 @@ - gatk4 files: - path: output/gatk4/test.bam - md5sum: 898cb0a6616897d8ada90bab53bf0837 + - path: output/gatk4/test.bam.bai - path: output/gatk4/versions.yml - name: gatk4 markduplicatesspark test_gatk4_markduplicates_spark_multiple_bams_cram_out @@ -35,5 +37,7 @@ files: - path: output/gatk4/test.bam md5sum: 898cb0a6616897d8ada90bab53bf0837 + - path: output/gatk4/test.bam.bai + md5sum: 7f7e858d1ded1cca89b373eb817fcb45 - path: output/gatk4/test.metrics - path: output/gatk4/versions.yml From e7801603532df26b4bb4ef324ca2c39f7a4d0eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Wed, 5 Apr 2023 16:27:49 +0200 Subject: [PATCH 049/120] fix output path glob in vsearch/sort (#3265) fix output path glob --- modules/nf-core/vsearch/sort/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/vsearch/sort/main.nf b/modules/nf-core/vsearch/sort/main.nf index 5f41002519f..a6f06535f13 100644 --- a/modules/nf-core/vsearch/sort/main.nf +++ b/modules/nf-core/vsearch/sort/main.nf @@ -12,8 +12,8 @@ process VSEARCH_SORT { val sort_arg output: - tuple val(meta), path("*_sorted.fasta"), emit: fasta - path "versions.yml" , emit: versions + tuple val(meta), path("*.fasta"), emit: fasta + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when From a5a5bb12e7cc25658fdc97d810f2d6688cdae169 Mon Sep 17 00:00:00 2001 From: Anan Ibrahim <81744003+Darcy220606@users.noreply.github.com> Date: Wed, 5 Apr 2023 16:46:25 +0200 Subject: [PATCH 050/120] Update macrel version to 1.2.0 (#3001) * Update MACREL version to newest * Update the test.yml for new macrel version * modify macrel/contigs test.yml * Fix test.yml * fix md5sum * Fix md5sum test.yml * modify .yml per review * main.nf lint * Remove MD5-sums for the `smorfs` file Remove the md5 sums for the `smorfs` file because it changes with conda and docker/singularity. --- modules/nf-core/macrel/contigs/main.nf | 6 +++--- tests/modules/nf-core/macrel/contigs/test.yml | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/nf-core/macrel/contigs/main.nf b/modules/nf-core/macrel/contigs/main.nf index 624961521bc..1eb1c0a07ab 100644 --- a/modules/nf-core/macrel/contigs/main.nf +++ b/modules/nf-core/macrel/contigs/main.nf @@ -2,10 +2,10 @@ process MACREL_CONTIGS { tag "$meta.id" label 'process_medium' - conda "bioconda::macrel=1.1.0" + conda "bioconda::macrel=1.2.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/macrel:1.1.0--py36hc5360cc_0': - 'quay.io/biocontainers/macrel:1.1.0--py36hc5360cc_0' }" + 'https://depot.galaxyproject.org/singularity/macrel:1.2.0--pyh5e36f6f_0': + 'quay.io/biocontainers/macrel:1.2.0--pyh5e36f6f_0' }" input: tuple val(meta), path(fasta) diff --git a/tests/modules/nf-core/macrel/contigs/test.yml b/tests/modules/nf-core/macrel/contigs/test.yml index 708aac9f7ae..fcc66c21d09 100644 --- a/tests/modules/nf-core/macrel/contigs/test.yml +++ b/tests/modules/nf-core/macrel/contigs/test.yml @@ -1,16 +1,13 @@ - name: macrel contigs test_macrel_contigs command: nextflow run ./tests/modules/nf-core/macrel/contigs -entry test_macrel_contigs -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/macrel/contigs/nextflow.config tags: - - macrel/contigs - macrel + - macrel/contigs files: - path: output/macrel/test/README.md md5sum: fa3706dfc95d0538a52c4d0d824be5fb - path: output/macrel/test/test.all_orfs.faa.gz - path: output/macrel/test/test.prediction.gz - path: output/macrel/test/test.smorfs.faa.gz - md5sum: 79704c6120c2f794518301af6f9b963d - path: output/macrel/test/test_log.txt - md5sum: 6fdba143dce759597eb9f80e5d968729 - path: output/macrel/versions.yml - md5sum: be8bf0d0647751c635c3736655f29f85 From 315a3860cc8d22991e2d5e9f066cb79635794263 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:13:49 +0200 Subject: [PATCH 051/120] new module wisecondorx/predict (#3266) * new module wisecondorx/predict * fix linting * update blacklist --- modules/nf-core/wisecondorx/predict/main.nf | 62 +++++++++++++++++ modules/nf-core/wisecondorx/predict/meta.yml | 66 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../nf-core/wisecondorx/predict/main.nf | 32 +++++++++ .../wisecondorx/predict/nextflow.config | 5 ++ .../nf-core/wisecondorx/predict/test.yml | 9 +++ 6 files changed, 178 insertions(+) create mode 100644 modules/nf-core/wisecondorx/predict/main.nf create mode 100644 modules/nf-core/wisecondorx/predict/meta.yml create mode 100644 tests/modules/nf-core/wisecondorx/predict/main.nf create mode 100644 tests/modules/nf-core/wisecondorx/predict/nextflow.config create mode 100644 tests/modules/nf-core/wisecondorx/predict/test.yml diff --git a/modules/nf-core/wisecondorx/predict/main.nf b/modules/nf-core/wisecondorx/predict/main.nf new file mode 100644 index 00000000000..4498c1eaee2 --- /dev/null +++ b/modules/nf-core/wisecondorx/predict/main.nf @@ -0,0 +1,62 @@ +process WISECONDORX_PREDICT { + tag "$meta.id" + label 'process_low' + + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + conda "bioconda::wisecondorx=1.2.5" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/wisecondorx:1.2.5--pyh5e36f6f_0': + 'quay.io/biocontainers/wisecondorx:1.2.5--pyh5e36f6f_0' }" + + input: + tuple val(meta), path(npz) + tuple val(meta2), path(reference) + tuple val(meta3), path(blacklist) + + output: + tuple val(meta), path("*.bed"), emit: bed, optional:true + tuple val(meta), path("*.png"), emit: plot, optional:true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '--bed --plot' + def prefix = task.ext.prefix ?: "${meta.id}" + def bed = blacklist ? "--blacklist ${blacklist}" : "" + + def VERSION = '1.2.5' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + + """ + WisecondorX predict \\ + ${npz} \\ + ${reference} \\ + ${prefix} \\ + ${bed} \\ + ${args} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wisecondorx: ${VERSION} + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '--bed --plot' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '1.2.5' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + + def bed = args.contains("--bed") ? "touch ${prefix}.bed" : "" + def plot = args.contains("--plot") ? "touch ${prefix}.png" : "" + + """ + ${bed} + ${plot} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wisecondorx: ${VERSION} + END_VERSIONS + """ +} diff --git a/modules/nf-core/wisecondorx/predict/meta.yml b/modules/nf-core/wisecondorx/predict/meta.yml new file mode 100644 index 00000000000..34a8b7c3220 --- /dev/null +++ b/modules/nf-core/wisecondorx/predict/meta.yml @@ -0,0 +1,66 @@ +name: "wisecondorx_predict" +description: Find copy number aberrations +keywords: + - copy number variation + - bed + - npz + - png +tools: + - "wisecondorx": + description: "WIthin-SamplE COpy Number aberration DetectOR, including sex chromosomes" + homepage: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" + documentation: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" + tool_dev_url: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" + doi: "10.1093/nar/gky1263" + licence: "['Attribution-NonCommercial-ShareAlike CC BY-NC-SA']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - npz: + type: file + description: An NPZ file created with WisecondorX convert + pattern: "*.npz" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test', single_end:false ] + - reference: + type: file + description: A reference NPZ file created with WisecondorX newref + pattern: "*.npz" + - meta3: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - blacklist: + type: file + description: OPTIONAL - A BED file containing blacklist regions (used mainly when the reference is small) + pattern: "*.bed" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - bed: + type: file + description: OPTIONAL - Output in BED format containing the most important information + pattern: "*.bed" + - plot: + type: file + description: OPTIONAL - Output in PNG format to easily visualize the results + pattern: "*.png" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 5225f5d1dda..e1d51cab791 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3702,6 +3702,10 @@ wisecondorx/convert: - modules/nf-core/wisecondorx/convert/** - tests/modules/nf-core/wisecondorx/convert/** +wisecondorx/predict: + - modules/nf-core/wisecondorx/predict/** + - tests/modules/nf-core/wisecondorx/predict/** + wisecondorx/newref: - modules/nf-core/wisecondorx/newref/** - tests/modules/nf-core/wisecondorx/newref/** diff --git a/tests/modules/nf-core/wisecondorx/predict/main.nf b/tests/modules/nf-core/wisecondorx/predict/main.nf new file mode 100644 index 00000000000..dfbbbf17b62 --- /dev/null +++ b/tests/modules/nf-core/wisecondorx/predict/main.nf @@ -0,0 +1,32 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { WISECONDORX_PREDICT } from '../../../../../modules/nf-core/wisecondorx/predict/main.nf' +include { WISECONDORX_CONVERT } from '../../../../../modules/nf-core/wisecondorx/convert/main.nf' + +workflow test_wisecondorx_predict { + + sample = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam_bai'], checkIfExists: true) + ] + + WISECONDORX_CONVERT ( + sample, + [[],[]], + [[],[]] + ) + + reference = [ + [ id:'reference' ], + file("reference.npz") + ] + + WISECONDORX_PREDICT ( + WISECONDORX_CONVERT.out.npz, + reference, + [[],[]] + ) +} diff --git a/tests/modules/nf-core/wisecondorx/predict/nextflow.config b/tests/modules/nf-core/wisecondorx/predict/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/wisecondorx/predict/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/wisecondorx/predict/test.yml b/tests/modules/nf-core/wisecondorx/predict/test.yml new file mode 100644 index 00000000000..3288cb7164d --- /dev/null +++ b/tests/modules/nf-core/wisecondorx/predict/test.yml @@ -0,0 +1,9 @@ +- name: "wisecondorx predict" + command: nextflow run ./tests/modules/nf-core/wisecondorx/predict -entry test_wisecondorx_predict -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/wisecondorx/predict/nextflow.config -stub + tags: + - "wisecondorx" + - "wisecondorx/predict" + files: + - path: "output/wisecondorx/test.bed" + - path: "output/wisecondorx/test.png" + - path: "output/wisecondorx/versions.yml" From b515ac767b7bd14d64f3248b9ecf8a7a2c28fae0 Mon Sep 17 00:00:00 2001 From: Florian Wuennemann Date: Thu, 6 Apr 2023 16:06:24 +0200 Subject: [PATCH 052/120] Increased version of container to 0.4.1 (#3269) --- modules/nf-core/deepcell/mesmer/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/deepcell/mesmer/main.nf b/modules/nf-core/deepcell/mesmer/main.nf index f3c02f687b7..8bff71c3f37 100644 --- a/modules/nf-core/deepcell/mesmer/main.nf +++ b/modules/nf-core/deepcell/mesmer/main.nf @@ -2,7 +2,7 @@ process DEEPCELL_MESMER { tag "$meta.id" label 'process_single' - container "vanvalenlab/deepcell-applications:0.4.0" + container "vanvalenlab/deepcell-applications:0.4.1" input: tuple val(meta) , path(img) From 0b464d9392559f2b32e8f008e953563c199a896c Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Thu, 6 Apr 2023 15:29:14 +0100 Subject: [PATCH 053/120] Updated the MD5 checksums of all controlfreec tests (#3248) --- .../modules/nf-core/controlfreec/assesssignificance/test.yml | 2 +- tests/modules/nf-core/controlfreec/freec2bed/test.yml | 4 +++- tests/modules/nf-core/controlfreec/freec2circos/test.yml | 4 +++- tests/modules/nf-core/controlfreec/makegraph/test.yml | 5 ++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/modules/nf-core/controlfreec/assesssignificance/test.yml b/tests/modules/nf-core/controlfreec/assesssignificance/test.yml index 94740f8fa0a..62e74e2243f 100644 --- a/tests/modules/nf-core/controlfreec/assesssignificance/test.yml +++ b/tests/modules/nf-core/controlfreec/assesssignificance/test.yml @@ -5,7 +5,7 @@ - controlfreec files: - path: output/controlfreec/test.p.value.txt - md5sum: 44e23b916535fbc1a3f47b57fad292df + md5sum: 94bf84d58c9696f116a9a6d8cb350e14 - path: output/controlfreec/versions.yml - name: controlfreec assesssignificance test_controlfreec_assesssignificance_single diff --git a/tests/modules/nf-core/controlfreec/freec2bed/test.yml b/tests/modules/nf-core/controlfreec/freec2bed/test.yml index 9a632817e00..330772c7403 100644 --- a/tests/modules/nf-core/controlfreec/freec2bed/test.yml +++ b/tests/modules/nf-core/controlfreec/freec2bed/test.yml @@ -5,7 +5,8 @@ - controlfreec files: - path: output/controlfreec/test.bed - md5sum: abe10b7ce94ba903503e697394c17297 + md5sum: 833920178e4f40a296d8eab029caf086 + - path: output/controlfreec/versions.yml - name: controlfreec freec2bed test_controlfreec_freec2bed_single command: nextflow run ./tests/modules/nf-core/controlfreec/freec2bed -entry test_controlfreec_freec2bed_single -c ./tests/config/nextflow.config -stub-run @@ -14,3 +15,4 @@ - controlfreec files: - path: output/controlfreec/test.bed + - path: output/controlfreec/versions.yml diff --git a/tests/modules/nf-core/controlfreec/freec2circos/test.yml b/tests/modules/nf-core/controlfreec/freec2circos/test.yml index 6fa51b7ec1c..6ea2cb217d7 100644 --- a/tests/modules/nf-core/controlfreec/freec2circos/test.yml +++ b/tests/modules/nf-core/controlfreec/freec2circos/test.yml @@ -5,7 +5,8 @@ - controlfreec/freec2circos files: - path: output/controlfreec/test.circos.txt - md5sum: 19cf35f2c36b46f717dc8342b8a5a645 + md5sum: 92ce5ce97b27a7214dfa9c2cb20cf854 + - path: output/controlfreec/versions.yml - name: controlfreec freec2circos test_controlfreec_freec2circos_single command: nextflow run ./tests/modules/nf-core/controlfreec/freec2circos -entry test_controlfreec_freec2circos_single -c ./tests/config/nextflow.config -stub-run @@ -14,3 +15,4 @@ - controlfreec/freec2circos files: - path: output/controlfreec/test.circos.txt + - path: output/controlfreec/versions.yml diff --git a/tests/modules/nf-core/controlfreec/makegraph/test.yml b/tests/modules/nf-core/controlfreec/makegraph/test.yml index 803b0889336..398d3f3ebe0 100644 --- a/tests/modules/nf-core/controlfreec/makegraph/test.yml +++ b/tests/modules/nf-core/controlfreec/makegraph/test.yml @@ -5,11 +5,9 @@ - controlfreec/makegraph files: - path: output/controlfreec/test_BAF.png - md5sum: f9d977839e09c7e2472d970bd4aa834c - path: output/controlfreec/test_ratio.log2.png - md5sum: b3c7916b1b4951a0cc3da20d8e9e0262 - path: output/controlfreec/test_ratio.png - md5sum: 1435b29536b3b1555b4c423f8f4fb000 + - path: output/controlfreec/versions.yml - name: controlfreec makegraph test_controlfreec_makegraph_single command: nextflow run ./tests/modules/nf-core/controlfreec/makegraph -entry test_controlfreec_makegraph_single -c ./tests/config/nextflow.config -stub-run @@ -20,3 +18,4 @@ - path: output/controlfreec/test_BAF.png - path: output/controlfreec/test_ratio.log2.png - path: output/controlfreec/test_ratio.png + - path: output/controlfreec/versions.yml From f52220e84bfc16a8616a5bb3d6f5bc67d601bdce Mon Sep 17 00:00:00 2001 From: Verena Kutschera Date: Fri, 7 Apr 2023 12:03:02 +0200 Subject: [PATCH 054/120] New mitohifi/findmitoreference module (#3135) * Create template for mitohifi/findmitoreference with nf-core modules create mitohifi/findmitoreference * Create template for mitohifi/mitohifi with nf-core modules create mitohifi/mitohifi * Update conda and container directives * Revert to template without groovy map * Update conda and container directives * Add code to script block * Add input and output channels * Removed task.ext.args because there are no additional optional arguments available for findMitoReference.py * Add a description of the module and list keywords * Add a description and other details for the software below * Add a description of all of the variables used as input * Add a description of all of the variables used as output * Replace with input to value channels * Add custom modifications to yaml file * Remove mitohifi/mitohifi module * Simplify variable names Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Fix to return only version number * Add a stub section * Replace email with dummy * Formatting * Fix indentation * Replace with official container from MitoHifi github repository * Fix code to run the official MitoHifi Docker image with Docker or Singularity * Fix syntax * Add test.yaml file that was created by running nf-core modules create-test-yml mitohifi/findmitoreference * Create empty output files for stub to emulate process Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Use dummy file names in stub section * Switch to biocontainers Docker image * Fix tool and variable names * Fix docker container URL * Remove mitohifi/mitohifi entry * Switching species for automatic testing so that the result is more stable over time * List module so that test for conda is not run * Update to new biocontainer with latest MitoHiFi version * Updated the MD5 --------- Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Co-authored-by: Matthieu Muffato Co-authored-by: Matthieu Muffato --- .github/workflows/pytest-workflow.yml | 10 ++-- .../mitohifi/findmitoreference/main.nf | 47 +++++++++++++++++++ .../mitohifi/findmitoreference/meta.yml | 44 +++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../mitohifi/findmitoreference/main.nf | 14 ++++++ .../findmitoreference/nextflow.config | 5 ++ .../mitohifi/findmitoreference/test.yml | 11 +++++ 7 files changed, 131 insertions(+), 4 deletions(-) create mode 100644 modules/nf-core/mitohifi/findmitoreference/main.nf create mode 100644 modules/nf-core/mitohifi/findmitoreference/meta.yml create mode 100644 tests/modules/nf-core/mitohifi/findmitoreference/main.nf create mode 100644 tests/modules/nf-core/mitohifi/findmitoreference/nextflow.config create mode 100644 tests/modules/nf-core/mitohifi/findmitoreference/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index cd3e7464fce..fed0f088d9e 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -60,6 +60,8 @@ jobs: tags: cellranger/mkgtf - profile: "conda" tags: cellranger/mkref + - profile: "conda" + tags: coreograph - profile: "conda" tags: deepcell/mesmer - profile: "conda" @@ -96,6 +98,10 @@ jobs: tags: merquryfk/merquryfk - profile: "conda" tags: merquryfk/ploidyplot + - profile: "conda" + tags: mitohifi/findmitoreference + - profile: "conda" + tags: scimap/mcmicro - profile: "conda" tags: sentieon/bwaindex - profile: "conda" @@ -108,10 +114,6 @@ jobs: tags: universc - profile: "conda" tags: subworkflows/vcf_annotate_ensemblvep - - profile: "conda" - tags: coreograph - - profile: "conda" - tags: scimap/mcmicro env: NXF_ANSI_LOG: false diff --git a/modules/nf-core/mitohifi/findmitoreference/main.nf b/modules/nf-core/mitohifi/findmitoreference/main.nf new file mode 100644 index 00000000000..25a0c858f81 --- /dev/null +++ b/modules/nf-core/mitohifi/findmitoreference/main.nf @@ -0,0 +1,47 @@ +process MITOHIFI_FINDMITOREFERENCE { + tag '$species' + label 'process_low' + + // Docker image available at the biocontainers Dockerhub + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'docker://biocontainers/mitohifi:3.0.0_cv1': + 'docker.io/biocontainers/mitohifi:3.0.0_cv1' }" + + input: + val species + val email + val min_length + + output: + path "*.fasta", emit: fasta + path "*.gb", emit: gb + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + findMitoReference.py \\ + --species $species \\ + --email $email \\ + --min_length $min_length \\ + --outfolder . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mitohifi: \$( mitohifi.py --version 2>&1 | head -n1 | sed 's/^.*MitoHiFi //; s/ .*\$//' ) + END_VERSIONS + """ + + stub: + """ + touch accession.fasta + touch accession.gb + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mitohifi: \$( mitohifi.py --version 2>&1 | head -n1 | sed 's/^.*MitoHiFi //; s/ .*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/mitohifi/findmitoreference/meta.yml b/modules/nf-core/mitohifi/findmitoreference/meta.yml new file mode 100644 index 00000000000..b892eb67ded --- /dev/null +++ b/modules/nf-core/mitohifi/findmitoreference/meta.yml @@ -0,0 +1,44 @@ +name: "mitohifi_findmitoreference" +description: Download a mitochondrial genome to be used as reference for MitoHiFi +keywords: + - mitochondrial genome + - reference genome + - NCBI +tools: + - "findMitoReference.py": + description: Fetch mitochondrial genome in Fasta and Genbank format from NCBI + homepage: https://github.com/marcelauliano/MitoHiFi + documentation: https://github.com/marcelauliano/MitoHiFi + tool_dev_url: https://github.com/marcelauliano/MitoHiFi + doi: "10.1101/2022.12.23.521667" + licence: ["MIT"] + +input: + - species: + type: string + description: Latin name of the species for which a mitochondrial genome should be fetched + pattern: "[A-Z]?[a-z]* [a-z]*" + - email: + type: string + description: Email address for NCBI query + - min_length: + type: integer + description: Minimum length of the mitochondrial genome + pattern: "[0-9]*" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - fasta: + type: file + description: Downloaded mitochondrial genome in Fasta format + pattern: "*.{fasta,fa}" + - gb: + type: file + description: Downloaded mitochondrial genome in Genbank format + pattern: "*.gb" + +authors: + - "@verku" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index e1d51cab791..ad743f82907 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2206,6 +2206,10 @@ miranda: - modules/nf-core/miranda/** - tests/modules/nf-core/miranda/** +mitohifi/findmitoreference: + - modules/nf-core/mitohifi/findmitoreference/** + - tests/modules/nf-core/mitohifi/findmitoreference/** + mlst: - modules/nf-core/mlst/** - tests/modules/nf-core/mlst/** diff --git a/tests/modules/nf-core/mitohifi/findmitoreference/main.nf b/tests/modules/nf-core/mitohifi/findmitoreference/main.nf new file mode 100644 index 00000000000..0d5ea73e11e --- /dev/null +++ b/tests/modules/nf-core/mitohifi/findmitoreference/main.nf @@ -0,0 +1,14 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MITOHIFI_FINDMITOREFERENCE } from '../../../../../modules/nf-core/mitohifi/findmitoreference/main.nf' + +workflow test_mitohifi_findmitoreference { + + species = "'Phalera flavescens'" + email = "test@email.se" + min_length = 15659 + + MITOHIFI_FINDMITOREFERENCE ( species, email, min_length ) +} diff --git a/tests/modules/nf-core/mitohifi/findmitoreference/nextflow.config b/tests/modules/nf-core/mitohifi/findmitoreference/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/mitohifi/findmitoreference/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/mitohifi/findmitoreference/test.yml b/tests/modules/nf-core/mitohifi/findmitoreference/test.yml new file mode 100644 index 00000000000..cc3c533538a --- /dev/null +++ b/tests/modules/nf-core/mitohifi/findmitoreference/test.yml @@ -0,0 +1,11 @@ +- name: mitohifi findmitoreference test_mitohifi_findmitoreference + command: nextflow run ./tests/modules/nf-core/mitohifi/findmitoreference -entry test_mitohifi_findmitoreference -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/mitohifi/findmitoreference/nextflow.config + tags: + - mitohifi/findmitoreference + - mitohifi + files: + - path: output/mitohifi/NC_072273.1.fasta + md5sum: 14c9906c7eccc0e57482112a452a031a + - path: output/mitohifi/NC_072273.1.gb + md5sum: 9063efc0ee83569566592f0198aa4eb5 + - path: output/mitohifi/versions.yml From 4ba156c7aabf67045aa71b6cc5d5a8729b737f9e Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Fri, 7 Apr 2023 13:30:07 +0100 Subject: [PATCH 055/120] Fixed the `amps` test (#3244) * Updated the URL * These input channels were removed in #2545 They are now passed through `ext.args` * Updated the tuebingen URL in the meta.yml files too --- modules/nf-core/malt/build/meta.yml | 4 ++-- modules/nf-core/malt/run/meta.yml | 2 +- modules/nf-core/megan/daa2info/meta.yml | 2 +- modules/nf-core/megan/rma2info/meta.yml | 2 +- tests/modules/nf-core/amps/main.nf | 8 +++----- tests/modules/nf-core/amps/nextflow.config | 8 ++++++++ 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/malt/build/meta.yml b/modules/nf-core/malt/build/meta.yml index 8f565fa32b6..69e297daecd 100644 --- a/modules/nf-core/malt/build/meta.yml +++ b/modules/nf-core/malt/build/meta.yml @@ -14,7 +14,7 @@ tools: - malt: description: A tool for mapping metagenomic data homepage: https://www.wsi.uni-tuebingen.de/lehrstuehle/algorithms-in-bioinformatics/software/malt/ - documentation: https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf + documentation: https://software-ab.cs.uni-tuebingen.de/download/malt/manual.pdf doi: "10.1038/s41559-017-0446-6" licence: ["GPL v3"] @@ -30,7 +30,7 @@ input: pattern: "*/|*.gff|*.gff3" - mapping_db: type: file - description: MEGAN .db file from https://software-ab.informatik.uni-tuebingen.de/download/megan6/welcome.html + description: MEGAN .db file from https://software-ab.cs.uni-tuebingen.de/download/megan6/welcome.html pattern: "*.db" output: diff --git a/modules/nf-core/malt/run/meta.yml b/modules/nf-core/malt/run/meta.yml index 2a794464247..f5ee655a250 100644 --- a/modules/nf-core/malt/run/meta.yml +++ b/modules/nf-core/malt/run/meta.yml @@ -13,7 +13,7 @@ tools: - malt: description: A tool for mapping metagenomic data homepage: https://www.wsi.uni-tuebingen.de/lehrstuehle/algorithms-in-bioinformatics/software/malt/ - documentation: https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf + documentation: https://software-ab.cs.uni-tuebingen.de/download/malt/manual.pdf doi: "10.1038/s41559-017-0446-6" licence: ["GPL v3"] diff --git a/modules/nf-core/megan/daa2info/meta.yml b/modules/nf-core/megan/daa2info/meta.yml index 0a6bb4429f2..7f5e2420072 100644 --- a/modules/nf-core/megan/daa2info/meta.yml +++ b/modules/nf-core/megan/daa2info/meta.yml @@ -10,7 +10,7 @@ tools: - "megan": description: "A tool for studying the taxonomic content of a set of DNA reads" homepage: "https://uni-tuebingen.de/fakultaeten/mathematisch-naturwissenschaftliche-fakultaet/fachbereiche/informatik/lehrstuehle/algorithms-in-bioinformatics/software/megan6/" - documentation: "https://software-ab.informatik.uni-tuebingen.de/download/megan6/welcome.html" + documentation: "https://software-ab.cs.uni-tuebingen.de/download/megan6/welcome.html" tool_dev_url: "https://github.com/husonlab/megan-ce" doi: "10.1371/journal.pcbi.1004957" licence: "['GPL >=3']" diff --git a/modules/nf-core/megan/rma2info/meta.yml b/modules/nf-core/megan/rma2info/meta.yml index 0f2d5a9b489..710d9346dcf 100644 --- a/modules/nf-core/megan/rma2info/meta.yml +++ b/modules/nf-core/megan/rma2info/meta.yml @@ -9,7 +9,7 @@ tools: - "megan": description: "A tool for studying the taxonomic content of a set of DNA reads" homepage: "https://uni-tuebingen.de/fakultaeten/mathematisch-naturwissenschaftliche-fakultaet/fachbereiche/informatik/lehrstuehle/algorithms-in-bioinformatics/software/megan6/" - documentation: "https://software-ab.informatik.uni-tuebingen.de/download/megan6/welcome.html" + documentation: "https://software-ab.cs.uni-tuebingen.de/download/megan6/welcome.html" tool_dev_url: "https://github.com/husonlab/megan-ce" doi: "10.1371/journal.pcbi.1004957" licence: "['GPL >=3']" diff --git a/tests/modules/nf-core/amps/main.nf b/tests/modules/nf-core/amps/main.nf index e0615367a86..5aa71d11eb0 100644 --- a/tests/modules/nf-core/amps/main.nf +++ b/tests/modules/nf-core/amps/main.nf @@ -14,20 +14,18 @@ workflow test_amps { fastas = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) gff = [] - seq_type = "DNA" - map_db = [ [], file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) ] + map_db = [ [], file("https://software-ab.cs.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) ] input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] - mode = "BlastN" taxon_list = file(params.test_data['sarscov2']['genome']['taxon_list_txt'], checkIfExists: true) ncbi_dir = [ [], file(params.test_data['sarscov2']['genome']['ncbi_taxmap_zip'], checkIfExists: true) ] UNZIP_MALT ( map_db ) UNZIP_MALTEXTRACT ( ncbi_dir ) - MALT_BUILD ( fastas, seq_type, gff, UNZIP_MALT.out.unzipped_archive.map{ it[1] } ) - MALT_RUN ( input, mode, MALT_BUILD.out.index ) + MALT_BUILD ( fastas, gff, UNZIP_MALT.out.unzipped_archive.map{ it[1] } ) + MALT_RUN ( input, MALT_BUILD.out.index ) ch_input_to_maltextract = MALT_RUN.out.rma6.map{ it[1] } MALTEXTRACT ( ch_input_to_maltextract, taxon_list, UNZIP_MALTEXTRACT.out.unzipped_archive.map{ it[1] }) diff --git a/tests/modules/nf-core/amps/nextflow.config b/tests/modules/nf-core/amps/nextflow.config index b58ac3fe652..cd7e8ce5fe0 100644 --- a/tests/modules/nf-core/amps/nextflow.config +++ b/tests/modules/nf-core/amps/nextflow.config @@ -2,6 +2,14 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: MALT_BUILD { + ext.args = '--sequenceType DNA' + } + + withName: MALT_RUN { + ext.args = '--mode BlastN -J-Xmx3G' + } + withName: MALTEXTRACT { ext.args = '-f def_anc' } From 4e3da8d90a9c2131b42ed4c75986f793dbb75237 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Fri, 7 Apr 2023 13:30:24 +0100 Subject: [PATCH 056/120] Delete logg (#3270) --- logg | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 logg diff --git a/logg b/logg deleted file mode 100644 index e69de29bb2d..00000000000 From 880d634b0d5aead9447ae29e3e02e0e31ca7ae7f Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Sat, 8 Apr 2023 19:23:23 +0100 Subject: [PATCH 057/120] Bump shinyngs modules for contrasts, app UI fixes (#3255) * Bump shinyngs module for app script fixes * Bump shinyngs modules to 1.7.1 * Update tests for staticdifferential- old plot was incorrect * Update shinyngs app md5sums * Bump shinyngs exploratory as well * Revert "Bump shinyngs exploratory as well" This reverts commit fd3f0539bd0c3901fe47c15402a13e18935df5fe. * try pining back r-stringi for ci in exploratory module * Fix all Shinyngs software envs --- modules/nf-core/shinyngs/app/main.nf | 6 +++--- modules/nf-core/shinyngs/staticdifferential/main.nf | 6 +++--- modules/nf-core/shinyngs/staticexploratory/main.nf | 6 +++--- modules/nf-core/shinyngs/validatefomcomponents/main.nf | 6 +++--- tests/modules/nf-core/shinyngs/app/test.yml | 4 ++-- tests/modules/nf-core/shinyngs/staticdifferential/test.yml | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/nf-core/shinyngs/app/main.nf b/modules/nf-core/shinyngs/app/main.nf index 67aa04c2b2f..f7fcbd66b03 100644 --- a/modules/nf-core/shinyngs/app/main.nf +++ b/modules/nf-core/shinyngs/app/main.nf @@ -13,10 +13,10 @@ process SHINYNGS_APP { // // Those values must then be set in your Nextflow secrets. - conda "bioconda::r-shinyngs=1.6.0" + conda "bioconda::r-shinyngs=1.7.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.6.0--r42hdfd78af_1': - 'quay.io/biocontainers/r-shinyngs:1.6.0--r42hdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.1--r42hdfd78af_1': + 'quay.io/biocontainers/r-shinyngs:1.7.1--r42hdfd78af_1' }" input: tuple val(meta), path(sample), path(feature_meta), path(assay_files) // Experiment-level info diff --git a/modules/nf-core/shinyngs/staticdifferential/main.nf b/modules/nf-core/shinyngs/staticdifferential/main.nf index 1f9604c31a4..bef46399677 100644 --- a/modules/nf-core/shinyngs/staticdifferential/main.nf +++ b/modules/nf-core/shinyngs/staticdifferential/main.nf @@ -2,10 +2,10 @@ process SHINYNGS_STATICDIFFERENTIAL { tag "$meta.id" label 'process_single' - conda "bioconda::r-shinyngs=1.6.0" + conda "bioconda::r-shinyngs=1.7.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.6.0--r42hdfd78af_1': - 'quay.io/biocontainers/r-shinyngs:1.6.0--r42hdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.1--r42hdfd78af_1': + 'quay.io/biocontainers/r-shinyngs:1.7.1--r42hdfd78af_1' }" input: tuple val(meta), path(differential_result) // Differential info: contrast and differential stats diff --git a/modules/nf-core/shinyngs/staticexploratory/main.nf b/modules/nf-core/shinyngs/staticexploratory/main.nf index 9ee97bf0b0e..c15720873a5 100644 --- a/modules/nf-core/shinyngs/staticexploratory/main.nf +++ b/modules/nf-core/shinyngs/staticexploratory/main.nf @@ -2,10 +2,10 @@ process SHINYNGS_STATICEXPLORATORY { tag "$meta.id" label 'process_single' - conda "bioconda::r-shinyngs=1.5.9" + conda "bioconda::r-shinyngs=1.7.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.5.9--r42hdfd78af_0': - 'quay.io/biocontainers/r-shinyngs:1.5.9--r42hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.1--r42hdfd78af_1': + 'quay.io/biocontainers/r-shinyngs:1.7.1--r42hdfd78af_1' }" input: tuple val(meta), path(sample), path(feature_meta), path(assay_files) diff --git a/modules/nf-core/shinyngs/validatefomcomponents/main.nf b/modules/nf-core/shinyngs/validatefomcomponents/main.nf index 8bf8edf0831..7a488b2eadf 100644 --- a/modules/nf-core/shinyngs/validatefomcomponents/main.nf +++ b/modules/nf-core/shinyngs/validatefomcomponents/main.nf @@ -2,10 +2,10 @@ process SHINYNGS_VALIDATEFOMCOMPONENTS { tag "$sample" label 'process_single' - conda "bioconda::r-shinyngs=1.6.0" + conda "bioconda::r-shinyngs=1.7.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.6.0--r42hdfd78af_1': - 'quay.io/biocontainers/r-shinyngs:1.6.0--r42hdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.1--r42hdfd78af_1': + 'quay.io/biocontainers/r-shinyngs:1.7.1--r42hdfd78af_1' }" input: tuple val(meta), path(sample), path(assay_files) diff --git a/tests/modules/nf-core/shinyngs/app/test.yml b/tests/modules/nf-core/shinyngs/app/test.yml index a5c0ad67781..14512f49bc8 100644 --- a/tests/modules/nf-core/shinyngs/app/test.yml +++ b/tests/modules/nf-core/shinyngs/app/test.yml @@ -7,7 +7,7 @@ - path: output/shinyngs/SRP254919/app.R md5sum: bedcfc45b6cdcc2b8fe3627987e2b17a - path: output/shinyngs/SRP254919/data.rds - md5sum: 0586736611a66cc0dc784d378b87b050 + md5sum: e44dcb923603fae634687219e086b4af - path: output/shinyngs/versions.yml - name: shinyngs app test_shinyngs_app_single_matrix @@ -19,5 +19,5 @@ - path: output/shinyngs/SRP254919/app.R md5sum: bedcfc45b6cdcc2b8fe3627987e2b17a - path: output/shinyngs/SRP254919/data.rds - md5sum: 0dc671ba12f2d69723a9adb40d1f1bfa + md5sum: 40935136af5264cebd85e6d63c95b5f9 - path: output/shinyngs/versions.yml diff --git a/tests/modules/nf-core/shinyngs/staticdifferential/test.yml b/tests/modules/nf-core/shinyngs/staticdifferential/test.yml index 0a1a184e074..614713d335a 100644 --- a/tests/modules/nf-core/shinyngs/staticdifferential/test.yml +++ b/tests/modules/nf-core/shinyngs/staticdifferential/test.yml @@ -13,5 +13,5 @@ - shinyngs files: - path: output/shinyngs/hND6_vs_mCherry_test/html/volcano.html - contains: ["-4.03005359258353,-3.03040865173003,null", "higher in mCherry"] + contains: ["-4.0303380084,-0.0628302706,-0.3602268157,-0.6082456431", "higher in mCherry"] - path: output/shinyngs/hND6_vs_mCherry_test/png/volcano.png From fc2e38dcf6b3cdbe858a83a9457c1b1e018a33b5 Mon Sep 17 00:00:00 2001 From: Damon-Lee Pointon <51855558+DLBPointon@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:36:44 +0100 Subject: [PATCH 058/120] New Module: Seqtk cutN (#3239) * Addition of module #3221 * Addition of module #3221 * Addition of module #3221 * Prettier fix * Update test.yml * a fix to test.yml * modified: tests/modules/nf-core/seqtk/cutn/test.yml * Update tests/modules/nf-core/seqtk/cutn/test.yml Co-authored-by: Priyanka Surana * Update modules/nf-core/seqtk/cutn/meta.yml Replace key for input file to match main.nf Co-authored-by: Priyanka Surana * Update modules/nf-core/seqtk/cutn/meta.yml Replace key to match main.nf Co-authored-by: Priyanka Surana * Update modules/nf-core/seqtk/cutn/main.nf Adding new line to split up command Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --------- Co-authored-by: Priyanka Surana Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- modules/nf-core/seqtk/cutn/main.nf | 49 +++++++++++++++++++ modules/nf-core/seqtk/cutn/meta.yml | 41 ++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/seqtk/cutn/main.nf | 17 +++++++ .../nf-core/seqtk/cutn/nextflow.config | 5 ++ tests/modules/nf-core/seqtk/cutn/test.yml | 9 ++++ 6 files changed, 125 insertions(+) create mode 100644 modules/nf-core/seqtk/cutn/main.nf create mode 100644 modules/nf-core/seqtk/cutn/meta.yml create mode 100644 tests/modules/nf-core/seqtk/cutn/main.nf create mode 100644 tests/modules/nf-core/seqtk/cutn/nextflow.config create mode 100644 tests/modules/nf-core/seqtk/cutn/test.yml diff --git a/modules/nf-core/seqtk/cutn/main.nf b/modules/nf-core/seqtk/cutn/main.nf new file mode 100644 index 00000000000..c991c8b3f70 --- /dev/null +++ b/modules/nf-core/seqtk/cutn/main.nf @@ -0,0 +1,49 @@ +process SEQTK_CUTN { + tag "$meta.id" + label 'process_low' + + conda "bioconda::seqtk=1.3" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seqtk:1.3--h5bf99c6_3' : + 'quay.io/biocontainers/seqtk:1.3--h5bf99c6_3' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.bed") , emit: bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + seqtk \\ + cutN \\ + $args \\ + -g $fasta \\ + > ${prefix}.bed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqtk: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + touch ${prefix}.bed + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqtk: \$(echo \$(seqtk 2>&1) | sed 's/^.*Version: //; s/ .*\$//') + END_VERSIONS + """ + +} diff --git a/modules/nf-core/seqtk/cutn/meta.yml b/modules/nf-core/seqtk/cutn/meta.yml new file mode 100644 index 00000000000..314e2d0fb6b --- /dev/null +++ b/modules/nf-core/seqtk/cutn/meta.yml @@ -0,0 +1,41 @@ +name: seqtk_cutn +description: Generates a BED file containing genomic locations of lengths of N. +keywords: + - cut + - fasta +tools: + - seqtk: + description: Seqtk is a fast and lightweight tool for processing sequences in the FASTA or FASTQ format. Seqtk mergepe command merges pair-end reads into one interleaved file. + homepage: https://github.com/lh3/seqtk + documentation: https://docs.csc.fi/apps/seqtk/ + tool_dev_url: https://github.com/lh3/seqtk + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: A single fasta file to be split. + pattern: "*.{fasta}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: The output bed which summarised locations of cuts + pattern: "*.{bed}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@DLBPointon" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index ad743f82907..4c8eaa671c9 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2984,6 +2984,10 @@ seqsero2: - modules/nf-core/seqsero2/** - tests/modules/nf-core/seqsero2/** +seqtk/cutn: + - modules/nf-core/seqtk/cutn/** + - tests/modules/nf-core/seqtk/cutn/** + seqtk/mergepe: - modules/nf-core/seqtk/mergepe/** - tests/modules/nf-core/seqtk/mergepe/** diff --git a/tests/modules/nf-core/seqtk/cutn/main.nf b/tests/modules/nf-core/seqtk/cutn/main.nf new file mode 100644 index 00000000000..8593789e65b --- /dev/null +++ b/tests/modules/nf-core/seqtk/cutn/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SEQTK_CUTN } from '../../../../../modules/nf-core/seqtk/cutn/main.nf' + +// +// Test with single-end data +// + +workflow test_seqtk_cutn { + + input = [ [ id:'test', single_end:true ], // meta map + file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) ] + + SEQTK_CUTN ( input ) +} \ No newline at end of file diff --git a/tests/modules/nf-core/seqtk/cutn/nextflow.config b/tests/modules/nf-core/seqtk/cutn/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/seqtk/cutn/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/seqtk/cutn/test.yml b/tests/modules/nf-core/seqtk/cutn/test.yml new file mode 100644 index 00000000000..75d6b7b8f92 --- /dev/null +++ b/tests/modules/nf-core/seqtk/cutn/test.yml @@ -0,0 +1,9 @@ +- name: seqtk cutn test_seqtk_cutn + command: nextflow run ./tests/modules/nf-core/seqtk/cutn -entry test_seqtk_cutn -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/seqtk/cutn/nextflow.config + tags: + - seqtk/cutn + - seqtk + files: + - path: output/seqtk/test.bed + md5sum: 16cbba84e3a4bdbb52217afb5051f948 + - path: output/seqtk/versions.yml From 0502f6fbd72fb1d72a8b419527763dce51e11cc1 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 11 Apr 2023 14:07:07 +0200 Subject: [PATCH 059/120] add custom extra files to vep (#3262) * add custom extra files to vep * fix two typos * add meta fields * Update modules/nf-core/ensemblvep/vep/meta.yml Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * remove meta from cache * Apply suggestions from code review Co-authored-by: Maxime U Garcia * Update modules/nf-core/ensemblvep/vep/meta.yml --------- Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> Co-authored-by: Maxime U Garcia --- modules/nf-core/ensemblvep/vep/main.nf | 14 ++-- modules/nf-core/ensemblvep/vep/meta.yml | 23 ++++-- .../nf-core/vcf_annotate_ensemblvep/main.nf | 40 +++++++---- .../nf-core/vcf_annotate_ensemblvep/meta.yml | 72 ++++++++++--------- tests/modules/nf-core/ensemblvep/vep/main.nf | 65 +++++++++++------ .../nf-core/vcf_annotate_ensemblvep/main.nf | 14 +++- 6 files changed, 147 insertions(+), 81 deletions(-) diff --git a/modules/nf-core/ensemblvep/vep/main.nf b/modules/nf-core/ensemblvep/vep/main.nf index e9d25f3dfd3..73cdb74d2cf 100644 --- a/modules/nf-core/ensemblvep/vep/main.nf +++ b/modules/nf-core/ensemblvep/vep/main.nf @@ -8,20 +8,20 @@ process ENSEMBLVEP_VEP { 'quay.io/biocontainers/ensembl-vep:108.2--pl5321h4a94de4_0' }" input: - tuple val(meta), path(vcf) + tuple val(meta), path(vcf), path(custom_extra_files) val genome val species val cache_version path cache - path fasta + tuple val(meta2), path(fasta) path extra_files output: tuple val(meta), path("*.vcf.gz") , optional:true, emit: vcf tuple val(meta), path("*.tab.gz") , optional:true, emit: tab tuple val(meta), path("*.json.gz") , optional:true, emit: json - path "*.summary.html" , emit: report - path "versions.yml" , emit: versions + path "*.summary.html" , emit: report + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -59,9 +59,9 @@ process ENSEMBLVEP_VEP { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.ann.vcf.gz - touch ${prefix}.ann.tab.gz - touch ${prefix}.ann.json.gz + touch ${prefix}.vcf.gz + touch ${prefix}.tab.gz + touch ${prefix}.json.gz touch ${prefix}.summary.html cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/ensemblvep/vep/meta.yml b/modules/nf-core/ensemblvep/vep/meta.yml index 3a4f8d1db8f..39be9dbe382 100644 --- a/modules/nf-core/ensemblvep/vep/meta.yml +++ b/modules/nf-core/ensemblvep/vep/meta.yml @@ -2,6 +2,9 @@ name: ENSEMBLVEP_VEP description: Ensembl Variant Effect Predictor (VEP). The output-file-format is controlled through `task.ext.args`. keywords: - annotation + - vcf + - json + - tab tools: - ensemblvep: description: | @@ -20,29 +23,40 @@ input: type: file description: | vcf to annotate + - custom_extra_files: + type: file + description: | + extra sample-specific files to be used with the `-custom` flag + => add this yourself in the `args` + (optional) - genome: - type: value + type: string description: | which genome to annotate with - species: - type: value + type: string description: | which species to annotate with - cache_version: - type: value + type: integer description: | which version of the cache to annotate with - cache: type: file description: | path to VEP cache (optional) + - meta2: + type: map + description: | + Groovy Map containing fasta reference information + e.g. [ id:'test' ] - fasta: type: file description: | reference FASTA file (optional) pattern: "*.{fasta,fa}" - extra_files: - type: tuple + type: file description: | path to file(s) needed for plugins (optional) output: @@ -72,3 +86,4 @@ output: authors: - "@maxulysse" - "@matthdsm" + - "@nvnieuwk" diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf b/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf index dc54e44a3b6..5b4ba226525 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf @@ -7,18 +7,34 @@ include { TABIX_TABIX } from '../../../modules/nf-core/tabix/tabix/main' workflow VCF_ANNOTATE_ENSEMBLVEP { take: - vcf // channel: [ val(meta), vcf ] - fasta // value: fasta to use (optionnal) - vep_genome // value: genome to use - vep_species // value: species to use - vep_cache_version // value: cache version to use - vep_cache // path: /path/to/vep/cache (optionnal) - vep_extra_files // channel: [ file1, file2...] (optionnal) + ch_vcf // channel: [ val(meta), path(vcf) ] + ch_fasta // channel: [ val(meta2), path(fasta) ] (optional) + val_genome // value: genome to use + val_species // value: species to use + val_cache_version // value: cache version to use + ch_cache // channel: [ val(meta3), path(cache) ] (optional) + ch_extra_files // channel: [ path(file1), path(file2)... ] (optional) + ch_custom_extra_files // channel: [ val(meta), [path(file1), path(file2)...] ] (optional) main: ch_versions = Channel.empty() - ENSEMBLVEP_VEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache, fasta, vep_extra_files) + if(ch_custom_extra_files) { + ch_vep_input = ch_vcf.join(ch_custom_extra_files, failOnDuplicate:true, failOnMismatch:true) + } else { + ch_vep_input = ch_vcf.map { it + [[]] } + } + + ENSEMBLVEP_VEP( + ch_vep_input, + val_genome, + val_species, + val_cache_version, + ch_cache, + ch_fasta, + ch_extra_files + ) + TABIX_TABIX(ENSEMBLVEP_VEP.out.vcf) ch_vcf_tbi = ENSEMBLVEP_VEP.out.vcf.join(TABIX_TABIX.out.tbi, failOnDuplicate: true, failOnMismatch: true) @@ -28,9 +44,9 @@ workflow VCF_ANNOTATE_ENSEMBLVEP { ch_versions = ch_versions.mix(TABIX_TABIX.out.versions) emit: - vcf_tbi = ch_vcf_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] - json = ENSEMBLVEP_VEP.out.json // channel: [ val(meta), json ] - tab = ENSEMBLVEP_VEP.out.tab // channel: [ val(meta), tab ] - reports = ENSEMBLVEP_VEP.out.report // channel: [ *.html ] + vcf_tbi = ch_vcf_tbi // channel: [ val(meta), path(vcf), path(tbi) ] + json = ENSEMBLVEP_VEP.out.json // channel: [ val(meta), path(json) ] + tab = ENSEMBLVEP_VEP.out.tab // channel: [ val(meta), path(tab) ] + reports = ENSEMBLVEP_VEP.out.report // channel: [ path(html) ] versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml b/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml index 12c52c0411b..1e415790e39 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml @@ -5,50 +5,51 @@ keywords: - annotation - ensemblvep modules: - - ensemblvep - - tabix/bgziptabix + - ensemblvep/vep + - tabix/tabix input: - - meta: - type: map + - ch_vcf: description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - vcf: - type: file - description: vcf file - pattern: "*.{vcf}" - - fasta: - type: file - description: Reference genome fasta file (optional) - pattern: "*.{fa,fasta}" - - vep_genome: - type: value + vcf file to annotate + Structure: [ val(meta), path(vcf) ] + - ch_fasta: + description: | + Reference genome fasta file (optional) + Structure: [ val(meta2), path(fasta) ] + - val_genome: + type: string description: genome to use - - vep_species: - type: value + - val_species: + type: string description: species to use - - vep_cache_version: - type: value + - val_cache_version: + type: integer description: cache version to use - - vep_cache: - type: file - description: path to root cache folder for ensemblvep (optional) - - vep_extra_files: - type: file - description: any extra files needed by plugins for ensemblvep (optional) + - ch_cache: + description: | + the root cache folder for ensemblvep (optional) + Structure: [ val(meta3), path(cache) ] + - ch_extra_files: + description: | + any extra files needed by plugins for ensemblvep (optional) + Structure: [ path(file1), path(file2)... ] + - ch_custom_extra_files: + description: | + any sample-specific extra files needed for `-custom` for ensemblvep (optional) + Structure: [ val(meta), [path(file1), path(file2)...] ] output: - vcf_tbi: - type: file - description: Compressed vcf file + tabix index - pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]" + description: | + Compressed vcf file + tabix index + Structure: [ val(meta), path(vcf), path(tbi) ] - json: - type: file - description: json file - pattern: "[ *{.json.gz} ]" + description: | + json file + Structure: [ val(meta), path(json) ] - tab: - type: file - description: tab file - pattern: "[ *{.tab.gz} ]" + description: | + tab file + Structure: [ val(meta), path(tab) ] - reports: type: file description: html reports @@ -60,3 +61,4 @@ output: authors: - "@maxulysse" - "@matthdsm" + - "@nvnieuwk" diff --git a/tests/modules/nf-core/ensemblvep/vep/main.nf b/tests/modules/nf-core/ensemblvep/vep/main.nf index bd8bb08ca6b..4901e457371 100644 --- a/tests/modules/nf-core/ensemblvep/vep/main.nf +++ b/tests/modules/nf-core/ensemblvep/vep/main.nf @@ -12,74 +12,99 @@ include { ENSEMBLVEP_VEP as ENSEMBLVEP_VEP_VCF_GZIP } from '../../../../../modu workflow test_ensemblvep_vep_fasta_json { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + [] ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta = [ + [ id: 'fasta' ], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] - ENSEMBLVEP_VEP_JSON ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) + ENSEMBLVEP_VEP_JSON ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) } workflow test_ensemblvep_vep_fasta_tab { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + [] ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta = [ + [ id: 'fasta' ], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] - ENSEMBLVEP_VEP_TAB ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) + ENSEMBLVEP_VEP_TAB ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) } workflow test_ensemblvep_vep_fasta_vcf { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + [] ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta = [ + [ id: 'fasta' ], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] - ENSEMBLVEP_VEP_VCF ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) + ENSEMBLVEP_VEP_VCF ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) } workflow test_ensemblvep_vep_fasta_vcf_bgzip { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + [] ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta = [ + [ id: 'fasta' ], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] - ENSEMBLVEP_VEP_VCF_BGZIP ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) + ENSEMBLVEP_VEP_VCF_BGZIP ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) } workflow test_ensemblvep_vep_fasta_vcf_gzip { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + [] ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta = [ + [ id: 'fasta' ], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] - ENSEMBLVEP_VEP_VCF_GZIP ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) + ENSEMBLVEP_VEP_VCF_GZIP ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) } workflow test_ensemblvep_vep_fasta { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + [] ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta = [ + [ id: 'fasta' ], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] - ENSEMBLVEP_VEP_DEFAULT ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) + ENSEMBLVEP_VEP_DEFAULT ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) } workflow test_ensemblvep_vep_no_fasta { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + [] ] - ENSEMBLVEP_VEP_DEFAULT ( input, "WBcel235", "caenorhabditis_elegans", "108", [], [], [] ) + ENSEMBLVEP_VEP_DEFAULT ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], [[],[]], [] ) } diff --git a/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf b/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf index 518b4a6c949..db2b4d3d4af 100644 --- a/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf +++ b/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf @@ -5,10 +5,18 @@ nextflow.enable.dsl = 2 include { VCF_ANNOTATE_ENSEMBLVEP } from '../../../../subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf' workflow vcf_annotation_ensemblvep { - input = [ + input = Channel.of([ [ id:'test' ], // meta map file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) - ] + ]) - VCF_ANNOTATE_ENSEMBLVEP ( input, [], "WBcel235", "caenorhabditis_elegans", "108", [], [] ) + custom_extra_files = Channel.of([ + [ id:'test' ], + [ + file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test3_vcf'], checkIfExists: true) + ] + ]) + + VCF_ANNOTATE_ENSEMBLVEP ( input, [[],[]], "WBcel235", "caenorhabditis_elegans", "108", [[],[]], [], custom_extra_files ) } From 6edebae6cbfc01da3d01efe4dd19706e7427c5bf Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen <37172585+asp8200@users.noreply.github.com> Date: Tue, 11 Apr 2023 14:59:48 +0200 Subject: [PATCH 060/120] Sentieon haplotyper module (#3232) * WIP: Outline of module with sentieon-haplotyper * Controlling output emit mode via value channel * Adding sentieon/haplotyper * Adding secrets for sentieon test-license * Making sentieon_auth_mech_base64 and sentieon_auth_data_base64 available * skip conda-based test of sentieon-haplotyper * Cleaning up * Adding meta.yml * Updated meta.yml --------- Co-authored-by: Maxime U Garcia --- .github/workflows/pytest-workflow.yml | 2 + modules/nf-core/sentieon/haplotyper/main.nf | 85 +++++++++++++++++++ modules/nf-core/sentieon/haplotyper/meta.yml | 79 +++++++++++++++++ tests/config/pytest_modules.yml | 4 + .../nf-core/sentieon/haplotyper/main.nf | 82 ++++++++++++++++++ .../sentieon/haplotyper/nextflow.config | 15 ++++ .../nf-core/sentieon/haplotyper/test.yml | 64 ++++++++++++++ 7 files changed, 331 insertions(+) create mode 100644 modules/nf-core/sentieon/haplotyper/main.nf create mode 100644 modules/nf-core/sentieon/haplotyper/meta.yml create mode 100644 tests/modules/nf-core/sentieon/haplotyper/main.nf create mode 100644 tests/modules/nf-core/sentieon/haplotyper/nextflow.config create mode 100644 tests/modules/nf-core/sentieon/haplotyper/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index fed0f088d9e..cf895115444 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -108,6 +108,8 @@ jobs: tags: sentieon/bwamem - profile: "conda" tags: sentieon/dedup + - profile: "conda" + tags: sentieon/haplotyper - profile: "conda" tags: universc - profile: "singularity" diff --git a/modules/nf-core/sentieon/haplotyper/main.nf b/modules/nf-core/sentieon/haplotyper/main.nf new file mode 100644 index 00000000000..256cee50d19 --- /dev/null +++ b/modules/nf-core/sentieon/haplotyper/main.nf @@ -0,0 +1,85 @@ +process SENTIEON_HAPLOTYPER { + tag "$meta.id" + label 'process_medium' + label 'sentieon' + + secret 'SENTIEON_LICENSE_BASE64' + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." + } + + container 'nfcore/sentieon:202112.06' + + input: + val(emit_mode) + tuple val(meta), path(input), path(input_index), path(intervals) + path fasta + path fai + path dbsnp + path dbsnp_tbi + + output: + tuple val(meta), path("*.unfiltered.vcf.gz") , optional:true, emit: vcf // added the substring ".unfiltered" in the filename of the vcf-files since without that the g.vcf.gz-files were ending up in the vcf-channel + tuple val(meta), path("*.unfiltered.vcf.gz.tbi"), optional:true, emit: vcf_tbi + tuple val(meta), path("*.g.vcf.gz") , optional:true, emit: gvcf // these output-files have to have the extension ".vcf.gz", otherwise the subsequent GATK-MergeVCFs will fail. + tuple val(meta), path("*.g.vcf.gz.tbi") , optional:true, emit: gvcf_tbi + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' // options for the driver + def args2 = task.ext.args2 ?: '' // options for the vcf generation + def args3 = task.ext.args3 ?: '' // options for the gvcf generation + def prefix = task.ext.prefix ?: "${meta.id}" + def dbsnp_command = dbsnp ? "-d $dbsnp " : "" + def interval_command = intervals ? "--interval $intervals" : "" + def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' + def sentieon_auth_data_base64 = task.ext.sentieon_auth_data_base64 ?: '' + def vcf_cmd = "" + def gvcf_cmd = "" + def base_cmd = '--algo Haplotyper ' + dbsnp_command + + if (emit_mode != 'gvcf') { + vcf_cmd = base_cmd + args2 + ' ' + prefix + '.unfiltered.vcf.gz' + } + + if (emit_mode == 'gvcf' || emit_mode == 'both') { + gvcf_cmd = base_cmd + args3 + ' --emit_mode gvcf ' + prefix + '.g.vcf.gz' + } + + """ + export SENTIEON_LICENSE=\$(echo -n "\$SENTIEON_LICENSE_BASE64" | base64 -d) + + if [ ${sentieon_auth_mech_base64} ] && [ ${sentieon_auth_data_base64} ]; then + # If sentieon_auth_mech_base64 and sentieon_auth_data_base64 are non-empty strings, then Sentieon is mostly likely being run with some test-license. + export SENTIEON_AUTH_MECH=\$(echo -n "${sentieon_auth_mech_base64}" | base64 -d) + export SENTIEON_AUTH_DATA=\$(echo -n "${sentieon_auth_data_base64}" | base64 -d) + echo "Decoded and exported Sentieon test-license system environment variables" + fi + + sentieon driver $args -r $fasta -t $task.cpus -i $input $interval_command $vcf_cmd $gvcf_cmd + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.unfiltered.vcf.gz + touch ${prefix}.unfiltered.vcf.gz.tbi + touch ${prefix}.g.vcf.gz + touch ${prefix}.g.vcf.gz.tbi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") + END_VERSIONS + """ +} diff --git a/modules/nf-core/sentieon/haplotyper/meta.yml b/modules/nf-core/sentieon/haplotyper/meta.yml new file mode 100644 index 00000000000..1b530ab23df --- /dev/null +++ b/modules/nf-core/sentieon/haplotyper/meta.yml @@ -0,0 +1,79 @@ +name: sentieon_haplotyper +description: Runs Sentieon's haplotyper for germline variant calling. +keywords: + - sentieon + - haplotypecaller + - haplotype +tools: + - sentieon: + description: | + Sentieon® provides complete solutions for secondary DNA/RNA analysis for a variety of sequencing platforms, including short and long reads. + Our software improves upon BWA, STAR, Minimap2, GATK, HaplotypeCaller, Mutect, and Mutect2 based pipelines and is deployable on any generic-CPU-based computing system. + homepage: https://www.sentieon.com/ + documentation: https://www.sentieon.com/ +input: + - emit_mode: + type: string + description: | + Controls the output from the haplotyper. + If emit_mode is set to "gvcf" then the haplotyper will only emit a gvcf. + If emit_mode is set to "both" then the haplotyper will emit both a vcf and a gvcf. + Set emit_mode to anything else, and the haplotyper will only emit a vcf. + - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file from alignment + pattern: "*.{bam,cram}" + - input_index: + type: file + description: BAI/CRAI file from alignment + pattern: "*.{bai,crai}" + - intervals: + type: file + description: Bed file with the genomic regions included in the library (optional) + - fasta: + type: file + description: Genome fasta file + pattern: "*.{fa,fasta}" + - fai: + type: file + description: The index of the FASTA reference. + pattern: "*.fai" + - dbsnp: + type: file + description: VCF file containing known sites (optional) + - dbsnp_tbi: + type: file + description: VCF index of dbsnp (optional) +output: + - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: Compressed VCF file + pattern: "*.unfiltered.vcf.gz" + - vcf_tbi: + type: file + description: Index of VCF file + pattern: "*.unfiltered.vcf.gz.tbi" + - gvcf: + type: file + description: Compressed GVCF file + pattern: "*.g.vcf.gz" + - gvcf_tbi: + type: file + description: Index of GVCF file + pattern: "*.g.vcf.gz.tbi" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@asp8200" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 4c8eaa671c9..11ba422fe26 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2964,6 +2964,10 @@ sentieon/dedup: - modules/nf-core/sentieon/dedup/** - tests/modules/nf-core/sentieon/dedup/** +sentieon/haplotyper: + - modules/nf-core/sentieon/haplotyper/** + - tests/modules/nf-core/sentieon/haplotyper/** + seqkit/pair: - modules/nf-core/seqkit/pair/** - tests/modules/nf-core/seqkit/pair/** diff --git a/tests/modules/nf-core/sentieon/haplotyper/main.nf b/tests/modules/nf-core/sentieon/haplotyper/main.nf new file mode 100644 index 00000000000..cd1e735bb5e --- /dev/null +++ b/tests/modules/nf-core/sentieon/haplotyper/main.nf @@ -0,0 +1,82 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SENTIEON_HAPLOTYPER as SENTIEON_HAPLOTYPER_VCF } from '../../../../../modules/nf-core/sentieon/haplotyper/main.nf' +include { SENTIEON_HAPLOTYPER as SENTIEON_HAPLOTYPER_GVCF } from '../../../../../modules/nf-core/sentieon/haplotyper/main.nf' +include { SENTIEON_HAPLOTYPER as SENTIEON_HAPLOTYPER_BOTH } from '../../../../../modules/nf-core/sentieon/haplotyper/main.nf' +include { SENTIEON_HAPLOTYPER as SENTIEON_HAPLOTYPER_INTERVALS_BOTH } from '../../../../../modules/nf-core/sentieon/haplotyper/main.nf' +include { SENTIEON_HAPLOTYPER as SENTIEON_HAPLOTYPER_INTERVALS_DBSNP_BOTH } from '../../../../../modules/nf-core/sentieon/haplotyper/main.nf' + +workflow test_haplotyper_vcf { + emit_mode = 'vcf' + + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + [] // no intervals + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + SENTIEON_HAPLOTYPER_VCF ( emit_mode, input, fasta, fai, [], []) +} + +workflow test_haplotyper_gvcf { + emit_mode = 'gvcf' + + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + [] // no intervals + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + SENTIEON_HAPLOTYPER_VCF ( emit_mode, input, fasta, fai, [], []) +} + +workflow test_haplotyper_both { + emit_mode = 'both' + + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + [] // no intervals + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + SENTIEON_HAPLOTYPER_BOTH ( emit_mode, input, fasta, fai, [], []) +} + +workflow test_haplotyper_intervals_both { + emit_mode = 'both' + + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + SENTIEON_HAPLOTYPER_INTERVALS_BOTH ( emit_mode, input, fasta, fai, [], []) +} + +workflow test_haplotyper_intervals_dbsnp_both { + emit_mode = 'both' + + input = [ [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz'], checkIfExists: true) + dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_vcf_gz_tbi'], checkIfExists: true) + + SENTIEON_HAPLOTYPER_INTERVALS_DBSNP_BOTH ( emit_mode, input, fasta, fai, dbsnp, dbsnp_tbi) +} diff --git a/tests/modules/nf-core/sentieon/haplotyper/nextflow.config b/tests/modules/nf-core/sentieon/haplotyper/nextflow.config new file mode 100644 index 00000000000..db7a89a9530 --- /dev/null +++ b/tests/modules/nf-core/sentieon/haplotyper/nextflow.config @@ -0,0 +1,15 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withLabel: 'sentieon' { + ext.sentieon_auth_mech_base64 = secrets.SENTIEON_AUTH_MECH_BASE64 + ext.sentieon_auth_data_base64 = secrets.SENTIEON_AUTH_DATA_BASE64 + } + + withName: 'SENTIEON_HAPLOTYPER_.*' { + ext.args2 = "--genotype_model multinomial" + ext.args3 = "--genotype_model multinomial" + } + +} diff --git a/tests/modules/nf-core/sentieon/haplotyper/test.yml b/tests/modules/nf-core/sentieon/haplotyper/test.yml new file mode 100644 index 00000000000..468271f8277 --- /dev/null +++ b/tests/modules/nf-core/sentieon/haplotyper/test.yml @@ -0,0 +1,64 @@ +- name: sentieon test_haplotyper_vcf + command: nextflow run ./tests/modules/nf-core/sentieon/haplotyper -entry test_haplotyper_vcf -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/sentieon/haplotyper/nextflow.config + tags: + - sentieon + - sentieon/haplotyper + files: + - path: ./output/sentieon/test.g.vcf.gz + should_exist: false + - path: ./output/sentieon/test.g.vcf.gz.tbi + should_exist: false + - path: ./output/sentieon/test.unfiltered.vcf.gz + - path: ./output/sentieon/test.unfiltered.vcf.gz.tbi + - path: ./output/sentieon/versions.yml + md5sum: 4b7340f38e0cda5d593d1f432d4e8046 +- name: sentieon test_haplotyper_gvcf + command: nextflow run ./tests/modules/nf-core/sentieon/haplotyper -entry test_haplotyper_gvcf -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/sentieon/haplotyper/nextflow.config + tags: + - sentieon + - sentieon/haplotyper + files: + - path: ./output/sentieon/test.g.vcf.gz + - path: ./output/sentieon/test.g.vcf.gz.tbi + - path: ./output/sentieon/test.unfiltered.vcf.gz + should_exist: false + - path: ./output/sentieon/test.unfiltered.vcf.gz.tbi + should_exist: false + - path: ./output/sentieon/versions.yml + md5sum: 5ab9c81975ba492047f6eef37ef011c7 +- name: sentieon test_haplotyper_both + command: nextflow run ./tests/modules/nf-core/sentieon/haplotyper -entry test_haplotyper_both -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/sentieon/haplotyper/nextflow.config + tags: + - sentieon + - sentieon/haplotyper + files: + - path: ./output/sentieon/test.g.vcf.gz + - path: ./output/sentieon/test.g.vcf.gz.tbi + - path: ./output/sentieon/test.unfiltered.vcf.gz + - path: ./output/sentieon/test.unfiltered.vcf.gz.tbi + - path: ./output/sentieon/versions.yml + md5sum: 0e45e1659b9c07264bae0993309b8593 +- name: sentieon test_haplotyper_intervals_both + command: nextflow run ./tests/modules/nf-core/sentieon/haplotyper -entry test_haplotyper_intervals_both -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/sentieon/haplotyper/nextflow.config + tags: + - sentieon + - sentieon/haplotyper + files: + - path: ./output/sentieon/test.g.vcf.gz + - path: ./output/sentieon/test.g.vcf.gz.tbi + - path: ./output/sentieon/test.unfiltered.vcf.gz + - path: ./output/sentieon/test.unfiltered.vcf.gz.tbi + - path: ./output/sentieon/versions.yml + md5sum: b3016823b24c07813b5656bbe7552e48 +- name: sentieon test_haplotyper_intervals_dbsnp_both + command: nextflow run ./tests/modules/nf-core/sentieon/haplotyper -entry test_haplotyper_intervals_dbsnp_both -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/sentieon/haplotyper/nextflow.config + tags: + - sentieon + - sentieon/haplotyper + files: + - path: ./output/sentieon/test.g.vcf.gz + - path: ./output/sentieon/test.g.vcf.gz.tbi + - path: ./output/sentieon/test.unfiltered.vcf.gz + - path: ./output/sentieon/test.unfiltered.vcf.gz.tbi + - path: ./output/sentieon/versions.yml + md5sum: 9084e115484b31f1a3a3b952cad7ee64 From c74afa09d184af05355a96eb04acc05e8bc07341 Mon Sep 17 00:00:00 2001 From: Simon Heumos Date: Tue, 11 Apr 2023 16:21:17 +0200 Subject: [PATCH 061/120] Update WFMASH - Make it handle inputs with different metas (#3274) * add module wfmash * more I/O query options * Update modules/nf-core/wfmash/main.nf Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> * Update modules/nf-core/wfmash/main.nf Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> * address review comments * bump wfmash to 0.10.2 * fix tag of wfmash * address review * fix versions output * predefine prefix when PAF input is given * address personally communicated review * add previously deleted line * enable proper PAF handling when having several input metas * make it clearer PAF input is optional --------- Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Co-authored-by: Maxime U. Garcia --- modules/nf-core/wfmash/main.nf | 3 +-- modules/nf-core/wfmash/meta.yml | 8 ++++---- tests/modules/nf-core/wfmash/main.nf | 5 +++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/nf-core/wfmash/main.nf b/modules/nf-core/wfmash/main.nf index 84eed1a6119..643e84ddd36 100644 --- a/modules/nf-core/wfmash/main.nf +++ b/modules/nf-core/wfmash/main.nf @@ -8,12 +8,11 @@ process WFMASH { 'quay.io/biocontainers/wfmash:0.10.2--hfdddef0_0' }" input: - tuple val(meta), path(fasta_gz) + tuple val(meta), path(fasta_gz), path(paf) val(query_self) path(gzi) path(fai) path(fasta_query_list) - path(paf) output: tuple val(meta), path("*.paf"), emit: paf diff --git a/modules/nf-core/wfmash/meta.yml b/modules/nf-core/wfmash/meta.yml index 5b2b903c9a6..c80f8b14eea 100644 --- a/modules/nf-core/wfmash/meta.yml +++ b/modules/nf-core/wfmash/meta.yml @@ -25,6 +25,10 @@ input: type: file description: BGZIPPED FASTA target file to create the mappings from. pattern: "{fa.gz,fna.gz,fasta.gz}" + - paf_in: + type: file + description: Optional inpute file in PAF format to derive the precise alignments for. + pattern: "*.{paf}" - query_self: type: val description: If set to true, the input FASTA will also be used as the query FASTA. @@ -41,10 +45,6 @@ input: type: file description: Optional inpute file in FASTA format specifying the query sequences as a list. pattern: "*.{fa,fna,fasta}" - - paf_in: - type: file - description: Optional inpute file in PAF format to derive the precise alignments for. - pattern: "*.{paf}" output: - meta: diff --git a/tests/modules/nf-core/wfmash/main.nf b/tests/modules/nf-core/wfmash/main.nf index c9f94f99cd9..2674280699d 100644 --- a/tests/modules/nf-core/wfmash/main.nf +++ b/tests/modules/nf-core/wfmash/main.nf @@ -7,11 +7,12 @@ include { WFMASH } from '../../../../modules/nf-core/wfmash/main.nf' workflow test_wfmash { input = [ [ id:'test' ], // meta map - [ file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip'], checkIfExists: true) ] + [ file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip'], checkIfExists: true) ], + [ ] // empty paf input ] gzi = file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip_gzi'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip_fai'], checkIfExists: true) query_self = true - WFMASH ( input, query_self, gzi, fai, [], [] ) + WFMASH ( input, query_self, gzi, fai, []) } From 266738f5c73809f0ef2742b0966f276856fe1b15 Mon Sep 17 00:00:00 2001 From: Simon Heumos Date: Tue, 11 Apr 2023 17:34:02 +0200 Subject: [PATCH 062/120] Update WFMASH - Bind GZI,FAI to META (#3275) * add module wfmash * more I/O query options * Update modules/nf-core/wfmash/main.nf Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> * Update modules/nf-core/wfmash/main.nf Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> * address review comments * bump wfmash to 0.10.2 * fix tag of wfmash * address review * fix versions output * predefine prefix when PAF input is given * address personally communicated review * add previously deleted line * enable proper PAF handling when having several input metas * make it clearer PAF input is optional * bind fai,gzi to meta --------- Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Co-authored-by: Maxime U. Garcia --- modules/nf-core/wfmash/main.nf | 4 +--- modules/nf-core/wfmash/meta.yml | 2 +- tests/modules/nf-core/wfmash/main.nf | 10 ++++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/nf-core/wfmash/main.nf b/modules/nf-core/wfmash/main.nf index 643e84ddd36..4d65329a766 100644 --- a/modules/nf-core/wfmash/main.nf +++ b/modules/nf-core/wfmash/main.nf @@ -8,10 +8,8 @@ process WFMASH { 'quay.io/biocontainers/wfmash:0.10.2--hfdddef0_0' }" input: - tuple val(meta), path(fasta_gz), path(paf) + tuple val(meta), path(fasta_gz), path(paf), path(gzi), path(fai) val(query_self) - path(gzi) - path(fai) path(fasta_query_list) output: diff --git a/modules/nf-core/wfmash/meta.yml b/modules/nf-core/wfmash/meta.yml index c80f8b14eea..a22e520312c 100644 --- a/modules/nf-core/wfmash/meta.yml +++ b/modules/nf-core/wfmash/meta.yml @@ -25,7 +25,7 @@ input: type: file description: BGZIPPED FASTA target file to create the mappings from. pattern: "{fa.gz,fna.gz,fasta.gz}" - - paf_in: + - paf: type: file description: Optional inpute file in PAF format to derive the precise alignments for. pattern: "*.{paf}" diff --git a/tests/modules/nf-core/wfmash/main.nf b/tests/modules/nf-core/wfmash/main.nf index 2674280699d..c7af9b163bc 100644 --- a/tests/modules/nf-core/wfmash/main.nf +++ b/tests/modules/nf-core/wfmash/main.nf @@ -5,14 +5,16 @@ nextflow.enable.dsl = 2 include { WFMASH } from '../../../../modules/nf-core/wfmash/main.nf' workflow test_wfmash { + gzi = file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip_gzi'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip_fai'], checkIfExists: true) input = [ [ id:'test' ], // meta map [ file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip'], checkIfExists: true) ], - [ ] // empty paf input + [ ], // empty paf input + gzi, + fai ] - gzi = file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip_gzi'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa_bgzip_fai'], checkIfExists: true) query_self = true - WFMASH ( input, query_self, gzi, fai, []) + WFMASH ( input, query_self, []) } From 14c2bbc2def3313b9f1d17fd6194f7c596b40887 Mon Sep 17 00:00:00 2001 From: Ryan James Kennedy <67742838+ryanjameskennedy@users.noreply.github.com> Date: Wed, 12 Apr 2023 15:50:12 +0200 Subject: [PATCH 063/120] Add gatk4 germlinecnvcaller (#2538) * Add Gatk4 GermlineCNVCaller module * Change bed test files * Add stub * Fix channels * Test fixes * Remove conda as possible container * Fix conda error message * Modify input channel * PR review fixes * Fix meta.yml * Fix prettier error * Conda error message --- .../determinegermlinecontigploidy/main.nf | 15 +--- .../nf-core/gatk4/germlinecnvcaller/main.nf | 74 ++++++++++++++++ .../nf-core/gatk4/germlinecnvcaller/meta.yml | 61 +++++++++++++ tests/config/pytest_modules.yml | 4 + .../nf-core/gatk4/germlinecnvcaller/main.nf | 87 +++++++++++++++++++ .../gatk4/germlinecnvcaller/nextflow.config | 21 +++++ .../nf-core/gatk4/germlinecnvcaller/test.yml | 27 ++++++ 7 files changed, 278 insertions(+), 11 deletions(-) create mode 100644 modules/nf-core/gatk4/germlinecnvcaller/main.nf create mode 100644 modules/nf-core/gatk4/germlinecnvcaller/meta.yml create mode 100644 tests/modules/nf-core/gatk4/germlinecnvcaller/main.nf create mode 100644 tests/modules/nf-core/gatk4/germlinecnvcaller/nextflow.config create mode 100644 tests/modules/nf-core/gatk4/germlinecnvcaller/test.yml diff --git a/modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf b/modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf index 498ce67e1e2..2d630bbae13 100644 --- a/modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf +++ b/modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf @@ -2,10 +2,8 @@ process GATK4_DETERMINEGERMLINECONTIGPLOIDY { tag "$meta.id" label 'process_single' - - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'broadinstitute/gatk:4.4.0.0': - 'broadinstitute/gatk:4.4.0.0' }" + //Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811 + container "broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { @@ -28,17 +26,12 @@ process GATK4_DETERMINEGERMLINECONTIGPLOIDY { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_list = counts.collect(){"--input $it"}.join(" ") def intervals = bed ? "--intervals ${bed}" : "" def exclude = exclude_beds ? exclude_beds.collect(){"--exclude-intervals $it"}.join(" ") : "" - def untar_model = ploidy_model ? ( - ploidy_model ==~ /^.*\.tar\.gz$/ ? "tar -xzf ${ploidy_model}" : "" - ) : "" + def untar_model = ploidy_model ? (ploidy_model.name.endsWith(".tar.gz") ? "tar -xzf ${ploidy_model}" : "") : "" def tar_model = ploidy_model ? "" : "tar czf ${prefix}-model.tar.gz ${prefix}-model" - def model = ploidy_model ? ( - ploidy_model ==~ /^.*\.tar\.gz$/ ? "--model ${ploidy_model.toString().replace(".tar.gz","")}" : "--model ${ploidy_model}" - ) : "" + def model = ploidy_model ? (ploidy_model.name.endsWith(".tar.gz") ? "--model ${ploidy_model.toString().replace(".tar.gz","")}" : "--model ${ploidy_model}") : "" def contig_ploidy = contig_ploidy_table ? "--contig-ploidy-priors ${contig_ploidy_table}" : "" def avail_mem = 3072 diff --git a/modules/nf-core/gatk4/germlinecnvcaller/main.nf b/modules/nf-core/gatk4/germlinecnvcaller/main.nf new file mode 100644 index 00000000000..7eefeb7c41f --- /dev/null +++ b/modules/nf-core/gatk4/germlinecnvcaller/main.nf @@ -0,0 +1,74 @@ +process GATK4_GERMLINECNVCALLER { + tag "$meta.id" + label 'process_single' + + //Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811 + container "broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "GATK4_GERMLINECNVCALLER module does not support Conda. Please use Docker / Singularity / Podman instead." + } + + input: + tuple val(meta), path(tsv), path(intervals) + path model + path ploidy + + output: + tuple val(meta), path("*-calls.tar.gz"), emit: calls, optional: true + tuple val(meta), path("*-model.tar.gz"), emit: model, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def intervals_command = intervals ? "--intervals $intervals" : "" + def untar_ploidy = ploidy ? (ploidy.name.endsWith(".tar.gz") ? "tar -xzf ${ploidy}" : "") : "" + def untar_model = model ? (model.name.endsWith(".tar.gz") ? "tar -xzf ${model}" : "") : "" + def ploidy_command = ploidy ? (ploidy.name.endsWith(".tar.gz") ? "--contig-ploidy-calls ${ploidy.toString().replace(".tar.gz","")}" : "--contig-ploidy-calls ${ploidy}") : "" + def model_command = model ? (model.name.endsWith(".tar.gz") ? "--model ${model.toString().replace(".tar.gz","")}/${prefix}-model" : "--model ${model}/${prefix}-model") : "" + def input_list = tsv.collect{"--input $it"}.join(' ') + def output_command = model ? "--output ${prefix}-calls" : "--output ${prefix}-model" + def tar_output = model ? "tar -czf ${prefix}-calls.tar.gz ${prefix}-calls" : "tar -czf ${prefix}-model.tar.gz ${prefix}-model" + + def avail_mem = 3072 + if (!task.memory) { + log.info '[GATK GermlineCNVCaller] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = (task.memory.mega*0.8).intValue() + } + """ + ${untar_ploidy} + ${untar_model} + + gatk --java-options "-Xmx${avail_mem}g" GermlineCNVCaller \\ + $input_list \\ + $ploidy_command \\ + $output_command \\ + --output-prefix $prefix \\ + $args \\ + $intervals_command \\ + $model_command + ${tar_output} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.tar.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/gatk4/germlinecnvcaller/meta.yml b/modules/nf-core/gatk4/germlinecnvcaller/meta.yml new file mode 100644 index 00000000000..1574c06a4bb --- /dev/null +++ b/modules/nf-core/gatk4/germlinecnvcaller/meta.yml @@ -0,0 +1,61 @@ +name: "gatk4_germlinecnvcaller" +description: Calls copy-number variants in germline samples given their counts and the output of DetermineGermlineContigPloidy. +keywords: + - gatk + - gatk4_germlinecnvcaller +tools: + - "gatk4": + description: + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s + doi: "10.1158/1538-7445.AM2017-3590" + licence: ["Apache-2.0"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - tsv: + type: file(s) + description: One or more count TSV files created with gatk/collectreadcounts + pattern: "*.tsv" + - intervals: + type: file + description: Optional - A bed file containing the intervals to include in the process + pattern: "*.bed" + - model: + type: directory + description: Optional - Tar gzipped directory containing the model produced by germlinecnvcaller cohort mode + pattern: "*.tar.gz" + - ploidy: + type: file + description: Tar gzipped directory containing ploidy calls produced by determinegermlinecontigploidy case or cohort mode + pattern: "*.tar.gz" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - calls: + type: file + description: Tar gzipped directory containing calls produced by germlinecnvcaller case mode + pattern: "*.tar" + - model: + type: directory + description: Optional - Tar gzipped directory containing the model produced by germlinecnvcaller cohort mode + pattern: "*.tar.gz" + +authors: + - "@ryanjameskennedy" + - "@ViktorHy" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 11ba422fe26..73e76306607 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1323,6 +1323,10 @@ gatk4/genotypegvcfs: - modules/nf-core/gatk4/genotypegvcfs/** - tests/modules/nf-core/gatk4/genotypegvcfs/** +gatk4/germlinecnvcaller: + - modules/nf-core/gatk4/germlinecnvcaller/** + - tests/modules/nf-core/gatk4/germlinecnvcaller/** + gatk4/getpileupsummaries: - modules/nf-core/gatk4/getpileupsummaries/** - tests/modules/nf-core/gatk4/getpileupsummaries/** diff --git a/tests/modules/nf-core/gatk4/germlinecnvcaller/main.nf b/tests/modules/nf-core/gatk4/germlinecnvcaller/main.nf new file mode 100644 index 00000000000..c8669d48011 --- /dev/null +++ b/tests/modules/nf-core/gatk4/germlinecnvcaller/main.nf @@ -0,0 +1,87 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_COLLECTREADCOUNTS } from '../../../../../modules/nf-core/gatk4/collectreadcounts/main.nf' +include { GATK4_DETERMINEGERMLINECONTIGPLOIDY as GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT } from '../../../../../modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf' +include { GATK4_DETERMINEGERMLINECONTIGPLOIDY as GATK4_DETERMINEGERMLINECONTIGPLOIDY_CASE } from '../../../../../modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf' +include { GATK4_GERMLINECNVCALLER as GATK4_GERMLINECNVCALLER_COHORT } from '../../../../../modules/nf-core/gatk4/germlinecnvcaller/main.nf' +include { GATK4_GERMLINECNVCALLER as GATK4_GERMLINECNVCALLER_CASE } from '../../../../../modules/nf-core/gatk4/germlinecnvcaller/main.nf' + +workflow test_gatk4_germlinecnvcaller_case { + bed = Channel.of(file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true)) + priors = file(params.test_data['homo_sapiens']['illumina']['contig_ploidy_priors_table'], checkIfExists: true) + inputs = Channel.of([ + [ id:'test1' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true) + ], + [ + [ id:'test2' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true) + ]) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + + GATK4_COLLECTREADCOUNTS ( inputs, fasta, fai, dict ) + + dgcp_cohort_input = GATK4_COLLECTREADCOUNTS.out.tsv + .map({ meta, tsv -> [ [id:'test'], tsv ] }) + .groupTuple() + .combine(bed) + .map({ meta, counts, bed -> [ meta, counts, bed, [] ]}) + GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT ( dgcp_cohort_input, priors, [] ) + + dgcp_case_input = dgcp_cohort_input.map({ meta, counts, bed, exclude_beds -> [ meta, counts, [], [] ]}) + GATK4_DETERMINEGERMLINECONTIGPLOIDY_CASE ( dgcp_case_input, [], GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT.out.model.collect{ it[1] } ) + + gcnvc_cohort_input = GATK4_COLLECTREADCOUNTS.out.tsv + .map({ meta, tsv -> return [[id:"test"], tsv ]}) + .groupTuple() + .combine(bed) + .map({ meta, counts, bed -> [ meta, counts, bed ]}) + GATK4_GERMLINECNVCALLER_COHORT ( gcnvc_cohort_input, [], GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT.out.calls.collect{ it[1] } ) + + gcnvc_case_input = gcnvc_cohort_input.map({ meta, counts, bed -> [ meta, counts, [] ]}) + GATK4_GERMLINECNVCALLER_CASE ( gcnvc_case_input, GATK4_GERMLINECNVCALLER_COHORT.out.model.collect{ it[1] }, GATK4_DETERMINEGERMLINECONTIGPLOIDY_CASE.out.calls.collect{ it[1] } ) +} + +workflow test_gatk4_germlinecnvcaller_cohort { + bed = Channel.of(file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true)) + priors = file(params.test_data['homo_sapiens']['illumina']['contig_ploidy_priors_table'], checkIfExists: true) + inputs = Channel.of([ + [ id:'test1' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true) + ], + [ + [ id:'test2' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true) + ]) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + + GATK4_COLLECTREADCOUNTS ( inputs, fasta, fai, dict ) + + dgcp_cohort_input = GATK4_COLLECTREADCOUNTS.out.tsv + .map({ meta, tsv -> [ [id:'test'], tsv ] }) + .groupTuple() + .combine(bed) + .map({ meta, counts, bed -> [ meta, counts, bed, [] ]}) + GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT ( dgcp_cohort_input, priors, [] ) + + gcnvc_cohort_input = GATK4_COLLECTREADCOUNTS.out.tsv + .map({ meta, tsv -> return [[id:"test"], tsv ]}) + .groupTuple() + .combine(bed) + .map({ meta, counts, bed -> [ meta, counts, bed ]}) + GATK4_GERMLINECNVCALLER_COHORT ( gcnvc_cohort_input, [], GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT.out.calls.collect{ it[1] } ) +} diff --git a/tests/modules/nf-core/gatk4/germlinecnvcaller/nextflow.config b/tests/modules/nf-core/gatk4/germlinecnvcaller/nextflow.config new file mode 100644 index 00000000000..88f61a49e11 --- /dev/null +++ b/tests/modules/nf-core/gatk4/germlinecnvcaller/nextflow.config @@ -0,0 +1,21 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: 'GATK4_COLLECTREADCOUNTS*' { + ext.args = "--format TSV --interval-merging-rule OVERLAPPING_ONLY" + } + + withName: 'GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT' { + ext.args = "--interval-merging-rule OVERLAPPING_ONLY" + } + + withName: 'GATK4_GERMLINECNVCALLER_COHORT' { + ext.args = "--interval-merging-rule OVERLAPPING_ONLY --run-mode COHORT" + } + + withName: 'GATK4_GERMLINECNVCALLER_CASE' { + ext.args = "--run-mode CASE" + } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/gatk4/germlinecnvcaller/test.yml b/tests/modules/nf-core/gatk4/germlinecnvcaller/test.yml new file mode 100644 index 00000000000..8dad926f869 --- /dev/null +++ b/tests/modules/nf-core/gatk4/germlinecnvcaller/test.yml @@ -0,0 +1,27 @@ +- name: gatk4 germlinecnvcaller test_gatk4_germlinecnvcaller_case + command: nextflow run ./tests/modules/nf-core/gatk4/germlinecnvcaller -entry test_gatk4_germlinecnvcaller_case -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/germlinecnvcaller/nextflow.config + tags: + - gatk4/germlinecnvcaller + - gatk4 + files: + - path: output/gatk4/test-calls.tar.gz + - path: output/gatk4/test-model.tar.gz + - path: output/gatk4/test1.tsv + md5sum: 0ac78200288de9fc0aa122cc3f9a4fd0 + - path: output/gatk4/test2.tsv + md5sum: e746609b0791cd119eac1695c54623b7 + - path: output/gatk4/versions.yml + +- name: gatk4 germlinecnvcaller test_gatk4_germlinecnvcaller_cohort + command: nextflow run ./tests/modules/nf-core/gatk4/germlinecnvcaller -entry test_gatk4_germlinecnvcaller_cohort -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/germlinecnvcaller/nextflow.config + tags: + - gatk4/germlinecnvcaller + - gatk4 + files: + - path: output/gatk4/test-calls.tar.gz + - path: output/gatk4/test-model.tar.gz + - path: output/gatk4/test1.tsv + md5sum: 0ac78200288de9fc0aa122cc3f9a4fd0 + - path: output/gatk4/test2.tsv + md5sum: e746609b0791cd119eac1695c54623b7 + - path: output/gatk4/versions.yml From 154bbe00ffd75ceeedd69a7c9358b759a5991e49 Mon Sep 17 00:00:00 2001 From: Guoying Qi <729395+gq1@users.noreply.github.com> Date: Wed, 12 Apr 2023 15:23:36 +0100 Subject: [PATCH 064/120] SAMTOOLS_VIEW: make it clear csi file can be used for bam index file (#3277) make it clear csi file can be used for bam index file --- modules/nf-core/samtools/view/meta.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/samtools/view/meta.yml b/modules/nf-core/samtools/view/meta.yml index 2e597d349b1..76916033264 100644 --- a/modules/nf-core/samtools/view/meta.yml +++ b/modules/nf-core/samtools/view/meta.yml @@ -27,8 +27,8 @@ input: pattern: "*.{bam,cram,sam}" - index: type: optional file - description: BAM.BAI/CRAM.CRAI file - pattern: "*.{.bai,.crai}" + description: BAM.BAI/BAM.CSI/CRAM.CRAI file + pattern: "*.{.bai,.csi,.crai}" - fasta: type: optional file description: Reference file the CRAM was created with From 58b5e78506e66f7ecd610fa825890ed9fb98b793 Mon Sep 17 00:00:00 2001 From: Guoying Qi <729395+gq1@users.noreply.github.com> Date: Wed, 12 Apr 2023 15:42:44 +0100 Subject: [PATCH 065/120] DEEPVARIANT: add a gzi input field to avoid the problem for compressed fasta file (#3240) * add a gzi input field to avoid the problem when fasta file is compressed fasta.gz file * prettier * Use the latest homo sapiens compressed fasta file to test deepvariant --------- Co-authored-by: Priyanka Surana --- modules/nf-core/deepvariant/main.nf | 1 + modules/nf-core/deepvariant/meta.yml | 4 +++ tests/config/test_data.config | 3 ++ tests/modules/nf-core/deepvariant/main.nf | 36 ++++++++++++++++++++-- tests/modules/nf-core/deepvariant/test.yml | 20 ++++++++++++ 5 files changed, 62 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/deepvariant/main.nf b/modules/nf-core/deepvariant/main.nf index 7e11b766d9d..434fcc0e4b3 100644 --- a/modules/nf-core/deepvariant/main.nf +++ b/modules/nf-core/deepvariant/main.nf @@ -13,6 +13,7 @@ process DEEPVARIANT { tuple val(meta), path(input), path(index), path(intervals) path(fasta) path(fai) + path(gzi) output: tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf diff --git a/modules/nf-core/deepvariant/meta.yml b/modules/nf-core/deepvariant/meta.yml index 7ecb40f24f8..63868b25978 100644 --- a/modules/nf-core/deepvariant/meta.yml +++ b/modules/nf-core/deepvariant/meta.yml @@ -38,6 +38,10 @@ input: type: file description: Index of reference fasta file pattern: "*.fai" + - gzi: + type: file + description: GZI index of reference fasta file + pattern: "*.gzi" output: - meta: diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 05917aa6367..822db092dcf 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -155,6 +155,9 @@ params { genome_elfasta = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.elfasta" genome_fasta = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.fasta" genome_fasta_fai = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.fasta.fai" + genome_fasta_gz = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.fasta.gz" + genome_fasta_gz_fai = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.fasta.gz.fai" + genome_fasta_gz_gzi = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.fasta.gz.gzi" genome_strtablefile = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome_strtablefile.zip" genome_dict = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.dict" genome_gff3 = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.gff3" diff --git a/tests/modules/nf-core/deepvariant/main.nf b/tests/modules/nf-core/deepvariant/main.nf index f6fb857c848..b9f462ad7a0 100644 --- a/tests/modules/nf-core/deepvariant/main.nf +++ b/tests/modules/nf-core/deepvariant/main.nf @@ -17,7 +17,7 @@ workflow test_deepvariant { fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - DEEPVARIANT ( bam_tuple_ch, fasta, fai) + DEEPVARIANT ( bam_tuple_ch, fasta, fai, [] ) } workflow test_deepvariant_cram_intervals { @@ -32,5 +32,37 @@ workflow test_deepvariant_cram_intervals { fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - DEEPVARIANT_INTERVALS ( cram_tuple_ch, fasta, fai) + DEEPVARIANT_INTERVALS ( cram_tuple_ch, fasta, fai, [] ) +} + +workflow test_deepvariant_no_fasta_gzi { + + bam_tuple_ch = Channel.of([ [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + [] + ]) + + fasta_gz = file(params.test_data['homo_sapiens']['genome']['genome_fasta_gz'], checkIfExists: true) + + fasta_gz_fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_gz_fai'], checkIfExists: true) + + DEEPVARIANT ( bam_tuple_ch, fasta_gz, fasta_gz_fai, [] ) +} + +workflow test_deepvariant_fasta_gz { + + bam_tuple_ch = Channel.of([ [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + [] + ]) + + fasta_gz = file(params.test_data['homo_sapiens']['genome']['genome_fasta_gz'], checkIfExists: true) + + fasta_gz_fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_gz_fai'], checkIfExists: true) + + fasta_gz_gzi = file(params.test_data['homo_sapiens']['genome']['genome_fasta_gz_gzi'], checkIfExists: true) + + DEEPVARIANT ( bam_tuple_ch, fasta_gz, fasta_gz_fai, fasta_gz_gzi ) } diff --git a/tests/modules/nf-core/deepvariant/test.yml b/tests/modules/nf-core/deepvariant/test.yml index bd7e10db256..360c05190e6 100644 --- a/tests/modules/nf-core/deepvariant/test.yml +++ b/tests/modules/nf-core/deepvariant/test.yml @@ -19,3 +19,23 @@ - path: output/deepvariant/test_out.vcf.gz md5sum: 4c4b86a21ef77beb85d6fed80ce17c40 - path: output/deepvariant/versions.yml + +- name: deepvariant test_deepvariant_no_fasta_gzi + command: nextflow run ./tests/modules/nf-core/deepvariant -entry test_deepvariant_no_fasta_gzi -c ./tests/config/nextflow.config + tags: + - deepvariant + exit_code: 1 + stdout: + contains: + - "Failed to open FASTA index genome.fasta.gz.gzi: No such file or directory" + +- name: deepvariant test_deepvariant_fasta_gz + command: nextflow run ./tests/modules/nf-core/deepvariant -entry test_deepvariant_fasta_gz -c ./tests/config/nextflow.config + tags: + - deepvariant + files: + - path: output/deepvariant/test_out.g.vcf.gz + md5sum: 0f638a32d72d68b4fab0801feaefda96 + - path: output/deepvariant/test_out.vcf.gz + md5sum: 4c4b86a21ef77beb85d6fed80ce17c40 + - path: output/deepvariant/versions.yml From f68f379dcdba4e8c132c6daa6cd8794527b81a04 Mon Sep 17 00:00:00 2001 From: Friederike Hanssen Date: Thu, 13 Apr 2023 08:40:17 +0200 Subject: [PATCH 066/120] Manta: remove --exome, should be set via config (#3279) remove --exome, should be set via config --- modules/nf-core/manta/somatic/main.nf | 2 +- modules/nf-core/manta/tumoronly/main.nf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/manta/somatic/main.nf b/modules/nf-core/manta/somatic/main.nf index c559c8851b2..64f296b2881 100644 --- a/modules/nf-core/manta/somatic/main.nf +++ b/modules/nf-core/manta/somatic/main.nf @@ -29,7 +29,7 @@ process MANTA_SOMATIC { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def options_manta = target_bed ? "--exome --callRegions $target_bed" : "" + def options_manta = target_bed ? "--callRegions $target_bed" : "" """ configManta.py \ diff --git a/modules/nf-core/manta/tumoronly/main.nf b/modules/nf-core/manta/tumoronly/main.nf index 3fea008fc4d..4600565cbf4 100644 --- a/modules/nf-core/manta/tumoronly/main.nf +++ b/modules/nf-core/manta/tumoronly/main.nf @@ -27,7 +27,7 @@ process MANTA_TUMORONLY { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def options_manta = target_bed ? "--exome --callRegions $target_bed" : "" + def options_manta = target_bed ? "--callRegions $target_bed" : "" """ configManta.py \ --tumorBam $input \ From ac924c4ba0be25f79248b51be0c9fbfa404b6030 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Thu, 13 Apr 2023 09:29:53 +0200 Subject: [PATCH 067/120] FIX: #3262 custom files issues (#3278) * fix 3262 vep custom files * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review --- modules/nf-core/ensemblvep/vep/main.nf | 1 - modules/nf-core/ensemblvep/vep/meta.yml | 3 +- .../nf-core/vcf_annotate_ensemblvep/main.nf | 11 ++----- .../nf-core/vcf_annotate_ensemblvep/meta.yml | 6 +--- tests/modules/nf-core/ensemblvep/vep/main.nf | 31 ++++++++++++++----- .../nf-core/ensemblvep/vep/nextflow.config | 5 +++ tests/modules/nf-core/ensemblvep/vep/test.yml | 9 ++++++ .../nf-core/vcf_annotate_ensemblvep/main.nf | 20 +++++++----- .../vcf_annotate_ensemblvep/nextflow.config | 4 +++ .../nf-core/vcf_annotate_ensemblvep/test.yml | 16 ++++++++-- 10 files changed, 73 insertions(+), 33 deletions(-) diff --git a/modules/nf-core/ensemblvep/vep/main.nf b/modules/nf-core/ensemblvep/vep/main.nf index 73cdb74d2cf..df2f845e874 100644 --- a/modules/nf-core/ensemblvep/vep/main.nf +++ b/modules/nf-core/ensemblvep/vep/main.nf @@ -33,7 +33,6 @@ process ENSEMBLVEP_VEP { def prefix = task.ext.prefix ?: "${meta.id}" def dir_cache = cache ? "\${PWD}/${cache}" : "/.vep" def reference = fasta ? "--fasta $fasta" : "" - """ vep \\ -i $vcf \\ diff --git a/modules/nf-core/ensemblvep/vep/meta.yml b/modules/nf-core/ensemblvep/vep/meta.yml index 39be9dbe382..7783847dc45 100644 --- a/modules/nf-core/ensemblvep/vep/meta.yml +++ b/modules/nf-core/ensemblvep/vep/meta.yml @@ -26,8 +26,7 @@ input: - custom_extra_files: type: file description: | - extra sample-specific files to be used with the `-custom` flag - => add this yourself in the `args` + extra sample-specific files to be used with the `--custom` flag to be configured with ext.args (optional) - genome: type: string diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf b/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf index 5b4ba226525..291eddc11b0 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf @@ -7,26 +7,19 @@ include { TABIX_TABIX } from '../../../modules/nf-core/tabix/tabix/main' workflow VCF_ANNOTATE_ENSEMBLVEP { take: - ch_vcf // channel: [ val(meta), path(vcf) ] + ch_vcf // channel: [ val(meta), path(vcf), [path(custom_file1), path(custom_file2)... (optionnal)]] ch_fasta // channel: [ val(meta2), path(fasta) ] (optional) val_genome // value: genome to use val_species // value: species to use val_cache_version // value: cache version to use ch_cache // channel: [ val(meta3), path(cache) ] (optional) ch_extra_files // channel: [ path(file1), path(file2)... ] (optional) - ch_custom_extra_files // channel: [ val(meta), [path(file1), path(file2)...] ] (optional) main: ch_versions = Channel.empty() - if(ch_custom_extra_files) { - ch_vep_input = ch_vcf.join(ch_custom_extra_files, failOnDuplicate:true, failOnMismatch:true) - } else { - ch_vep_input = ch_vcf.map { it + [[]] } - } - ENSEMBLVEP_VEP( - ch_vep_input, + ch_vcf, val_genome, val_species, val_cache_version, diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml b/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml index 1e415790e39..8be33b6dcfb 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml @@ -11,7 +11,7 @@ input: - ch_vcf: description: | vcf file to annotate - Structure: [ val(meta), path(vcf) ] + Structure: [ val(meta), path(vcf), [path(custom_file1), path(custom_file2)... (optionnal)] ] - ch_fasta: description: | Reference genome fasta file (optional) @@ -33,10 +33,6 @@ input: description: | any extra files needed by plugins for ensemblvep (optional) Structure: [ path(file1), path(file2)... ] - - ch_custom_extra_files: - description: | - any sample-specific extra files needed for `-custom` for ensemblvep (optional) - Structure: [ val(meta), [path(file1), path(file2)...] ] output: - vcf_tbi: description: | diff --git a/tests/modules/nf-core/ensemblvep/vep/main.nf b/tests/modules/nf-core/ensemblvep/vep/main.nf index 4901e457371..082fba929cb 100644 --- a/tests/modules/nf-core/ensemblvep/vep/main.nf +++ b/tests/modules/nf-core/ensemblvep/vep/main.nf @@ -8,6 +8,7 @@ include { ENSEMBLVEP_VEP as ENSEMBLVEP_VEP_TAB } from '../../../../../modu include { ENSEMBLVEP_VEP as ENSEMBLVEP_VEP_VCF } from '../../../../../modules/nf-core/ensemblvep/vep/main.nf' include { ENSEMBLVEP_VEP as ENSEMBLVEP_VEP_VCF_BGZIP } from '../../../../../modules/nf-core/ensemblvep/vep/main.nf' include { ENSEMBLVEP_VEP as ENSEMBLVEP_VEP_VCF_GZIP } from '../../../../../modules/nf-core/ensemblvep/vep/main.nf' +include { ENSEMBLVEP_VEP as ENSEMBLVEP_VEP_CUSTOM } from '../../../../../modules/nf-core/ensemblvep/vep/main.nf' workflow test_ensemblvep_vep_fasta_json { input = [ @@ -21,7 +22,7 @@ workflow test_ensemblvep_vep_fasta_json { file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - ENSEMBLVEP_VEP_JSON ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) + ENSEMBLVEP_VEP_JSON ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) } workflow test_ensemblvep_vep_fasta_tab { @@ -36,7 +37,7 @@ workflow test_ensemblvep_vep_fasta_tab { file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - ENSEMBLVEP_VEP_TAB ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) + ENSEMBLVEP_VEP_TAB ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) } workflow test_ensemblvep_vep_fasta_vcf { @@ -51,7 +52,7 @@ workflow test_ensemblvep_vep_fasta_vcf { file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - ENSEMBLVEP_VEP_VCF ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) + ENSEMBLVEP_VEP_VCF ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) } workflow test_ensemblvep_vep_fasta_vcf_bgzip { @@ -66,7 +67,7 @@ workflow test_ensemblvep_vep_fasta_vcf_bgzip { file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - ENSEMBLVEP_VEP_VCF_BGZIP ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) + ENSEMBLVEP_VEP_VCF_BGZIP ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) } workflow test_ensemblvep_vep_fasta_vcf_gzip { @@ -81,7 +82,7 @@ workflow test_ensemblvep_vep_fasta_vcf_gzip { file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - ENSEMBLVEP_VEP_VCF_GZIP ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) + ENSEMBLVEP_VEP_VCF_GZIP ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) } workflow test_ensemblvep_vep_fasta { @@ -96,7 +97,7 @@ workflow test_ensemblvep_vep_fasta { file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - ENSEMBLVEP_VEP_DEFAULT ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], fasta, [] ) + ENSEMBLVEP_VEP_DEFAULT ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) } workflow test_ensemblvep_vep_no_fasta { @@ -106,5 +107,21 @@ workflow test_ensemblvep_vep_no_fasta { [] ] - ENSEMBLVEP_VEP_DEFAULT ( input, "WBcel235", "caenorhabditis_elegans", "108", [[],[]], [[],[]], [] ) + ENSEMBLVEP_VEP_DEFAULT ( input, "WBcel235", "caenorhabditis_elegans", "108", [], [[], []], [] ) +} + +workflow test_ensemblvep_vep_fasta_custom { + input = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + [ file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test3_vcf'], checkIfExists: true)] + ] + + fasta = [ + [ id: 'fasta' ], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + ENSEMBLVEP_VEP_VCF_BGZIP ( input, "WBcel235", "caenorhabditis_elegans", "108", [], fasta, [] ) } diff --git a/tests/modules/nf-core/ensemblvep/vep/nextflow.config b/tests/modules/nf-core/ensemblvep/vep/nextflow.config index 2f98e509d03..f9f31e0f45f 100644 --- a/tests/modules/nf-core/ensemblvep/vep/nextflow.config +++ b/tests/modules/nf-core/ensemblvep/vep/nextflow.config @@ -30,4 +30,9 @@ process { container = 'nfcore/vep:108.2.WBcel235' ext.args = '--vcf --compress_output gzip' } + + withName: ENSEMBLVEP_VEP_CUSTOM { + container = 'nfcore/vep:108.2.WBcel235' + ext.args = '--custom test2.vcf,,vcf,exact,0,TOPMED --custom test3.vcf,,vcf,exact,0,TOPMED' + } } diff --git a/tests/modules/nf-core/ensemblvep/vep/test.yml b/tests/modules/nf-core/ensemblvep/vep/test.yml index 7d25468ef6a..6148fdef388 100644 --- a/tests/modules/nf-core/ensemblvep/vep/test.yml +++ b/tests/modules/nf-core/ensemblvep/vep/test.yml @@ -53,6 +53,15 @@ - path: output/ensemblvep/test.summary.html - path: output/ensemblvep/test.vcf.gz +- name: ensemblvep test_ensemblvep_vep_fasta_custom + command: nextflow run ./tests/modules/nf-core/ensemblvep/vep -entry test_ensemblvep_vep_fasta_custom -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/ensemblvep/vep/nextflow.config + tags: + - ensemblvep + - ensemblvep/vep + files: + - path: output/ensemblvep/test.summary.html + - path: output/ensemblvep/test.vcf.gz + - name: ensemblvep test_ensemblvep_vep_no_fasta command: nextflow run ./tests/modules/nf-core/ensemblvep/vep -entry test_ensemblvep_vep_no_fasta -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/ensemblvep/vep/nextflow.config tags: diff --git a/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf b/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf index db2b4d3d4af..babe6e6a8fe 100644 --- a/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf +++ b/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf @@ -2,21 +2,27 @@ nextflow.enable.dsl = 2 -include { VCF_ANNOTATE_ENSEMBLVEP } from '../../../../subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf' +include { VCF_ANNOTATE_ENSEMBLVEP as VCF_ANNOTATE_ENSEMBLVEP_DEFAULT } from '../../../../subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf' +include { VCF_ANNOTATE_ENSEMBLVEP as VCF_ANNOTATE_ENSEMBLVEP_CUSTOM } from '../../../../subworkflows/nf-core/vcf_annotate_ensemblvep/main.nf' -workflow vcf_annotation_ensemblvep { +workflow vcf_annotate_ensemblvep { input = Channel.of([ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), [] ]) - custom_extra_files = Channel.of([ - [ id:'test' ], + VCF_ANNOTATE_ENSEMBLVEP_DEFAULT ( input, [[],[]], "WBcel235", "caenorhabditis_elegans", "108", [], [] ) +} + +workflow vcf_annotate_ensemblvep_custom { + input = Channel.of([ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), [ file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test3_vcf'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test3_vcf'], checkIfExists: true) ] ]) - VCF_ANNOTATE_ENSEMBLVEP ( input, [[],[]], "WBcel235", "caenorhabditis_elegans", "108", [[],[]], [], custom_extra_files ) + VCF_ANNOTATE_ENSEMBLVEP_CUSTOM ( input, [[],[]], "WBcel235", "caenorhabditis_elegans", "108", [], [] ) } diff --git a/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/nextflow.config b/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/nextflow.config index fbc1578e3a5..3f757bdecdd 100644 --- a/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/nextflow.config +++ b/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/nextflow.config @@ -6,6 +6,10 @@ process { container = 'nfcore/vep:108.2.WBcel235' } + withName: vcf_annotate_ensemblvep_custom:VCF_ANNOTATE_ENSEMBLVEP_CUSTOM:ENSEMBLVEP_VEP { + ext.args = '--custom test2.vcf,,vcf,exact,0,TOPMED --custom test3.vcf,,vcf,exact,0,TOPMED' + } + withName: TABIX_TABIX { ext.prefix = { "${meta.id}_vep.ann" } } diff --git a/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/test.yml b/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/test.yml index 1d96db347cb..5e452540bf1 100644 --- a/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/test.yml +++ b/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/test.yml @@ -1,5 +1,17 @@ -- name: vcf_annotate_ensemblvep vcf_annotation_ensemblvep - command: nextflow run ./tests/subworkflows/nf-core/vcf_annotate_ensemblvep -entry vcf_annotation_ensemblvep -c ./tests/config/nextflow.config +- name: vcf_annotate_ensemblvep + command: nextflow run ./tests/subworkflows/nf-core/vcf_annotate_ensemblvep -entry vcf_annotate_ensemblvep -c ./tests/config/nextflow.config + tags: + - ensemblvep + - subworkflows + - subworkflows/vcf_annotate_ensemblvep + - tabix + - tabix/tabix + files: + - path: output/ensemblvep/test.summary.html + - path: output/ensemblvep/test.vcf.gz + - path: output/tabix/test.vcf.gz.tbi +- name: vcf_annotate_ensemblvep_custom + command: nextflow run ./tests/subworkflows/nf-core/vcf_annotate_ensemblvep -entry vcf_annotate_ensemblvep_custom -c ./tests/config/nextflow.config tags: - ensemblvep - subworkflows From 4c13ff1a51193fb0551380dd555f477608837567 Mon Sep 17 00:00:00 2001 From: Toni Hermoso Pulido Date: Thu, 13 Apr 2023 13:25:25 +0200 Subject: [PATCH 068/120] Addition of new module: interproscan. Issue #3103 (#3180) * Update interproscan * fix style * addressing review comments * multiline command * changing test with contains * test tab * adding out_ext to stub as well per comment * Update tests/config/pytest_modules.yml Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Update tests/config/pytest_modules.yml Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * change test for avoiding less problems if minor changes in MobiDBLite --------- Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- modules/nf-core/interproscan/main.nf | 82 +++++++++++++++++++ modules/nf-core/interproscan/meta.yml | 54 ++++++++++++ tests/config/pytest_modules.yml | 4 + tests/modules/nf-core/interproscan/main.nf | 16 ++++ .../nf-core/interproscan/nextflow.config | 5 ++ tests/modules/nf-core/interproscan/test.yml | 12 +++ 6 files changed, 173 insertions(+) create mode 100644 modules/nf-core/interproscan/main.nf create mode 100644 modules/nf-core/interproscan/meta.yml create mode 100644 tests/modules/nf-core/interproscan/main.nf create mode 100644 tests/modules/nf-core/interproscan/nextflow.config create mode 100644 tests/modules/nf-core/interproscan/test.yml diff --git a/modules/nf-core/interproscan/main.nf b/modules/nf-core/interproscan/main.nf new file mode 100644 index 00000000000..69bc7e14bdc --- /dev/null +++ b/modules/nf-core/interproscan/main.nf @@ -0,0 +1,82 @@ +process INTERPROSCAN { + tag "$meta.id" + label 'process_long' + + conda "bioconda::interproscan=5.59_91.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/interproscan:5.59_91.0--hec16e2b_1' : + 'quay.io/biocontainers/interproscan:5.59_91.0--hec16e2b_1' }" + + input: + tuple val(meta), path(fasta) + val(out_ext) + + output: + tuple val(meta), path('*.tsv'), optional: true, emit: tsv + tuple val(meta), path('*.xml'), optional: true, emit: xml + tuple val(meta), path('*.gff3'), optional: true, emit: gff3 + tuple val(meta), path('*.json'), optional: true, emit: json + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def appl = "-appl TIGRFAM,FunFam,SFLD,PANTHER,Gene3D,Hamap,ProSiteProfiles,Coils,SMART,CDD,PRINTS,PIRSR,ProSitePatterns,AntiFam,Pfam,MobiDBLite" + if ( args.contains("-appl") ) { + appl = "" + } + switch ( out_ext ) { + case "tsv": break + case "xml": break + case "gff3": break + case "json": break + default: + out_ext = 'tsv'; + log.warn("Unknown output file format provided (${out_ext}): selecting tsv as fallback"); + break + } + + // -dp (disable precalculation) is on so no online dependency + """ + interproscan.sh \\ + -cpu $task.cpus \\ + -i $fasta \\ + -f ${out_ext} \\ + -dp \\ + ${appl} \\ + ${args} \\ + -o ${prefix}.${out_ext} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + interproscan: \$(echo \$(interproscan.sh --version 2>&1) | head -n 1 | sed 's/^.*InterProScan version//' | sed 's/\\s*InterProScan.*//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + + switch ( out_ext ) { + case "tsv": break + case "xml": break + case "gff3": break + case "json": break + default: + out_ext = 'tsv'; + log.warn("Unknown output file format provided (${out_ext}): selecting tsv as fallback"); + break + } + + """ + touch ${prefix}.${out_ext} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + interproscan: \$(echo \$(interproscan.sh --version 2>&1) | head -n 1 | sed 's/^.*InterProScan version//' | sed 's/\\s*InterProScan.*//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/interproscan/meta.yml b/modules/nf-core/interproscan/meta.yml new file mode 100644 index 00000000000..069fbd07181 --- /dev/null +++ b/modules/nf-core/interproscan/meta.yml @@ -0,0 +1,54 @@ +name: "interproscan" +description: Produces protein annotations and predictions from a FASTA file +keywords: + - annotation + - fasta + - interproscan +tools: + - "interproscan": + description: "InterPro integrates together predictive information about proteins function from a number of partner resources" + homepage: "https://www.ebi.ac.uk/interpro/search/sequence/" + documentation: "https://interproscan-docs.readthedocs.io" + tool_dev_url: "https://github.com/ebi-pf-team/interproscan" + doi: "doi.org/10.1093/bioinformatics/btu031" + licence: "['GPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input fasta file containing query sequences + pattern: "*.{fa,fasta}" + - out_ext: + type: string + description: Specify the type of output file to be generated + pattern: "tsv|xml|gff3|json" + +output: + - tsv: + type: file + description: Tab separated file containing with detailed hits + pattern: "*.{tsv}" + - xml: + type: file + description: XML file containing with detailed hits + pattern: "*.{xml}" + - gff3: + type: file + description: GFF3 file containing with detailed hits + pattern: "*.{gff3}" + - json: + type: file + description: JSON file containing with detailed hits + pattern: "*.{json}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@toniher" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 73e76306607..3cd89c514c7 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1801,6 +1801,10 @@ instrain/profile: - modules/nf-core/instrain/profile/** - tests/modules/nf-core/instrain/profile/** +interproscan: + - modules/nf-core/interproscan/** + - tests/modules/nf-core/interproscan/** + iqtree: - modules/nf-core/iqtree/** - tests/modules/nf-core/iqtree/** diff --git a/tests/modules/nf-core/interproscan/main.nf b/tests/modules/nf-core/interproscan/main.nf new file mode 100644 index 00000000000..b8e13667f33 --- /dev/null +++ b/tests/modules/nf-core/interproscan/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { INTERPROSCAN } from '../../../../modules/nf-core/interproscan/main.nf' + +workflow test_interproscan { + + input = [ + [ id:'test' ], + file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) + ] + out_ext = 'tsv' + + INTERPROSCAN ( input, out_ext ) +} diff --git a/tests/modules/nf-core/interproscan/nextflow.config b/tests/modules/nf-core/interproscan/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/interproscan/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/interproscan/test.yml b/tests/modules/nf-core/interproscan/test.yml new file mode 100644 index 00000000000..1e130236bfc --- /dev/null +++ b/tests/modules/nf-core/interproscan/test.yml @@ -0,0 +1,12 @@ +- name: "interproscan" + command: nextflow run ./tests/modules/nf-core/interproscan -entry test_interproscan -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/interproscan/nextflow.config + tags: + - "interproscan" + files: + - path: "output/interproscan/test.tsv" + contains: + - "Coils\tCoil\tCoil\t1176" + - "cd00009" + - "7096\tMobiDBLite" + - path: "output/interproscan/versions.yml" + md5sum: 8840a3d0621061601c4da4c19c276aac From 42bf48a64eda0c0672414ac65b535c2adbe74ab1 Mon Sep 17 00:00:00 2001 From: Simon Heumos Date: Thu, 13 Apr 2023 20:34:35 +0200 Subject: [PATCH 069/120] Update ODGI_SQUEEZE - Only accept ODGI files as input (#3284) * engange odgi squeeze! * EOL * remove dangling TODO * Update modules/nf-core/odgi/squeeze/main.nf Co-authored-by: Jonathan Manning * Update tests/modules/nf-core/odgi/squeeze/main.nf Co-authored-by: Jonathan Manning * align emits * fix tests, don't use Channel.from() * channel magic * we only want to squeez ODGI files * also reflect GFA changes in yaml * we don't need a GFA in the test anymore --------- Co-authored-by: Jonathan Manning --- modules/nf-core/odgi/squeeze/main.nf | 1 - modules/nf-core/odgi/squeeze/meta.yml | 4 ++-- tests/modules/nf-core/odgi/squeeze/main.nf | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/nf-core/odgi/squeeze/main.nf b/modules/nf-core/odgi/squeeze/main.nf index 8a2f21e49c6..f476b4bf4e8 100644 --- a/modules/nf-core/odgi/squeeze/main.nf +++ b/modules/nf-core/odgi/squeeze/main.nf @@ -22,7 +22,6 @@ process ODGI_SQUEEZE { def prefix = task.ext.prefix ?: "${meta.id}" """ ls *.og > files - ls *.gfa >> files odgi \\ squeeze \\ $args \\ diff --git a/modules/nf-core/odgi/squeeze/meta.yml b/modules/nf-core/odgi/squeeze/meta.yml index d477878fa72..89acd892e46 100644 --- a/modules/nf-core/odgi/squeeze/meta.yml +++ b/modules/nf-core/odgi/squeeze/meta.yml @@ -22,8 +22,8 @@ input: e.g. [ id:'test', single_end:false ] - graphs: type: files - description: Pangenome graph files in ODGI or GFA v1.0 format. - pattern: "*.{og,gfa}" + description: Pangenome graph files in ODGI format. + pattern: "*.{og}" output: - meta: diff --git a/tests/modules/nf-core/odgi/squeeze/main.nf b/tests/modules/nf-core/odgi/squeeze/main.nf index a626ac18e5a..46ae99eedc3 100644 --- a/tests/modules/nf-core/odgi/squeeze/main.nf +++ b/tests/modules/nf-core/odgi/squeeze/main.nf @@ -6,11 +6,9 @@ include { ODGI_SQUEEZE } from '../../../../../modules/nf-core/odgi/squeeze/main. workflow test_odgi_squeeze { odgi = file(params.test_data['homo_sapiens']['pangenome']['odgi']['pangenome_og'], checkIfExists: true) - gfa = file(params.test_data['homo_sapiens']['pangenome']['pangenome_smoothxg_gfa'], checkIfExists: true) input = [ [ id:'test' ], // meta map - [ odgi, - gfa] + [ odgi ] ] ODGI_SQUEEZE ( input ) From 7653353590d1d46ce568153205c66f02eea379d6 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Fri, 14 Apr 2023 09:32:05 +0200 Subject: [PATCH 070/120] FIX: #3045 md5sum in gatk4 modules' update (#3282) * update md5sum * fix: subworkflow * remove md5sum as it changes * actually fix subworkflow * update md5sum --- .../nf-core/bam_create_som_pon_gatk/main.nf | 8 +++--- .../bam_create_som_pon_gatk/nextflow.config | 3 --- .../modules/nf-core/gatk4/applybqsr/test.yml | 1 - .../nf-core/gatk4/intervallisttools/test.yml | 8 +++--- .../nf-core/gatk4/markduplicates/test.yml | 8 +++--- .../modules/nf-core/gatk4/samtofastq/test.yml | 6 ++--- .../modules/nf-core/gatk4/splitcram/test.yml | 4 +-- .../nf-core/gatk4/splitncigarreads/test.yml | 4 +-- .../nf-core/bam_create_som_pon_gatk/main.nf | 6 ++--- .../bam_create_som_pon_gatk/nextflow.config | 9 +++++++ .../nf-core/bam_create_som_pon_gatk/test.yml | 25 ++++++++++--------- 11 files changed, 43 insertions(+), 39 deletions(-) delete mode 100644 subworkflows/nf-core/bam_create_som_pon_gatk/nextflow.config create mode 100644 tests/subworkflows/nf-core/bam_create_som_pon_gatk/nextflow.config diff --git a/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf b/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf index 3dfc9809d68..1edd5676e2b 100644 --- a/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf +++ b/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf @@ -1,9 +1,6 @@ // // Run GATK mutect2, genomicsdbimport and createsomaticpanelofnormals // -params.mutect2_options = [args: '--max-mnp-distance 0'] -params.gendbimport_options = [:] -params.createsompon_options = [:] include { GATK4_MUTECT2 } from '../../../modules/nf-core/gatk4/mutect2/main' include { GATK4_GENOMICSDBIMPORT } from '../../../modules/nf-core/gatk4/genomicsdbimport/main' @@ -42,12 +39,13 @@ workflow BAM_CREATE_SOM_PON_GATK { // ch_vcf = GATK4_MUTECT2.out.vcf.collect{it[1]}.toList() ch_index = GATK4_MUTECT2.out.tbi.collect{it[1]}.toList() + ch_gendb_input = Channel.of([id:val_pon_norm]) .combine(ch_vcf) .combine(ch_index) .combine(ch_gendb_intervals) - .combine([]) - .combine(ch_dict) + .combine(ch_dict).map{meta, vcf, tbi, interval, dict -> [meta, vcf, tbi, interval, [], dict]} + GATK4_GENOMICSDBIMPORT ( ch_gendb_input, false, false, false ) ch_versions = ch_versions.mix(GATK4_GENOMICSDBIMPORT.out.versions.first()) diff --git a/subworkflows/nf-core/bam_create_som_pon_gatk/nextflow.config b/subworkflows/nf-core/bam_create_som_pon_gatk/nextflow.config deleted file mode 100644 index 6f560c9e69b..00000000000 --- a/subworkflows/nf-core/bam_create_som_pon_gatk/nextflow.config +++ /dev/null @@ -1,3 +0,0 @@ -params.mutect2_options = [:] -params.gendbimport_options = [:] -params.createsompon_options = [:] diff --git a/tests/modules/nf-core/gatk4/applybqsr/test.yml b/tests/modules/nf-core/gatk4/applybqsr/test.yml index 88d4c508fd1..cb0e082557c 100644 --- a/tests/modules/nf-core/gatk4/applybqsr/test.yml +++ b/tests/modules/nf-core/gatk4/applybqsr/test.yml @@ -25,5 +25,4 @@ - gatk4/applybqsr files: - path: output/gatk4/test.cram - md5sum: bbaa31756e79f296fbc20b07845b9547 - path: output/gatk4/versions.yml diff --git a/tests/modules/nf-core/gatk4/intervallisttools/test.yml b/tests/modules/nf-core/gatk4/intervallisttools/test.yml index d98116eff97..7d326171518 100644 --- a/tests/modules/nf-core/gatk4/intervallisttools/test.yml +++ b/tests/modules/nf-core/gatk4/intervallisttools/test.yml @@ -7,11 +7,11 @@ - path: output/gatk4/test.interval_list md5sum: e51101c9357fb2d59fd30e370eefa39c - path: output/gatk4/test_split/temp_0001_of_6/1scattered.interval_list - md5sum: 39385d38ac6cb7c05190026fc3b81411 + md5sum: 64f6665f9fbd257e4a300ec602f4e995 - path: output/gatk4/test_split/temp_0002_of_6/2scattered.interval_list - md5sum: 59f1978c5f4ef3fce3b110816283d9f5 + md5sum: f515c3da0c6accfd8e7dc33df50855c5 - path: output/gatk4/test_split/temp_0003_of_6/3scattered.interval_list - md5sum: 709fe81bfcf700bd80d96c62a71629fd + md5sum: 7a918e8c9211b54334587793e8cbae53 - path: output/gatk4/test_split/temp_0004_of_6/4scattered.interval_list - md5sum: c24044490cfedbcba61dbc646d3aa570 + md5sum: 1b93105227a7dc81f07101a1efd31498 - path: output/gatk4/versions.yml diff --git a/tests/modules/nf-core/gatk4/markduplicates/test.yml b/tests/modules/nf-core/gatk4/markduplicates/test.yml index 2c9dcf92d08..150ea83cb1e 100644 --- a/tests/modules/nf-core/gatk4/markduplicates/test.yml +++ b/tests/modules/nf-core/gatk4/markduplicates/test.yml @@ -5,9 +5,9 @@ - gatk4/markduplicates files: - path: output/gatk4/test.bai - md5sum: 109c91b598ff4df9d61a3c3326fe3f13 + md5sum: 26001bcdbce12e9f07557d8f7b8d360e - path: output/gatk4/test.bam - md5sum: 0c29a85e577d96c42268e49d245a4422 + md5sum: 2e17dfa6db576fd87be8b36fa2133c73 - path: output/gatk4/test.bam.metrics - path: output/gatk4/versions.yml @@ -18,9 +18,9 @@ - gatk4/markduplicates files: - path: output/gatk4/test.bai - md5sum: 9e2423b45c7b6744588f4d11213c457f + md5sum: 529fbbad54edf512a1249c9be4258fba - path: output/gatk4/test.bam - md5sum: edeb80cb484c6e8644f0306680446340 + md5sum: f178378cbc335ab2447f49f32b767083 - path: output/gatk4/test.bam.metrics - path: output/gatk4/versions.yml diff --git a/tests/modules/nf-core/gatk4/samtofastq/test.yml b/tests/modules/nf-core/gatk4/samtofastq/test.yml index 41b8504e142..eb179abba4e 100644 --- a/tests/modules/nf-core/gatk4/samtofastq/test.yml +++ b/tests/modules/nf-core/gatk4/samtofastq/test.yml @@ -5,7 +5,7 @@ - gatk4/samtofastq files: - path: output/gatk4/test.fastq.gz - md5sum: 50ace41d4c24467f24f8b929540a7797 + md5sum: 370979e8ecb385d0e91968c4124c08bd - path: output/gatk4/versions.yml - name: gatk4 samtofastq test_gatk4_samtofastq_paired_end @@ -15,9 +15,9 @@ - gatk4/samtofastq files: - path: output/gatk4/test_1.fastq.gz - md5sum: cfea607c9d75fd9ea9704780ad3a499c + md5sum: 8b74ed77c5afdec6e10a0839931be7f4 - path: output/gatk4/test_2.fastq.gz - md5sum: 613bf64c023609e1c62ad6ce9e4be8d7 + md5sum: ec085c1af75d08205d209a6d6d5e0111 - path: output/gatk4/versions.yml - name: gatk4 samtofastq test_gatk4_samtofastq_paired_end_stubs diff --git a/tests/modules/nf-core/gatk4/splitcram/test.yml b/tests/modules/nf-core/gatk4/splitcram/test.yml index 434d49ccade..20036f4d583 100644 --- a/tests/modules/nf-core/gatk4/splitcram/test.yml +++ b/tests/modules/nf-core/gatk4/splitcram/test.yml @@ -5,7 +5,7 @@ - gatk4/splitcram files: - path: output/gatk4/test.0000.cram - md5sum: 10545fa648f21e58f9f551a42f712121 + md5sum: 04961122fe68649ebc013e9b4a947331 - path: output/gatk4/test.0001.cram - md5sum: 3a28d5dafc7df2beebec48004b9cb707 + md5sum: d2caad8878e8cc9a5b899c13dcd451c0 - path: output/gatk4/versions.yml diff --git a/tests/modules/nf-core/gatk4/splitncigarreads/test.yml b/tests/modules/nf-core/gatk4/splitncigarreads/test.yml index 77a6dc2ac07..8f3b297f8fd 100644 --- a/tests/modules/nf-core/gatk4/splitncigarreads/test.yml +++ b/tests/modules/nf-core/gatk4/splitncigarreads/test.yml @@ -5,7 +5,7 @@ - gatk4 files: - path: output/gatk4/test.bam - md5sum: 910aaac4313960b125b76bdab3fb71c7 + md5sum: da4fc8528790723ca0682ffaab39f828 - path: output/gatk4/versions.yml - name: gatk4 splitncigarreads test_gatk4_splitncigarreads_intervals @@ -15,5 +15,5 @@ - gatk4 files: - path: output/gatk4/test.bam - md5sum: 53e598180b8d1c4b732e8b7aef9b94fe + md5sum: e904a350e8f0e8bc03393b0f66378384 - path: output/gatk4/versions.yml diff --git a/tests/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf b/tests/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf index 9d1ac303753..04cffe65562 100644 --- a/tests/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf +++ b/tests/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf @@ -4,19 +4,19 @@ nextflow.enable.dsl = 2 include { BAM_CREATE_SOM_PON_GATK } from '../../../../subworkflows/nf-core/bam_create_som_pon_gatk/main' -workflow test_gatk_create_som_pon { +workflow bam_create_som_pon_gatk { ch_mutect2_in = Channel.of( [ [ id:'test1' ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), - [] + [] ], [ [ id:'test2' ], // meta map file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), - [] + [] ] ) fasta = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)) diff --git a/tests/subworkflows/nf-core/bam_create_som_pon_gatk/nextflow.config b/tests/subworkflows/nf-core/bam_create_som_pon_gatk/nextflow.config new file mode 100644 index 00000000000..724fa321938 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_create_som_pon_gatk/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: GATK4_MUTECT2 { + ext.args = "--max-mnp-distance 0" + } + +} diff --git a/tests/subworkflows/nf-core/bam_create_som_pon_gatk/test.yml b/tests/subworkflows/nf-core/bam_create_som_pon_gatk/test.yml index d5117b49106..d628391f56a 100644 --- a/tests/subworkflows/nf-core/bam_create_som_pon_gatk/test.yml +++ b/tests/subworkflows/nf-core/bam_create_som_pon_gatk/test.yml @@ -1,8 +1,8 @@ -- name: gatk_create_som_pon - command: nextflow run ./tests/subworkflows/nf-core/gatk_create_som_pon -entry test_gatk_create_som_pon -c tests/config/nextflow.config +- name: bam_create_som_pon_gatk + command: nextflow run ./tests/subworkflows/nf-core/bam_create_som_pon_gatk -entry bam_create_som_pon_gatk -c tests/config/nextflow.config tags: - subworkflows - - subworkflows/gatk_create_som_pon + - subworkflows/bam_create_som_pon_gatk - gatk4 # Modules - gatk4/mutect2 @@ -12,27 +12,28 @@ # gatk4 mutect2 - path: output/gatk4/test1.vcf.gz - path: output/gatk4/test1.vcf.gz.stats - md5sum: 4f77301a125913170b8e9e7828b4ca3f + md5sum: b569ce66bbffe9588b3d221e821023ee - path: output/gatk4/test1.vcf.gz.tbi - path: output/gatk4/test2.vcf.gz - path: output/gatk4/test2.vcf.gz.stats - md5sum: 106c5828b02b906c97922618b6072169 + md5sum: 76f749c53212d72e98801f6030fbf8a6 - path: output/gatk4/test2.vcf.gz.tbi # gatk4 genomicsdbimport - path: output/gatk4/test_panel/__tiledb_workspace.tdb md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/gatk4/test_panel/callset.json - md5sum: 2ab411773b7267de61f8c04939de2a99 - - path: output/gatk4/test_panel/chr22$1$40001/.__consolidation_lock - md5sum: d41d8cd98f00b204e9800998ecf8427e - - path: output/gatk4/test_panel/chr22$1$40001/__array_schema.tdb - - path: output/gatk4/test_panel/chr22$1$40001/genomicsdb_meta_dir/genomicsdb_column_bounds.json - md5sum: 2502f79658bc000578ebcfddfc1194c0 + md5sum: 112a106e92e7fdb15bce50b7a1bb6edf + # Something is changing the path here, so removing that from the path for now + # - path: output/gatk4/test_panel/chr22$1$40001/.__consolidation_lock + # md5sum: d41d8cd98f00b204e9800998ecf8427e + # - path: output/gatk4/test_panel/chr22$1$40001/__array_schema.tdb + # - path: output/gatk4/test_panel/chr22$1$40001/genomicsdb_meta_dir/genomicsdb_column_bounds.json + # md5sum: 2502f79658bc000578ebcfddfc1194c0 - path: output/gatk4/test_panel/vcfheader.vcf contains: - "FORMAT= Date: Fri, 14 Apr 2023 11:59:50 +0200 Subject: [PATCH 071/120] Update SMOOTHXG to v0.7.0 (#3286) * module smoothxg: adjust output path * update SMOOTHXG to v0.7.0 --------- Co-authored-by: Jose Espinosa-Carrasco --- modules/nf-core/smoothxg/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/smoothxg/main.nf b/modules/nf-core/smoothxg/main.nf index 40e7d26066f..56599d821ab 100644 --- a/modules/nf-core/smoothxg/main.nf +++ b/modules/nf-core/smoothxg/main.nf @@ -2,10 +2,10 @@ process SMOOTHXG { tag "$meta.id" label 'process_high' - conda "bioconda::smoothxg=0.6.8" + conda "bioconda::smoothxg=0.7.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/smoothxg:0.6.8--hfb1f815_0' : - 'quay.io/biocontainers/smoothxg:0.6.8--hfb1f815_0' }" + 'https://depot.galaxyproject.org/singularity/smoothxg:0.7.0--hfb1f815_0' : + 'quay.io/biocontainers/smoothxg:0.7.0--hfb1f815_0' }" input: tuple val(meta), path(gfa) From d6b7b1f108dab88b0269a4331767c36a1a8da960 Mon Sep 17 00:00:00 2001 From: Jose Espinosa-Carrasco Date: Fri, 14 Apr 2023 12:01:51 +0200 Subject: [PATCH 072/120] Bump chromap 0.2.4 (#3285) * Bump chromap/index version * Bump chromap/chromap version * Update md5 hash * Fix conda test --- modules/nf-core/chromap/chromap/main.nf | 6 +++--- modules/nf-core/chromap/index/main.nf | 6 +++--- tests/modules/nf-core/chromap/chromap/test.yml | 2 +- tests/modules/nf-core/chromap/index/test.yml | 1 - tests/subworkflows/nf-core/fastq_align_chromap/test.yml | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/nf-core/chromap/chromap/main.nf b/modules/nf-core/chromap/chromap/main.nf index f47995b3756..5b7631cb54c 100644 --- a/modules/nf-core/chromap/chromap/main.nf +++ b/modules/nf-core/chromap/chromap/main.nf @@ -2,10 +2,10 @@ process CHROMAP_CHROMAP { tag "$meta.id" label 'process_medium' - conda "bioconda::chromap=0.2.1 bioconda::samtools=1.16.1" + conda "bioconda::chromap=0.2.4 bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:25259bafb105193269a9fd7595434c6fbddd4d3b-0' : - 'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:25259bafb105193269a9fd7595434c6fbddd4d3b-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:5b2e433ab8b3d1ef098fc944b567fd98caa23f56-0' : + 'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:5b2e433ab8b3d1ef098fc944b567fd98caa23f56-0' }" input: tuple val(meta), path(reads) diff --git a/modules/nf-core/chromap/index/main.nf b/modules/nf-core/chromap/index/main.nf index 0630c614d35..25ee6a7eb63 100644 --- a/modules/nf-core/chromap/index/main.nf +++ b/modules/nf-core/chromap/index/main.nf @@ -2,10 +2,10 @@ process CHROMAP_INDEX { tag "$fasta" label 'process_medium' - conda "bioconda::chromap=0.2.1" + conda "bioconda::chromap=0.2.4" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/chromap:0.2.1--hd03093a_0' : - 'quay.io/biocontainers/chromap:0.2.1--hd03093a_0' }" + 'https://depot.galaxyproject.org/singularity/chromap:0.2.4--hd03093a_0' : + 'quay.io/biocontainers/chromap:0.2.4--hd03093a_0' }" input: tuple val(meta), path(fasta) diff --git a/tests/modules/nf-core/chromap/chromap/test.yml b/tests/modules/nf-core/chromap/chromap/test.yml index 6c507773387..7c1a9a0edcf 100644 --- a/tests/modules/nf-core/chromap/chromap/test.yml +++ b/tests/modules/nf-core/chromap/chromap/test.yml @@ -28,5 +28,5 @@ files: - path: output/chromap/genome.index - path: output/chromap/test.bam - md5sum: 28ccaa8e39ecf5617dc270bdd7ddf1ba + md5sum: 7f8af20a3fa52b2a8967977f0376f466 - path: output/chromap/versions.yml diff --git a/tests/modules/nf-core/chromap/index/test.yml b/tests/modules/nf-core/chromap/index/test.yml index d71767471d8..e3de1391482 100644 --- a/tests/modules/nf-core/chromap/index/test.yml +++ b/tests/modules/nf-core/chromap/index/test.yml @@ -6,4 +6,3 @@ files: - path: output/chromap/genome.index - path: output/chromap/versions.yml - md5sum: fc5c80190d0622ea3e979e6862f8e32b diff --git a/tests/subworkflows/nf-core/fastq_align_chromap/test.yml b/tests/subworkflows/nf-core/fastq_align_chromap/test.yml index c9b49f7bb16..0e79cd7d4f7 100644 --- a/tests/subworkflows/nf-core/fastq_align_chromap/test.yml +++ b/tests/subworkflows/nf-core/fastq_align_chromap/test.yml @@ -51,7 +51,7 @@ - path: ./output/samtools/test.sorted.bam.bai # samtools stats - path: ./output/samtools/test.sorted.bam.flagstat - md5sum: 7845b46e1dfdb6cea776bab7acf6f1e3 + md5sum: 2fa0d90162a1b655863796c2a6bd8f45 - path: ./output/samtools/test.sorted.bam.idxstats md5sum: 1adb27b52d4d64b826f48b59d61dcd4d - path: ./output/samtools/test.sorted.bam.stats From ba1ad555be19cb6cedb52c49b21e267b0b7110b7 Mon Sep 17 00:00:00 2001 From: Ryan James Kennedy <67742838+ryanjameskennedy@users.noreply.github.com> Date: Fri, 14 Apr 2023 13:14:36 +0200 Subject: [PATCH 073/120] Add gatk4 postprocessgermlinecnvcalls (#3273) * Add Gatk4 GermlineCNVCaller module * Change bed test files * Add stub * Fix channels * Test fixes * Remove conda as possible container * Add postprocessgermlinecnvcalls module * Fix conda error message * Update test config * Update meta.yml & test.yml * Update tests for germlinecnvcaller * Modify input channel * PR review fixes * Cleaning code * Cleaning code * Fix review comments * Change output naming * Use test-data * Fix linting error * Change output name --- .../nf-core/gatk4/germlinecnvcaller/main.nf | 8 +- .../gatk4/postprocessgermlinecnvcalls/main.nf | 74 +++++++++++++++++++ .../postprocessgermlinecnvcalls/meta.yml | 66 +++++++++++++++++ tests/config/pytest_modules.yml | 37 +++++----- tests/config/test_data.config | 4 + .../nf-core/gatk4/germlinecnvcaller/main.nf | 37 +++------- .../nf-core/gatk4/germlinecnvcaller/test.yml | 6 +- .../gatk4/postprocessgermlinecnvcalls/main.nf | 38 ++++++++++ .../nextflow.config | 21 ++++++ .../postprocessgermlinecnvcalls/test.yml | 11 +++ 10 files changed, 251 insertions(+), 51 deletions(-) create mode 100644 modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf create mode 100644 modules/nf-core/gatk4/postprocessgermlinecnvcalls/meta.yml create mode 100644 tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf create mode 100644 tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/nextflow.config create mode 100644 tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/test.yml diff --git a/modules/nf-core/gatk4/germlinecnvcaller/main.nf b/modules/nf-core/gatk4/germlinecnvcaller/main.nf index 7eefeb7c41f..f3e7248ec3d 100644 --- a/modules/nf-core/gatk4/germlinecnvcaller/main.nf +++ b/modules/nf-core/gatk4/germlinecnvcaller/main.nf @@ -16,8 +16,8 @@ process GATK4_GERMLINECNVCALLER { path ploidy output: - tuple val(meta), path("*-calls.tar.gz"), emit: calls, optional: true - tuple val(meta), path("*-model.tar.gz"), emit: model, optional: true + tuple val(meta), path("*-cnv-calls.tar.gz"), emit: calls, optional: true + tuple val(meta), path("*-cnv-model.tar.gz"), emit: model, optional: true path "versions.yml" , emit: versions when: @@ -32,8 +32,8 @@ process GATK4_GERMLINECNVCALLER { def ploidy_command = ploidy ? (ploidy.name.endsWith(".tar.gz") ? "--contig-ploidy-calls ${ploidy.toString().replace(".tar.gz","")}" : "--contig-ploidy-calls ${ploidy}") : "" def model_command = model ? (model.name.endsWith(".tar.gz") ? "--model ${model.toString().replace(".tar.gz","")}/${prefix}-model" : "--model ${model}/${prefix}-model") : "" def input_list = tsv.collect{"--input $it"}.join(' ') - def output_command = model ? "--output ${prefix}-calls" : "--output ${prefix}-model" - def tar_output = model ? "tar -czf ${prefix}-calls.tar.gz ${prefix}-calls" : "tar -czf ${prefix}-model.tar.gz ${prefix}-model" + def output_command = model ? "--output ${prefix}-cnv-calls" : "--output ${prefix}-cnv-model" + def tar_output = model ? "tar -czf ${prefix}-cnv-calls.tar.gz ${prefix}-cnv-calls" : "tar -czf ${prefix}-cnv-model.tar.gz ${prefix}-cnv-model" def avail_mem = 3072 if (!task.memory) { diff --git a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf new file mode 100644 index 00000000000..9e965107e21 --- /dev/null +++ b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf @@ -0,0 +1,74 @@ +process GATK4_POSTPROCESSGERMLINECNVCALLS { + tag "$meta.id" + label 'process_single' + + //Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811 + container "broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "GATK4_POSTPROCESSGERMLINECNVCALLS module does not support Conda. Please use Docker / Singularity / Podman instead." + } + + input: + tuple val(meta), path(ploidy) + path model + path calls + + output: + tuple val(meta), path("*_genotyped_intervals.vcf.gz") , emit: intervals, optional: true + tuple val(meta), path("*_genotyped_segments.vcf.gz") , emit: segments, optional: true + tuple val(meta), path("*_denoised.vcf.gz") , emit: denoised, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def untar_ploidy = ploidy ? (ploidy.name.endsWith(".tar.gz") ? "tar -xzf ${ploidy}" : "") : "" + def untar_model = model ? (model.name.endsWith(".tar.gz") ? "tar -xzf ${model}" : "") : "" + def untar_calls = calls ? (calls.name.endsWith(".tar.gz") ? "tar -xzf ${calls}" : "") : "" + def ploidy_command = ploidy ? (ploidy.name.endsWith(".tar.gz") ? "--contig-ploidy-calls ${ploidy.toString().replace(".tar.gz","")}" : "--contig-ploidy-calls ${ploidy}") : "" + def model_command = model ? (model.name.endsWith(".tar.gz") ? "--model-shard-path ${model.toString().replace(".tar.gz","")}/${prefix}-model" : "--model-shard-path ${model}/${prefix}-model") : "" + def calls_command = calls ? (calls.name.endsWith(".tar.gz") ? "--calls-shard-path ${calls.toString().replace(".tar.gz","")}/${prefix}-calls" : "--calls-shard-path ${model}/${prefix}-calls") : "" + + def avail_mem = 3072 + if (!task.memory) { + log.info '[GATK GermlineCNVCaller] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = (task.memory.mega*0.8).intValue() + } + """ + ${untar_ploidy} + ${untar_model} + ${untar_calls} + + gatk --java-options "-Xmx${avail_mem}g" PostprocessGermlineCNVCalls \\ + $ploidy_command \\ + $model_command \\ + $calls_command \\ + --output-genotyped-intervals ${prefix}_genotyped_intervals.vcf.gz \\ + --output-genotyped-segments ${prefix}_genotyped_segments.vcf.gz \\ + --output-denoised-copy-ratios ${prefix}_denoised.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_genotyped_intervals.vcf.gz + touch ${prefix}_genotyped_segments.vcf.gz + touch ${prefix}_denoised.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/meta.yml b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/meta.yml new file mode 100644 index 00000000000..60a4c9efccb --- /dev/null +++ b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/meta.yml @@ -0,0 +1,66 @@ +name: "gatk4_postprocessgermlinecnvcalls" +description: Postprocesses the output of GermlineCNVCaller and generates VCFs and denoised copy ratios +keywords: + - gatk4 + - postprocessgermlinecnvcalls + - copy number +tools: + - gatk4: + description: | + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/articles/360037593411-PostprocessGermlineCNVCalls + doi: 10.1158/1538-7445.AM2017-3590 + licence: ["Apache-2.0"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ploidy: + type: directory + description: | + Optional - A folder containing the ploidy model. + When a model is supplied to tool will run in CASE mode. + The folder can be tar-zipped. + pattern: "*.tar.gz" + - calls: + type: directory + description: A folder containing the calls from the input files + pattern: "*.tar.gz" + - model: + type: directory + description: | + A folder containing the model from the input files. + This will only be created in COHORT mode (when no model is supplied to the process). + pattern: "*.tar.gz" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - denoised: + type: file + description: Denoised copy ratio file + pattern: "*.vcf.gz" + - segments: + type: file + description: Segments VCF file + pattern: "*.vcf.gz" + - intervals: + type: file + description: Intervals VCF file + pattern: "*.vcf.gz" + +authors: + - "@ryanjameskennedy" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 3cd89c514c7..f9e226661e5 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -782,14 +782,14 @@ cooler/zoomify: - modules/nf-core/cooler/zoomify/** - tests/modules/nf-core/cooler/zoomify/** -crisprcleanr/normalize: - - modules/nf-core/crisprcleanr/normalize/** - - tests/modules/nf-core/crisprcleanr/normalize/** - coreograph: - modules/nf-core/coreograph/** - tests/modules/nf-core/coreograph/** +crisprcleanr/normalize: + - modules/nf-core/crisprcleanr/normalize/** + - tests/modules/nf-core/crisprcleanr/normalize/** + crumble: - modules/nf-core/crumble/** - tests/modules/nf-core/crumble/** @@ -1379,6 +1379,10 @@ gatk4/mutect2: - modules/nf-core/gatk4/mutect2/** - tests/modules/nf-core/gatk4/mutect2/** +gatk4/postprocessgermlinecnvcalls: + - modules/nf-core/gatk4/postprocessgermlinecnvcalls/** + - tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/** + gatk4/preprocessintervals: - modules/nf-core/gatk4/preprocessintervals/** - tests/modules/nf-core/gatk4/preprocessintervals/** @@ -2178,14 +2182,14 @@ methyldackel/mbias: - modules/nf-core/methyldackel/mbias/** - tests/modules/nf-core/methyldackel/mbias/** -mindagap/mindagap: - - modules/nf-core/mindagap/mindagap/** - - tests/modules/nf-core/mindagap/mindagap/** - midas/run: - modules/nf-core/midas/run/** - tests/modules/nf-core/midas/run/** +mindagap/mindagap: + - modules/nf-core/mindagap/mindagap/** + - tests/modules/nf-core/mindagap/mindagap/** + minia: - modules/nf-core/minia/** - tests/modules/nf-core/minia/** @@ -2427,15 +2431,14 @@ pangolin: - modules/nf-core/pangolin/** - tests/modules/nf-core/pangolin/** -parabricks/fq2bam: - - modules/nf-core/parabricks/fq2bam/** - - tests/modules/nf-core/parabricks/fq2bam/** - -# GitHub Actions doesn't support GPUs, so stub parabricks/applybqsr: - modules/nf-core/parabricks/applybqsr/** - tests/modules/nf-core/parabricks/applybqsr/** +parabricks/fq2bam: + - modules/nf-core/parabricks/fq2bam/** + - tests/modules/nf-core/parabricks/fq2bam/** + paraclu: - modules/nf-core/paraclu/** - tests/modules/nf-core/paraclu/** @@ -3722,14 +3725,14 @@ wisecondorx/convert: - modules/nf-core/wisecondorx/convert/** - tests/modules/nf-core/wisecondorx/convert/** -wisecondorx/predict: - - modules/nf-core/wisecondorx/predict/** - - tests/modules/nf-core/wisecondorx/predict/** - wisecondorx/newref: - modules/nf-core/wisecondorx/newref/** - tests/modules/nf-core/wisecondorx/newref/** +wisecondorx/predict: + - modules/nf-core/wisecondorx/predict/** + - tests/modules/nf-core/wisecondorx/predict/** + yahs: - modules/nf-core/yahs/** - tests/modules/nf-core/yahs/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 822db092dcf..3dfa67129a0 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -177,6 +177,10 @@ params { genome_annotated_interval_tsv = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.annotated_intervals.tsv" genome_preprocessed_count_tsv = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.preprocessed_intervals.counts.tsv" genome_preprocessed_interval_list = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.preprocessed_intervals.interval_list" + genome_ploidy_model = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.ploidy_model.tar.gz" + genome_ploidy_calls = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.ploidy_calls.tar.gz" + genome_germline_cnv_model = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.germline_cnv_model.tar.gz" + genome_germline_cnv_calls = "${params.test_data_base}/data/genomics/homo_sapiens/genome/genome.germline_cnv_calls.tar.gz" genome_21_sdf = "${params.test_data_base}/data/genomics/homo_sapiens/genome/chr21/sequence/genome_sdf.tar.gz" genome_21_fasta = "${params.test_data_base}/data/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta" genome_21_fasta_fai = "${params.test_data_base}/data/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai" diff --git a/tests/modules/nf-core/gatk4/germlinecnvcaller/main.nf b/tests/modules/nf-core/gatk4/germlinecnvcaller/main.nf index c8669d48011..bee41473422 100644 --- a/tests/modules/nf-core/gatk4/germlinecnvcaller/main.nf +++ b/tests/modules/nf-core/gatk4/germlinecnvcaller/main.nf @@ -26,28 +26,17 @@ workflow test_gatk4_germlinecnvcaller_case { fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + ploidy_calls = Channel.of([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_ploidy_calls'], checkIfExists: true) ]) + cnv_model = Channel.of(file(params.test_data['homo_sapiens']['genome']['genome_germline_cnv_model'], checkIfExists: true)) GATK4_COLLECTREADCOUNTS ( inputs, fasta, fai, dict ) - dgcp_cohort_input = GATK4_COLLECTREADCOUNTS.out.tsv - .map({ meta, tsv -> [ [id:'test'], tsv ] }) + gcnvc_case_input = GATK4_COLLECTREADCOUNTS.out.tsv + .map({ meta, tsv -> [ [id:'test'], tsv ]}) .groupTuple() - .combine(bed) - .map({ meta, counts, bed -> [ meta, counts, bed, [] ]}) - GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT ( dgcp_cohort_input, priors, [] ) - - dgcp_case_input = dgcp_cohort_input.map({ meta, counts, bed, exclude_beds -> [ meta, counts, [], [] ]}) - GATK4_DETERMINEGERMLINECONTIGPLOIDY_CASE ( dgcp_case_input, [], GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT.out.model.collect{ it[1] } ) - - gcnvc_cohort_input = GATK4_COLLECTREADCOUNTS.out.tsv - .map({ meta, tsv -> return [[id:"test"], tsv ]}) - .groupTuple() - .combine(bed) - .map({ meta, counts, bed -> [ meta, counts, bed ]}) - GATK4_GERMLINECNVCALLER_COHORT ( gcnvc_cohort_input, [], GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT.out.calls.collect{ it[1] } ) - - gcnvc_case_input = gcnvc_cohort_input.map({ meta, counts, bed -> [ meta, counts, [] ]}) - GATK4_GERMLINECNVCALLER_CASE ( gcnvc_case_input, GATK4_GERMLINECNVCALLER_COHORT.out.model.collect{ it[1] }, GATK4_DETERMINEGERMLINECONTIGPLOIDY_CASE.out.calls.collect{ it[1] } ) + .map({ meta, counts -> [ meta, counts, [] ]}) + GATK4_GERMLINECNVCALLER_CASE ( gcnvc_case_input, cnv_model, ploidy_calls.collect{ it[1] } ) + GATK4_GERMLINECNVCALLER_CASE.out.calls } workflow test_gatk4_germlinecnvcaller_cohort { @@ -68,20 +57,16 @@ workflow test_gatk4_germlinecnvcaller_cohort { fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + ploidy_calls = Channel.of([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_ploidy_calls'], checkIfExists: true) ]) GATK4_COLLECTREADCOUNTS ( inputs, fasta, fai, dict ) - dgcp_cohort_input = GATK4_COLLECTREADCOUNTS.out.tsv - .map({ meta, tsv -> [ [id:'test'], tsv ] }) - .groupTuple() - .combine(bed) - .map({ meta, counts, bed -> [ meta, counts, bed, [] ]}) - GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT ( dgcp_cohort_input, priors, [] ) - gcnvc_cohort_input = GATK4_COLLECTREADCOUNTS.out.tsv .map({ meta, tsv -> return [[id:"test"], tsv ]}) .groupTuple() .combine(bed) .map({ meta, counts, bed -> [ meta, counts, bed ]}) - GATK4_GERMLINECNVCALLER_COHORT ( gcnvc_cohort_input, [], GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT.out.calls.collect{ it[1] } ) + GATK4_GERMLINECNVCALLER_COHORT ( gcnvc_cohort_input, [], ploidy_calls.collect{ it[1] } ) + GATK4_GERMLINECNVCALLER_COHORT.out.calls + GATK4_GERMLINECNVCALLER_COHORT.out.model } diff --git a/tests/modules/nf-core/gatk4/germlinecnvcaller/test.yml b/tests/modules/nf-core/gatk4/germlinecnvcaller/test.yml index 8dad926f869..78ba24eba71 100644 --- a/tests/modules/nf-core/gatk4/germlinecnvcaller/test.yml +++ b/tests/modules/nf-core/gatk4/germlinecnvcaller/test.yml @@ -4,8 +4,7 @@ - gatk4/germlinecnvcaller - gatk4 files: - - path: output/gatk4/test-calls.tar.gz - - path: output/gatk4/test-model.tar.gz + - path: output/gatk4/test-cnv-calls.tar.gz - path: output/gatk4/test1.tsv md5sum: 0ac78200288de9fc0aa122cc3f9a4fd0 - path: output/gatk4/test2.tsv @@ -18,8 +17,7 @@ - gatk4/germlinecnvcaller - gatk4 files: - - path: output/gatk4/test-calls.tar.gz - - path: output/gatk4/test-model.tar.gz + - path: output/gatk4/test-cnv-model.tar.gz - path: output/gatk4/test1.tsv md5sum: 0ac78200288de9fc0aa122cc3f9a4fd0 - path: output/gatk4/test2.tsv diff --git a/tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf b/tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf new file mode 100644 index 00000000000..116fe99c151 --- /dev/null +++ b/tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf @@ -0,0 +1,38 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_COLLECTREADCOUNTS } from '../../../../../modules/nf-core/gatk4/collectreadcounts/main.nf' +include { GATK4_DETERMINEGERMLINECONTIGPLOIDY as GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT } from '../../../../../modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf' +include { GATK4_DETERMINEGERMLINECONTIGPLOIDY as GATK4_DETERMINEGERMLINECONTIGPLOIDY_CASE } from '../../../../../modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf' +include { GATK4_GERMLINECNVCALLER as GATK4_GERMLINECNVCALLER_COHORT } from '../../../../../modules/nf-core/gatk4/germlinecnvcaller/main.nf' +include { GATK4_GERMLINECNVCALLER as GATK4_GERMLINECNVCALLER_CASE } from '../../../../../modules/nf-core/gatk4/germlinecnvcaller/main.nf' +include { GATK4_POSTPROCESSGERMLINECNVCALLS } from '../../../../../modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf' + +workflow test_gatk4_postprocessgermlinecnvcalls { + bed = Channel.of(file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true)) + priors = file(params.test_data['homo_sapiens']['illumina']['contig_ploidy_priors_table'], checkIfExists: true) + inputs = Channel.of([ + [ id:'test1' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true) + ], + [ + [ id:'test2' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_multi_interval_bed'], checkIfExists: true) + ]) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) + ploidy_calls = Channel.of([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_ploidy_calls'], checkIfExists: true) ]) + cnv_calls = Channel.of([ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_germline_cnv_calls'], checkIfExists: true) ]) + cnv_model = Channel.of(file(params.test_data['homo_sapiens']['genome']['genome_germline_cnv_model'], checkIfExists: true)) + + GATK4_POSTPROCESSGERMLINECNVCALLS ( ploidy_calls, cnv_model, cnv_calls.collect{ it[1] } ) + GATK4_POSTPROCESSGERMLINECNVCALLS.out.intervals + GATK4_POSTPROCESSGERMLINECNVCALLS.out.segments + GATK4_POSTPROCESSGERMLINECNVCALLS.out.denoised +} diff --git a/tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/nextflow.config b/tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/nextflow.config new file mode 100644 index 00000000000..88f61a49e11 --- /dev/null +++ b/tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/nextflow.config @@ -0,0 +1,21 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: 'GATK4_COLLECTREADCOUNTS*' { + ext.args = "--format TSV --interval-merging-rule OVERLAPPING_ONLY" + } + + withName: 'GATK4_DETERMINEGERMLINECONTIGPLOIDY_COHORT' { + ext.args = "--interval-merging-rule OVERLAPPING_ONLY" + } + + withName: 'GATK4_GERMLINECNVCALLER_COHORT' { + ext.args = "--interval-merging-rule OVERLAPPING_ONLY --run-mode COHORT" + } + + withName: 'GATK4_GERMLINECNVCALLER_CASE' { + ext.args = "--run-mode CASE" + } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/test.yml b/tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/test.yml new file mode 100644 index 00000000000..2c4f30e5bfd --- /dev/null +++ b/tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/test.yml @@ -0,0 +1,11 @@ +- name: gatk4 postprocessgermlinecnvcalls test_gatk4_postprocessgermlinecnvcalls + command: nextflow run ./tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls -entry test_gatk4_postprocessgermlinecnvcalls -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/postprocessgermlinecnvcalls/nextflow.config + tags: + - gatk4/postprocessgermlinecnvcalls + - gatk4 + files: + - path: output/gatk4/test_denoised.vcf.gz + md5sum: 788a4997afecf63c4a9dbca0d768d216 + - path: output/gatk4/test_genotyped_intervals.vcf.gz + - path: output/gatk4/test_genotyped_segments.vcf.gz + - path: output/gatk4/versions.yml From 28708bf9ef55937d87ff6604cb36a26b3275c43f Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Fri, 14 Apr 2023 16:12:11 +0200 Subject: [PATCH 074/120] new module AnnotSV (#3258) * new module AnnotSV * fix tests * fix versions * exclude conda tests * fix docker (wait for new one to build) * update annotSV * typo * more fixes * bump * it finally works! * update meta * update build * Apply suggestions from code review Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Update modules/nf-core/annotsv/annotsv/main.nf * Update modules/nf-core/annotsv/annotsv/main.nf Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --------- Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- .github/workflows/nf-test.yml | 2 + .github/workflows/pytest-workflow.yml | 2 + modules/nf-core/annotsv/annotsv/main.nf | 71 ++++++++++++++ modules/nf-core/annotsv/annotsv/meta.yml | 98 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 + tests/modules/nf-core/annotsv/annotsv/main.nf | 53 ++++++++++ .../nf-core/annotsv/annotsv/nextflow.config | 8 ++ .../modules/nf-core/annotsv/annotsv/test.yml | 10 ++ 8 files changed, 248 insertions(+) create mode 100644 modules/nf-core/annotsv/annotsv/main.nf create mode 100644 modules/nf-core/annotsv/annotsv/meta.yml create mode 100644 tests/modules/nf-core/annotsv/annotsv/main.nf create mode 100644 tests/modules/nf-core/annotsv/annotsv/nextflow.config create mode 100644 tests/modules/nf-core/annotsv/annotsv/test.yml diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index 2b03468b092..7c728cc15e9 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -40,6 +40,8 @@ jobs: tags: ["${{ fromJson(needs.changes.outputs.modules) }}"] profile: ["docker", "singularity", "conda"] exclude: + - profile: "conda" + tags: annotsv - profile: "conda" tags: bases2fastq - profile: "conda" diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index cf895115444..3b0c4d0472d 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -40,6 +40,8 @@ jobs: tags: ["${{ fromJson(needs.changes.outputs.modules) }}"] profile: ["docker", "singularity", "conda"] exclude: + - profile: "conda" + tags: annotsv - profile: "conda" tags: cellpose - profile: "conda" diff --git a/modules/nf-core/annotsv/annotsv/main.nf b/modules/nf-core/annotsv/annotsv/main.nf new file mode 100644 index 00000000000..7b92bacc7df --- /dev/null +++ b/modules/nf-core/annotsv/annotsv/main.nf @@ -0,0 +1,71 @@ +process ANNOTSV_ANNOTSV { + tag "$meta.id" + label 'process_low' + + conda "bioconda::annotsv=3.3.4" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/annotsv:3.3.4--py311hdfd78af_1' : + 'quay.io/biocontainers/annotsv:3.3.4--py311hdfd78af_1' }" + + input: + tuple val(meta), path(variants), path(variants_index) + tuple val(meta2), path(annotations) + tuple val(meta3), path(candidate_genes) + tuple val(meta4), path(candidate_small_variants) + tuple val(meta5), path(false_positive_snv) + tuple val(meta6), path(gene_transcripts) + + output: + tuple val(meta), path("*.tsv") , emit: tsv + tuple val(meta), path("*.unannotated.tsv") , emit: unannotated_tsv, optional: true + tuple val(meta), path("*.vcf") , emit: vcf, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def cand_genes = candidate_genes ? "-candidateGenesFile ${candidate_genes}" : "" + def cand_small = candidate_small_variants ? "-candidateSnvIndelFiles ${candidate_small_variants}" : "" + def fp_snv = false_positive_snv ? "-snvIndelFiles ${false_positive_snv}" : "" + def transcripts = gene_transcripts ? "-txFile ${gene_transcripts}" : "" + + """ + AnnotSV \\ + -annotationsDir ${annotations} \\ + ${cand_genes} \\ + ${cand_small} \\ + ${fp_snv} \\ + ${transcripts} \\ + -outputFile ${prefix}.tsv \\ + -SVinputFile ${variants} \\ + ${args} + + mv *_AnnotSV/* . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + annotsv: \$(echo \$(AnnotSV -help 2>&1 | head -n1 | sed 's/^AnnotSV //')) + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + def create_vcf = args.contains("-vcf 1") ? "touch ${prefix}.vcf" : "" + + """ + touch ${prefix}.tsv + touch ${prefix}.unannotated.tsv + ${create_vcf} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + annotsv: \$(echo \$(AnnotSV -help 2>&1 | head -n1 | sed 's/^AnnotSV //')) + END_VERSIONS + """ +} diff --git a/modules/nf-core/annotsv/annotsv/meta.yml b/modules/nf-core/annotsv/annotsv/meta.yml new file mode 100644 index 00000000000..d8379391d70 --- /dev/null +++ b/modules/nf-core/annotsv/annotsv/meta.yml @@ -0,0 +1,98 @@ +name: "annotsv_annotsv" +description: Annotation and Ranking of Structural Variation +keywords: + - annotation + - structural variants + - vcf + - bed + - tsv +tools: + - "annotsv": + description: "Annotation and Ranking of Structural Variation" + homepage: "https://lbgi.fr/AnnotSV/" + documentation: "https://lbgi.fr/AnnotSV/" + tool_dev_url: "https://github.com/lgmgeo/AnnotSV" + licence: "GPL-3.0" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - variants: + type: file + description: A VCF or BED file containing the structural variants to be annotated + pattern: "*.{bed,vcf,vcf.gz}" + - variants_index: + type: file + description: OPTIONAL - The index for gzipped VCF files + pattern: "*.{bed,vcf,vcf.gz}" + - meta2: + type: map + description: | + Groovy Map containing annotations information + - annotations: + type: directory + description: | + The directory containing the annotations (URL to download this will be made available soon) + For now this can be downloaded in the way defined in the repo (https://github.com/lgmgeo/AnnotSV#quick-installation) + - meta3: + type: map + description: | + Groovy Map containing candidate genes information + - candidate_genes: + type: file + description: OPTIONAL - A file containing genes (either space-separated, tab-separated or line-break-separated) + pattern: "*.txt" + - meta4: + type: map + description: | + Groovy Map containing candidate small variants information + - candidate_genes: + type: file + description: OPTIONAL - A VCF file containing small variant candidates + pattern: "*.{vcf,vcf.gz}" + - meta5: + type: map + description: | + Groovy Map containing candidate false positive SNV information + - candidate_genes: + type: file + description: OPTIONAL - A VCF file containing false positive SNVs + pattern: "*.{vcf,vcf.gz}" + - meta6: + type: map + description: | + Groovy Map containing candidate gene transcripts information + - candidate_genes: + type: file + description: OPTIONAL - A file containing the preferred gene transcripts to be used in priority during annotation (either space-separated or tab-separated) + pattern: "*.txt" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - tsv: + type: file + description: A TSV file containing the annotated variants + pattern: "*.tsv" + - unannotated_tsv: + type: file + description: OPTIONAL - TSV file containing the unannotated variants + pattern: "*.unannotated.tsv" + - vcf: + type: file + description: | + OPTIONAL - A VCF file containing the annotated variants (created when `-vcf 1` is specified in the args) + pattern: "*.vcf" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index f9e226661e5..a25d9f751e9 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -82,6 +82,10 @@ angsd/docounts: - modules/nf-core/angsd/docounts/** - tests/modules/nf-core/angsd/docounts/** +annotsv/annotsv: + - modules/nf-core/annotsv/annotsv/** + - tests/modules/nf-core/annotsv/annotsv/** + antismash/antismashlite: - modules/nf-core/antismash/antismashlite/** - tests/modules/nf-core/antismash/antismashlite/** diff --git a/tests/modules/nf-core/annotsv/annotsv/main.nf b/tests/modules/nf-core/annotsv/annotsv/main.nf new file mode 100644 index 00000000000..30bea512b36 --- /dev/null +++ b/tests/modules/nf-core/annotsv/annotsv/main.nf @@ -0,0 +1,53 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ANNOTSV_ANNOTSV } from '../../../../../modules/nf-core/annotsv/annotsv/main.nf' + +workflow test_annotsv_annotsv { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data["homo_sapiens"]["illumina"]["test_sv_vcf"], checkIfExists: true), + file(params.test_data["homo_sapiens"]["illumina"]["test_sv_vcf_tbi"], checkIfExists: true) + ] + + annotations = [ + [ id: 'annotations' ], + [] // For stub use only, this will fail if the actual module is run like this + ] + + // annotations = [ + // [ id:'annotations' ], + // file("/home/nvnieuwk/Documents/data/AnnotSV/share/AnnotSV", checkIfExists: true) + // ] + + genes = Channel + .of('GENE1', 'GENE2', 'GENE3') + .collectFile(name:'gene_candidates.txt', newLine:true) + .map { [[id:'test'], it]} + + small_variants = [ + [ id:'test' ], + file(params.test_data["homo_sapiens"]["illumina"]["test2_haplotc_vcf_gz"], checkIfExists:true) + ] + + false_positives = [ + [ id:'test' ], + file(params.test_data["homo_sapiens"]["illumina"]["test_haplotc_cnn_vcf_gz"], checkIfExists:true) + ] + + gene_transcripts = Channel + .of('GENE1 GENE2 GENE3') + .collectFile(name:'gene_transcripts.txt') + .map { [[id:'test'], it]} + + ANNOTSV_ANNOTSV ( + input, + annotations, + genes, + small_variants, + false_positives, + gene_transcripts + ) +} diff --git a/tests/modules/nf-core/annotsv/annotsv/nextflow.config b/tests/modules/nf-core/annotsv/annotsv/nextflow.config new file mode 100644 index 00000000000..9e37e60af3e --- /dev/null +++ b/tests/modules/nf-core/annotsv/annotsv/nextflow.config @@ -0,0 +1,8 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: ANNOTSV_ANNOTSV { + ext.args = "-vcf 1" + } +} diff --git a/tests/modules/nf-core/annotsv/annotsv/test.yml b/tests/modules/nf-core/annotsv/annotsv/test.yml new file mode 100644 index 00000000000..58f65b6d3d4 --- /dev/null +++ b/tests/modules/nf-core/annotsv/annotsv/test.yml @@ -0,0 +1,10 @@ +- name: annotsv annotsv test_annotsv_annotsv + command: nextflow run ./tests/modules/nf-core/annotsv/annotsv -entry test_annotsv_annotsv -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/annotsv/annotsv/nextflow.config -stub + tags: + - annotsv + - annotsv/annotsv + files: + - path: output/annotsv/test.tsv + - path: output/annotsv/test.unannotated.tsv + - path: output/annotsv/test.vcf + - path: output/annotsv/versions.yml From b68aee26a00c3578710004072a10927660d16015 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Mon, 17 Apr 2023 09:11:59 +0200 Subject: [PATCH 075/120] New module vcfanno/installannotations (#3290) * version 1 * add tests --- .../annotsv/installannotations/main.nf | 36 +++++++++++++++++++ .../annotsv/installannotations/meta.yml | 27 ++++++++++++++ tests/config/pytest_modules.yml | 4 +++ .../annotsv/installannotations/main.nf | 9 +++++ .../installannotations/nextflow.config | 5 +++ .../annotsv/installannotations/test.yml | 9 +++++ 6 files changed, 90 insertions(+) create mode 100644 modules/nf-core/annotsv/installannotations/main.nf create mode 100644 modules/nf-core/annotsv/installannotations/meta.yml create mode 100644 tests/modules/nf-core/annotsv/installannotations/main.nf create mode 100644 tests/modules/nf-core/annotsv/installannotations/nextflow.config create mode 100644 tests/modules/nf-core/annotsv/installannotations/test.yml diff --git a/modules/nf-core/annotsv/installannotations/main.nf b/modules/nf-core/annotsv/installannotations/main.nf new file mode 100644 index 00000000000..1ef0fc7d0e0 --- /dev/null +++ b/modules/nf-core/annotsv/installannotations/main.nf @@ -0,0 +1,36 @@ +process ANNOTSV_INSTALLANNOTATIONS { + tag 'AnnotSV annotations' + label 'process_single' + + conda "bioconda::annotsv=3.3.4" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/annotsv:3.3.4--py311hdfd78af_1': + 'quay.io/biocontainers/annotsv:3.3.4--py311hdfd78af_1' }" + + output: + path "AnnotSV_annotations", emit: annotations + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + """ + INSTALL_annotations.sh + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + annotsv: \$(echo \$(AnnotSV --version | sed 's/AnnotSV //')) + END_VERSIONS + """ + + stub: + """ + mkdir AnnotSV_annotations + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + annotsv: \$(echo \$(AnnotSV --version | sed 's/AnnotSV //')) + END_VERSIONS + """ +} diff --git a/modules/nf-core/annotsv/installannotations/meta.yml b/modules/nf-core/annotsv/installannotations/meta.yml new file mode 100644 index 00000000000..3dc5795ba8f --- /dev/null +++ b/modules/nf-core/annotsv/installannotations/meta.yml @@ -0,0 +1,27 @@ +name: "annotsv_installannotations" +description: Install the AnnotSV annotations +keywords: + - annotation + - download + - installation + - structural variants +tools: + - "annotsv": + description: "Annotation and Ranking of Structural Variation" + homepage: "https://lbgi.fr/AnnotSV/" + documentation: "https://lbgi.fr/AnnotSV/" + tool_dev_url: "https://github.com/lgmgeo/AnnotSV" + licence: "['GPL v3']" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - annotations: + type: file + description: A folder containing the annotations + pattern: "AnnotSV_annotations" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a25d9f751e9..914bf6fc0b2 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -82,6 +82,10 @@ angsd/docounts: - modules/nf-core/angsd/docounts/** - tests/modules/nf-core/angsd/docounts/** +annotsv/installannotations: + - modules/nf-core/annotsv/installannotations/** + - tests/modules/nf-core/annotsv/installannotations/** + annotsv/annotsv: - modules/nf-core/annotsv/annotsv/** - tests/modules/nf-core/annotsv/annotsv/** diff --git a/tests/modules/nf-core/annotsv/installannotations/main.nf b/tests/modules/nf-core/annotsv/installannotations/main.nf new file mode 100644 index 00000000000..7e171a3fe2d --- /dev/null +++ b/tests/modules/nf-core/annotsv/installannotations/main.nf @@ -0,0 +1,9 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ANNOTSV_INSTALLANNOTATIONS } from '../../../../../modules/nf-core/annotsv/installannotations/main.nf' + +workflow test_annotsv_installannotations { + ANNOTSV_INSTALLANNOTATIONS() +} diff --git a/tests/modules/nf-core/annotsv/installannotations/nextflow.config b/tests/modules/nf-core/annotsv/installannotations/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/annotsv/installannotations/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/annotsv/installannotations/test.yml b/tests/modules/nf-core/annotsv/installannotations/test.yml new file mode 100644 index 00000000000..759ae6bc862 --- /dev/null +++ b/tests/modules/nf-core/annotsv/installannotations/test.yml @@ -0,0 +1,9 @@ +- name: annotsv installannotations test_annotsv_installannotations + command: nextflow run ./tests/modules/nf-core/annotsv/installannotations -entry test_annotsv_installannotations -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/annotsv/installannotations/nextflow.config + tags: + - annotsv/installannotations + - annotsv + files: + - path: output/annotsv/AnnotSV_annotations/Annotations_Exomiser + - path: output/annotsv/AnnotSV_annotations/Annotations_Human + - path: output/annotsv/versions.yml From 8b97329e850add26d11d822209cc6712f829e12a Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Mon, 17 Apr 2023 11:49:24 +0200 Subject: [PATCH 076/120] Add sample specific resources to VCFanno (#3296) update vcfanno --- modules/nf-core/vcfanno/main.nf | 12 ++++++------ modules/nf-core/vcfanno/meta.yml | 7 +++++-- tests/modules/nf-core/vcfanno/main.nf | 6 ++++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/vcfanno/main.nf b/modules/nf-core/vcfanno/main.nf index 2d5d162a3a3..86a11992ea6 100644 --- a/modules/nf-core/vcfanno/main.nf +++ b/modules/nf-core/vcfanno/main.nf @@ -8,7 +8,7 @@ process VCFANNO { 'quay.io/biocontainers/vcfanno:0.3.3--h9ee0642_0' }" input: - tuple val(meta), path(vcf), path(tbi) + tuple val(meta), path(vcf), path(tbi), path(specific_resources) path toml path lua path resources @@ -26,11 +26,11 @@ process VCFANNO { def lua_cmd = lua ? "--lua ${lua}" : "" """ vcfanno \\ - -p $task.cpus \\ - $args \\ - $lua_cmd \\ - $toml \\ - $vcf \\ + -p ${task.cpus} \\ + ${args} \\ + ${lua_cmd} \\ + ${toml} \\ + ${vcf} \\ > ${prefix}.vcf cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/vcfanno/meta.yml b/modules/nf-core/vcfanno/meta.yml index 9e6c1d72298..86fea0c47bc 100644 --- a/modules/nf-core/vcfanno/meta.yml +++ b/modules/nf-core/vcfanno/meta.yml @@ -30,6 +30,9 @@ input: type: file description: tabix index of query VCF - only needed if vcf is compressed pattern: "*.vcf.gz.tbi" + - specific_resources: + type: map + description: A list of sample specific reference files defined in toml config, must also include indices if bgzipped. - toml: type: file description: configuration file with reference file basenames @@ -39,8 +42,8 @@ input: description: Lua file for custom annotations pattern: "*.lua" - resources: - type: list - description: List of reference files defined in toml config, must also include indices. + type: map + description: List of reference files defined in toml config, must also include indices if bgzipped. output: - meta: diff --git a/tests/modules/nf-core/vcfanno/main.nf b/tests/modules/nf-core/vcfanno/main.nf index 64b988aff87..9f3e574968d 100644 --- a/tests/modules/nf-core/vcfanno/main.nf +++ b/tests/modules/nf-core/vcfanno/main.nf @@ -9,7 +9,8 @@ workflow test_vcfanno { input = [ [ id:'test_compressed', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists:true) ] lua = [] toml = file(params.test_data['homo_sapiens']['genome']['vcfanno_toml'], checkIfExists: true) @@ -25,7 +26,8 @@ workflow test_vcfanno_uncompressed { input = [ [ id:'test_uncompressed', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), - [] + [], + file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists:true) ] lua = [] toml = file(params.test_data['homo_sapiens']['genome']['vcfanno_toml'], checkIfExists: true) From 2093f9348b5a7cb5e38a50f1673c3bcfe5311ed0 Mon Sep 17 00:00:00 2001 From: Brad Langhorst Date: Mon, 17 Apr 2023 08:39:23 -0400 Subject: [PATCH 077/120] correct urls for MethylDackel (#3055) --- modules/nf-core/methyldackel/extract/meta.yml | 9 ++++----- modules/nf-core/methyldackel/mbias/meta.yml | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/methyldackel/extract/meta.yml b/modules/nf-core/methyldackel/extract/meta.yml index a831df1649a..9d777bb15cd 100644 --- a/modules/nf-core/methyldackel/extract/meta.yml +++ b/modules/nf-core/methyldackel/extract/meta.yml @@ -13,11 +13,10 @@ keywords: tools: - methyldackel: description: | - A (mostly) universal methylation extractor - for BS-seq experiments. - homepage: https://github.com/brentp/bwa-meth - documentation: https://github.com/brentp/bwa-meth - arxiv: arXiv:1401.1129 + Methylation caller from MethylDackel, a (mostly) universal methylation extractor + for methyl-seq experiments. + homepage: https://github.com/dpryan79/MethylDackel + documentation: https://github.com/dpryan79/MethylDackel/blob/master/README.md licence: ["MIT"] input: - meta: diff --git a/modules/nf-core/methyldackel/mbias/meta.yml b/modules/nf-core/methyldackel/mbias/meta.yml index 370f052a69c..752172324cc 100644 --- a/modules/nf-core/methyldackel/mbias/meta.yml +++ b/modules/nf-core/methyldackel/mbias/meta.yml @@ -14,11 +14,10 @@ keywords: tools: - methyldackel: description: | - A (mostly) universal methylation extractor - for BS-seq experiments. - homepage: https://github.com/brentp/bwa-meth - documentation: https://github.com/brentp/bwa-meth - arxiv: arXiv:1401.1129 + Read position methylation bias tools from MethylDackel, a (mostly) universal extractor + for methyl-seq experiments. + homepage: https://github.com/dpryan79/MethylDackel + documentation: https://github.com/dpryan79/MethylDackel/blob/master/README.md licence: ["MIT"] input: - meta: From 5427d51ca9aaf0b4c5919df6fa6c7a2f718ae2a8 Mon Sep 17 00:00:00 2001 From: Damon-Lee Pointon <51855558+DLBPointon@users.noreply.github.com> Date: Tue, 18 Apr 2023 12:31:27 +0100 Subject: [PATCH 078/120] ADD MODULE: gnu/sort (#3297) * GNU/SORT files * GNU/SORT test files * Ammended test files * Remove whitespace * Corrected tags * Linting corrections * Prettier formatting * Update modules/nf-core/gnu/sort/main.nf Removing superfluous cat Co-authored-by: Pontus Freyhult * Update modules/nf-core/gnu/sort/main.nf Removing superfluous cat Co-authored-by: Pontus Freyhult * Fixes to optimise module * Fixes to reflect changes to module --------- Co-authored-by: Pontus Freyhult --- modules/nf-core/gnu/sort/main.nf | 50 +++++++++++++++++++ modules/nf-core/gnu/sort/meta.yml | 41 +++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/config/test_data.config | 7 +++ tests/modules/nf-core/gnu/sort/main.nf | 34 +++++++++++++ .../modules/nf-core/gnu/sort/nextflow.config | 19 +++++++ tests/modules/nf-core/gnu/sort/test.yml | 13 +++++ 7 files changed, 168 insertions(+) create mode 100644 modules/nf-core/gnu/sort/main.nf create mode 100644 modules/nf-core/gnu/sort/meta.yml create mode 100644 tests/modules/nf-core/gnu/sort/main.nf create mode 100644 tests/modules/nf-core/gnu/sort/nextflow.config create mode 100644 tests/modules/nf-core/gnu/sort/test.yml diff --git a/modules/nf-core/gnu/sort/main.nf b/modules/nf-core/gnu/sort/main.nf new file mode 100644 index 00000000000..e2b0bc9eb85 --- /dev/null +++ b/modules/nf-core/gnu/sort/main.nf @@ -0,0 +1,50 @@ +process GNU_SORT { + tag "${meta.id}" + label "process_low" + + conda "conda-forge::coreutils=9.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" + + input: + tuple val(meta), path(input) + + output: + tuple val(meta), file( "${output_file}" ) , emit: sorted + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + suffix = task.ext.suffix ?: "${input.extension}" + output_file = "${prefix}.${suffix}" + def VERSION = "9.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + + """ + sort ${args} ${input} > ${output_file} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + coreutils: $VERSION + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + suffix = task.ext.suffix ?: "${input.extension}" + output_file = "${prefix}.${suffix}" + def VERSION = "9.1" + """ + sort ${args} ${input} > ${output_file} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + coreutils: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/gnu/sort/meta.yml b/modules/nf-core/gnu/sort/meta.yml new file mode 100644 index 00000000000..d53317a65bd --- /dev/null +++ b/modules/nf-core/gnu/sort/meta.yml @@ -0,0 +1,41 @@ +name: "GNU_SORT" +description: | + Writes a sorted concatenation of file/s +keywords: + - GNU + - sort +tools: + - sort: + description: "Writes a sorted consatenation of file/s" + homepage: "https://github.com/vgl-hub/gfastats" + documentation: "https://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html" + licence: ["GPL"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: Draft assembly file + pattern: "*.{txt,bed,interval,genome,bins}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sorted: + type: file + description: The sorted txt file generated by sort + pattern: "*.{txt,bed,interval,genome,bins}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@DLBPointon" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 914bf6fc0b2..1266c5756c5 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1571,6 +1571,10 @@ goat/taxonsearch: - modules/nf-core/goat/taxonsearch/** - tests/modules/nf-core/goat/taxonsearch/** +gnu/sort: + - modules/nf-core/gnu/sort/** + - tests/modules/nf-core/gnu/sort/** + goleft/indexsplit: - modules/nf-core/goleft/indexsplit/** - tests/modules/nf-core/goleft/indexsplit/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 3dfa67129a0..63870553f59 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -547,6 +547,13 @@ params { 'config' { ncbi_user_settings = "${params.test_data_base}/data/generic/config/ncbi_user_settings.mkfg" } + 'unsorted_data' { + 'unsorted_text' { + genome_file = "${params.test_data_base}/data/generic/unsorted_data/unsorted_text/test.genome" + intervals = "${params.test_data_base}/data/generic/unsorted_data/unsorted_text/test.bed" + numbers_csv = "${params.test_data_base}/data/generic/unsorted_data/unsorted_text/test.csv" + } + } } 'proteomics' { 'msspectra' { diff --git a/tests/modules/nf-core/gnu/sort/main.nf b/tests/modules/nf-core/gnu/sort/main.nf new file mode 100644 index 00000000000..a1e99556d91 --- /dev/null +++ b/tests/modules/nf-core/gnu/sort/main.nf @@ -0,0 +1,34 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 +include { GNU_SORT as GNU_SORT_A } from '../../../../../modules/nf-core/gnu/sort/main.nf' +include { GNU_SORT as GNU_SORT_B } from '../../../../../modules/nf-core/gnu/sort/main.nf' +include { GNU_SORT as GNU_SORT_C } from '../../../../../modules/nf-core/gnu/sort/main.nf' + +workflow test_gnu_sort { + + input_a = [ + [id:'test'], + file(params.test_data['generic']['unsorted_data']['unsorted_text']['genome_file'], + checkIfExists: true) + ] + + GNU_SORT_A ( input_a ) + + input_b = [ + [id:'test'], + file(params.test_data['generic']['unsorted_data']['unsorted_text']['intervals'], + checkIfExists: true) + ] + + GNU_SORT_B ( input_b ) + + input_c = [ + [id:'test'], + file(params.test_data['generic']['unsorted_data']['unsorted_text']['numbers_csv'], + checkIfExists: true) + ] + + GNU_SORT_C ( input_c ) + +} diff --git a/tests/modules/nf-core/gnu/sort/nextflow.config b/tests/modules/nf-core/gnu/sort/nextflow.config new file mode 100644 index 00000000000..fadb305c7cc --- /dev/null +++ b/tests/modules/nf-core/gnu/sort/nextflow.config @@ -0,0 +1,19 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: GNU_SORT_A { + ext.args = { "-k1,1 -k2,2n" } + ext.suffix = { "genome.sorted" } + } + + withName: GNU_SORT_B { + ext.args = { "-k1,1 -k2,2n" } + ext.suffix = { "bed.sorted" } + } + + withName: GNU_SORT_C { + ext.args = { "-t ';' -g -k 1,1 -k 2,2" } + ext.suffix = { "csv.sorted" } + } +} \ No newline at end of file diff --git a/tests/modules/nf-core/gnu/sort/test.yml b/tests/modules/nf-core/gnu/sort/test.yml new file mode 100644 index 00000000000..d23496ae682 --- /dev/null +++ b/tests/modules/nf-core/gnu/sort/test.yml @@ -0,0 +1,13 @@ +- name: gnu sort test_gnu_sort + command: nextflow run ./tests/modules/nf-core/gnu/sort -entry test_gnu_sort -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gnu/sort/nextflow.config + tags: + - gnu + - gnu/sort + files: + - path: output/gnu/test.bed.sorted + md5sum: abbce903ef263d38b2f71856387799ab + - path: output/gnu/test.csv.sorted + md5sum: 0b52d1b4c4a0c6e972c6f94aafd75a1d + - path: output/gnu/test.genome.sorted + md5sum: fd97f7efafdbbfa71d9b560f10b4b048 + - path: output/gnu/versions.yml From 5ec36aac6ba441625a090127b59dd888a0a0caa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Mart=C3=ADnez?= Date: Tue, 18 Apr 2023 14:38:19 +0200 Subject: [PATCH 079/120] fix #3261. (#3267) fix samtools/calmd yaml where name was all in caps. --- modules/nf-core/samtools/calmd/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/samtools/calmd/meta.yml b/modules/nf-core/samtools/calmd/meta.yml index 5b276a9ce6a..33904256249 100644 --- a/modules/nf-core/samtools/calmd/meta.yml +++ b/modules/nf-core/samtools/calmd/meta.yml @@ -1,4 +1,4 @@ -name: "SAMTOOLS_CALMD" +name: "samtools_calmd" description: calculates MD and NM tags keywords: - calmd From b7f0dbc07af00c0ccdc7c2df06efee8786e976ac Mon Sep 17 00:00:00 2001 From: Jose Espinosa-Carrasco Date: Tue, 18 Apr 2023 22:02:19 +0200 Subject: [PATCH 080/120] Change meta2 to meta3 for the index (#3302) --- modules/nf-core/chromap/chromap/main.nf | 2 +- modules/nf-core/chromap/chromap/meta.yml | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/chromap/chromap/main.nf b/modules/nf-core/chromap/chromap/main.nf index 5b7631cb54c..69a4bc1b653 100644 --- a/modules/nf-core/chromap/chromap/main.nf +++ b/modules/nf-core/chromap/chromap/main.nf @@ -10,7 +10,7 @@ process CHROMAP_CHROMAP { input: tuple val(meta), path(reads) tuple val(meta2), path(fasta) - tuple val(meta2), path(index) + tuple val(meta3), path(index) path barcodes path whitelist path chr_order diff --git a/modules/nf-core/chromap/chromap/meta.yml b/modules/nf-core/chromap/chromap/meta.yml index 10ce8f582ac..05f70cf0c00 100644 --- a/modules/nf-core/chromap/chromap/meta.yml +++ b/modules/nf-core/chromap/chromap/meta.yml @@ -36,12 +36,17 @@ input: - meta2: type: map description: | - Groovy Map containing sample information + Groovy Map containing information for the fasta e.g. [ id:'test' ] - fasta: type: file description: | The fasta reference file. + - meta3: + type: map + description: | + Groovy Map containing information for the index + e.g. [ id:'test' ] - index: type: file description: | From 02c04eae3c23ffa22c6aadd15efd93dda24942e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Mart=C3=ADnez?= Date: Wed, 19 Apr 2023 09:37:26 +0200 Subject: [PATCH 081/120] Lofreq somatic (#3280) * Add lofreq/somatic module * Add lofreq/somatic module * Add lofreq/somatic module * [automated] Fix linting with Prettier * Update modules/nf-core/lofreq/somatic/main.nf Change fasta & fai to tuple structure. Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Update modules/nf-core/lofreq/somatic/main.nf Delete "_lofreq_paired_" from prefix Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> * Add stub section. Add meta for reference. Consequently updated test data. Fix .editorconfig linting. * Fix test.yml * [automated] Fix linting with Prettier * Fix linting. --------- Co-authored-by: nf-core-bot Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- modules/nf-core/lofreq/somatic/main.nf | 53 ++++++++++++++ modules/nf-core/lofreq/somatic/meta.yml | 73 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 + tests/modules/nf-core/lofreq/somatic/main.nf | 28 +++++++ .../nf-core/lofreq/somatic/nextflow.config | 5 ++ tests/modules/nf-core/lofreq/somatic/test.yml | 37 ++++++++++ 6 files changed, 200 insertions(+) create mode 100644 modules/nf-core/lofreq/somatic/main.nf create mode 100644 modules/nf-core/lofreq/somatic/meta.yml create mode 100644 tests/modules/nf-core/lofreq/somatic/main.nf create mode 100644 tests/modules/nf-core/lofreq/somatic/nextflow.config create mode 100644 tests/modules/nf-core/lofreq/somatic/test.yml diff --git a/modules/nf-core/lofreq/somatic/main.nf b/modules/nf-core/lofreq/somatic/main.nf new file mode 100644 index 00000000000..ba5e478c4f9 --- /dev/null +++ b/modules/nf-core/lofreq/somatic/main.nf @@ -0,0 +1,53 @@ +process LOFREQ_SOMATIC { + tag "$meta.id" + label 'process_high' + + conda "bioconda::lofreq=2.1.5" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/lofreq:2.1.5--py38h588ecb2_4' : + 'quay.io/biocontainers/lofreq:2.1.5--py38h588ecb2_4' }" + + input: + tuple val(meta), path(tumor_bam), path(tumor_bai), path(normal_bam), path(normal_bai), path(target_bed) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + + output: + tuple val(meta), path("*.vcf.gz"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def options_target_bed = target_bed ? "-l ${target_bed}" : "" + """ + lofreq \\ + somatic \\ + --threads $task.cpus \\ + $args \\ + -f $fasta \\ + -t $tumor_bam \\ + -n $normal_bam \\ + ${options_target_bed} \\ + -o ${prefix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + lofreq: \$(echo \$(lofreq version 2>&1) | sed 's/^version: //; s/ *commit.*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + lofreq: \$(echo \$(lofreq version 2>&1) | sed 's/^version: //; s/ *commit.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/lofreq/somatic/meta.yml b/modules/nf-core/lofreq/somatic/meta.yml new file mode 100644 index 00000000000..695abf36c3c --- /dev/null +++ b/modules/nf-core/lofreq/somatic/meta.yml @@ -0,0 +1,73 @@ +name: "lofreq_somatic" +description: Lofreq subcommand to call low frequency variants from alignments when tumor-normal paired samples are available +keywords: + - variant calling + - low frequency variant calling + - somatic + - variants + - vcf +tools: + - "lofreq": + description: "A fast and sensitive variant-caller for inferring SNVs and indels from next-generation sequencing data" + homepage: https://csb5.github.io/lofreq/ + documentation: https://csb5.github.io/lofreq/commands/ + doi: 10.1093/nar/gks918 + licence: "['MIT']" + +input: + - meta: + type: map + description: Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - meta2: + type: map + description: Groovy Map containing reference information + - meta3: + type: map + description: Groovy Map containing reference information + - tumor_bam: + type: file + description: tumor sample input BAM file + pattern: "*.{bam}" + - tumor_bai: + type: file + description: tumor sample BAM index file + pattern: "*.{bai}" + - normal_bam: + type: file + description: normal sample input BAM file + pattern: "*.{bam}" + - normal_bai: + type: file + description: normal sample BAM index file + pattern: "*.{bai}" + - fasta: + type: file + description: Reference genome FASTA file + pattern: "*.{fasta}" + - fai: + type: file + description: Reference genome FASTA index file + pattern: "*.{fai}" + - target_bed: + type: file + description: BED file containing target regions for variant calling + pattern: "*.{bed}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf: + type: file + description: Gzipped VCF file containing variants + pattern: "*.{vcf.gz}" + +authors: + - "@nevinwui" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 1266c5756c5..a763399547f 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2014,6 +2014,10 @@ lofreq/indelqual: - modules/nf-core/lofreq/indelqual/** - tests/modules/nf-core/lofreq/indelqual/** +lofreq/somatic: + - modules/nf-core/lofreq/somatic/** + - tests/modules/nf-core/lofreq/somatic/** + macrel/contigs: - modules/nf-core/macrel/contigs/** - tests/modules/nf-core/macrel/contigs/** diff --git a/tests/modules/nf-core/lofreq/somatic/main.nf b/tests/modules/nf-core/lofreq/somatic/main.nf new file mode 100644 index 00000000000..b8a0e34a1d4 --- /dev/null +++ b/tests/modules/nf-core/lofreq/somatic/main.nf @@ -0,0 +1,28 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { LOFREQ_SOMATIC } from '../../../../../modules/nf-core/lofreq/somatic/main.nf' + +workflow test_lofreq_somatic { + + input = [ + [ id:'test_', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + ] + + fasta = [ + [id:'test_genome'], + file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + ] + fai = [ + [id:'test_genome_index'], + file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + ] + + LOFREQ_SOMATIC ( input, fasta, fai ) +} diff --git a/tests/modules/nf-core/lofreq/somatic/nextflow.config b/tests/modules/nf-core/lofreq/somatic/nextflow.config new file mode 100644 index 00000000000..19934e76a97 --- /dev/null +++ b/tests/modules/nf-core/lofreq/somatic/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/lofreq/somatic/test.yml b/tests/modules/nf-core/lofreq/somatic/test.yml new file mode 100644 index 00000000000..5d53aed992d --- /dev/null +++ b/tests/modules/nf-core/lofreq/somatic/test.yml @@ -0,0 +1,37 @@ +- name: lofreq somatic test_lofreq_somatic + command: nextflow run ./tests/modules/nf-core/lofreq/somatic -entry test_lofreq_somatic -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/lofreq/somatic/nextflow.config + tags: + - lofreq/somatic + - lofreq + files: + - path: output/lofreq/test_normal_relaxed.vcf.gz + contains: + - '##INFO=' + - path: output/lofreq/test_normal_stringent.indels.vcf.gz + contains: + - '##INFO=' + - path: output/lofreq/test_normal_stringent.snvs.vcf.gz + contains: + - '##INFO=' + - path: output/lofreq/test_somatic_final.indels.vcf.gz + contains: + - '##INFO=' + - path: output/lofreq/test_somatic_final.snvs.vcf.gz + contains: + - '##INFO=' + - path: output/lofreq/test_somatic_raw.indels.vcf.gz + contains: + - '##INFO=' + - path: output/lofreq/test_somatic_raw.snvs.vcf.gz + contains: + - '##INFO=' + - path: output/lofreq/test_tumor_relaxed.vcf.gz + contains: + - '##INFO=' + - path: output/lofreq/test_tumor_stringent.indels.vcf.gz + contains: + - '##INFO=' + - path: output/lofreq/test_tumor_stringent.snvs.vcf.gz + contains: + - '##INFO=' + - path: output/lofreq/versions.yml From 883121d7582071c7c5f59181b7608840bb09c04f Mon Sep 17 00:00:00 2001 From: Lucpen Date: Wed, 19 Apr 2023 11:19:33 +0200 Subject: [PATCH 082/120] feat added gatk4/asereadcounter (#3301) * feat added gatk4/asereadcounter * fix tidy up the alignments to make it more readable? --- modules/nf-core/gatk4/asereadcounter/main.nf | 66 +++++++++++++++++++ modules/nf-core/gatk4/asereadcounter/meta.yml | 64 ++++++++++++++++++ tests/config/pytest_modules.yml | 12 ++-- .../nf-core/gatk4/asereadcounter/main.nf | 23 +++++++ .../gatk4/asereadcounter/nextflow.config | 5 ++ .../nf-core/gatk4/asereadcounter/test.yml | 17 +++++ 6 files changed, 183 insertions(+), 4 deletions(-) create mode 100644 modules/nf-core/gatk4/asereadcounter/main.nf create mode 100644 modules/nf-core/gatk4/asereadcounter/meta.yml create mode 100644 tests/modules/nf-core/gatk4/asereadcounter/main.nf create mode 100644 tests/modules/nf-core/gatk4/asereadcounter/nextflow.config create mode 100644 tests/modules/nf-core/gatk4/asereadcounter/test.yml diff --git a/modules/nf-core/gatk4/asereadcounter/main.nf b/modules/nf-core/gatk4/asereadcounter/main.nf new file mode 100644 index 00000000000..ae70df5d04d --- /dev/null +++ b/modules/nf-core/gatk4/asereadcounter/main.nf @@ -0,0 +1,66 @@ +process GATK4_ASEREADCOUNTER { + tag "$meta.id" + label 'process_single' + + conda "bioconda::gatk4=4.4.0.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gatk4:4.4.0.0--py36hdfd78af_0': + 'quay.io/biocontainers/gatk4:4.4.0.0--py36hdfd78af_0' }" + + input: + tuple val(meta), path(input), path(input_index) + tuple val(meta), path(vcf), path(tbi) + path fasta + path fai + path dict + path intervals + + output: + tuple val(meta), file("*_ase.csv"), emit: csv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def reference_command = fasta ? "--reference $fasta" : "" + def dictionary_command = fasta ? "--sequence-dictionary $dict" : "" + def intervals_command = intervals ? "--intervals $intervals" : "" + def avail_mem = 3072 + if (!task.memory) { + log.info '[GATK ASEReadCounter] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = (task.memory.mega*0.8).intValue() + } + """ + gatk --java-options "-Xmx${avail_mem}M" ASEReadCounter \\ + --output ${prefix}_ase.csv \\ + --input ${input} \\ + --variant ${vcf} \\ + $reference_command \\ + $intervals_command \\ + $dictionary_command \\ + --tmp-dir . \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + touch ${prefix}_ase.csv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/gatk4/asereadcounter/meta.yml b/modules/nf-core/gatk4/asereadcounter/meta.yml new file mode 100644 index 00000000000..f3a9bfa1b53 --- /dev/null +++ b/modules/nf-core/gatk4/asereadcounter/meta.yml @@ -0,0 +1,64 @@ +name: "gatk4_asereadcounter" +description: Calculates the allele-specific read counts for alle-specific expression analysis of RNAseq data +keywords: + - asereadcounter + - gatk4 + - allele-specific +tools: + - "gatk4": + description: | + Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools + with a primary focus on variant discovery and genotyping. Its powerful processing engine + and high-performance computing features make it capable of taking on projects of any size. + homepage: https://gatk.broadinstitute.org/hc/en-us + documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s + doi: 10.1158/1538-7445.AM2017-3590 + licence: ["Apache-2.0"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - vcf: + type: file + description: VCF file + pattern: "*.{vcf.gz}" + - fasta: + type: file + description: fasta file + pattern: "*.{fasta,fa}" + - fai: + type: file + description: fasta index file + pattern: "*.{fai}" + - dict: + type: file + description: dictionary file + pattern: "*.{dict}" + - intervals: + type: file + description: interval file + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - csv: + type: file + description: output file + pattern: "*.{csv}" + +authors: + - "@Lucpen" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a763399547f..79fe292b864 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -82,14 +82,14 @@ angsd/docounts: - modules/nf-core/angsd/docounts/** - tests/modules/nf-core/angsd/docounts/** -annotsv/installannotations: - - modules/nf-core/annotsv/installannotations/** - - tests/modules/nf-core/annotsv/installannotations/** - annotsv/annotsv: - modules/nf-core/annotsv/annotsv/** - tests/modules/nf-core/annotsv/annotsv/** +annotsv/installannotations: + - modules/nf-core/annotsv/installannotations/** + - tests/modules/nf-core/annotsv/installannotations/** + antismash/antismashlite: - modules/nf-core/antismash/antismashlite/** - tests/modules/nf-core/antismash/antismashlite/** @@ -1239,6 +1239,10 @@ gatk4/applyvqsr: - modules/nf-core/gatk4/applyvqsr/** - tests/modules/nf-core/gatk4/applyvqsr/** +gatk4/asereadcounter: + - modules/nf-core/gatk4/asereadcounter/** + - tests/modules/nf-core/gatk4/asereadcounter/** + gatk4/baserecalibrator: - modules/nf-core/gatk4/baserecalibrator/** - tests/modules/nf-core/gatk4/baserecalibrator/** diff --git a/tests/modules/nf-core/gatk4/asereadcounter/main.nf b/tests/modules/nf-core/gatk4/asereadcounter/main.nf new file mode 100644 index 00000000000..0af3d0a2bb1 --- /dev/null +++ b/tests/modules/nf-core/gatk4/asereadcounter/main.nf @@ -0,0 +1,23 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GATK4_ASEREADCOUNTER } from '../../../../../modules/nf-core/gatk4/asereadcounter/main.nf' + +workflow test_gatk4_asereadcounter { + + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) + ] + vcf = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + intervals = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) + + GATK4_ASEREADCOUNTER ( input, vcf, fasta, fai, dict, intervals ) +} diff --git a/tests/modules/nf-core/gatk4/asereadcounter/nextflow.config b/tests/modules/nf-core/gatk4/asereadcounter/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/gatk4/asereadcounter/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/gatk4/asereadcounter/test.yml b/tests/modules/nf-core/gatk4/asereadcounter/test.yml new file mode 100644 index 00000000000..98ee2ffb50a --- /dev/null +++ b/tests/modules/nf-core/gatk4/asereadcounter/test.yml @@ -0,0 +1,17 @@ +- name: gatk4 asereadcounter test_gatk4_asereadcounter + command: nextflow run ./tests/modules/nf-core/gatk4/asereadcounter -entry test_gatk4_asereadcounter -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/asereadcounter/nextflow.config + tags: + - gatk4/asereadcounter + - gatk4 + files: + - path: output/gatk4/test_ase.csv + md5sum: 4fbcaf6b6a390889c56e105c41470b7b + - path: output/gatk4/versions.yml +- name: gatk4 asereadcounter test_gatk4_asereadcounter_stubs + command: nextflow run ./tests/modules/nf-core/gatk4/asereadcounter -entry test_gatk4_asereadcounter -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/gatk4/asereadcounter/nextflow.config -stub-run + tags: + - gatk4/asereadcounter + - gatk4 + files: + - path: output/gatk4/test_ase.csv + - path: output/gatk4/versions.yml From da53f7da4ff34b920bb3f186d151184bd440e3b5 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Wed, 19 Apr 2023 13:14:29 +0200 Subject: [PATCH 083/120] update stub of tabix/bgziptabix (#3304) --- modules/nf-core/tabix/bgziptabix/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/tabix/bgziptabix/main.nf b/modules/nf-core/tabix/bgziptabix/main.nf index d3a3bbffce1..120aa1149cf 100644 --- a/modules/nf-core/tabix/bgziptabix/main.nf +++ b/modules/nf-core/tabix/bgziptabix/main.nf @@ -34,8 +34,8 @@ process TABIX_BGZIPTABIX { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.gz - touch ${prefix}.gz.tbi + touch ${prefix}.${input.getExtension()}.gz + touch ${prefix}.${input.getExtension()}.gz.tbi cat <<-END_VERSIONS > versions.yml "${task.process}": From 7cf4500154a721906c271afaaeda8792bb1e2073 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Thu, 20 Apr 2023 10:11:04 +0200 Subject: [PATCH 084/120] move around the input of annotsv (#3305) * move around the input of annotsv * update meta * update naming --- modules/nf-core/annotsv/annotsv/main.nf | 13 +++++----- modules/nf-core/annotsv/annotsv/meta.yml | 24 ++++++++----------- tests/modules/nf-core/annotsv/annotsv/main.nf | 9 ++----- 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/modules/nf-core/annotsv/annotsv/main.nf b/modules/nf-core/annotsv/annotsv/main.nf index 7b92bacc7df..4ca6ce6234f 100644 --- a/modules/nf-core/annotsv/annotsv/main.nf +++ b/modules/nf-core/annotsv/annotsv/main.nf @@ -8,12 +8,11 @@ process ANNOTSV_ANNOTSV { 'quay.io/biocontainers/annotsv:3.3.4--py311hdfd78af_1' }" input: - tuple val(meta), path(variants), path(variants_index) + tuple val(meta), path(sv_vcf), path(sv_vcf_index), path(candidate_small_variants) tuple val(meta2), path(annotations) tuple val(meta3), path(candidate_genes) - tuple val(meta4), path(candidate_small_variants) - tuple val(meta5), path(false_positive_snv) - tuple val(meta6), path(gene_transcripts) + tuple val(meta4), path(false_positive_snv) + tuple val(meta5), path(gene_transcripts) output: tuple val(meta), path("*.tsv") , emit: tsv @@ -29,7 +28,7 @@ process ANNOTSV_ANNOTSV { def prefix = task.ext.prefix ?: "${meta.id}" def cand_genes = candidate_genes ? "-candidateGenesFile ${candidate_genes}" : "" - def cand_small = candidate_small_variants ? "-candidateSnvIndelFiles ${candidate_small_variants}" : "" + def small_variants = candidate_small_variants ? "-candidateSnvIndelFiles ${candidate_small_variants}" : "" def fp_snv = false_positive_snv ? "-snvIndelFiles ${false_positive_snv}" : "" def transcripts = gene_transcripts ? "-txFile ${gene_transcripts}" : "" @@ -37,11 +36,11 @@ process ANNOTSV_ANNOTSV { AnnotSV \\ -annotationsDir ${annotations} \\ ${cand_genes} \\ - ${cand_small} \\ + ${small_variants} \\ ${fp_snv} \\ ${transcripts} \\ -outputFile ${prefix}.tsv \\ - -SVinputFile ${variants} \\ + -SVinputFile ${sv_vcf} \\ ${args} mv *_AnnotSV/* . diff --git a/modules/nf-core/annotsv/annotsv/meta.yml b/modules/nf-core/annotsv/annotsv/meta.yml index d8379391d70..35aa13467f7 100644 --- a/modules/nf-core/annotsv/annotsv/meta.yml +++ b/modules/nf-core/annotsv/annotsv/meta.yml @@ -20,14 +20,18 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - variants: + - sv_vcf: type: file description: A VCF or BED file containing the structural variants to be annotated pattern: "*.{bed,vcf,vcf.gz}" - - variants_index: + - sv_vcf_index: type: file description: OPTIONAL - The index for gzipped VCF files - pattern: "*.{bed,vcf,vcf.gz}" + pattern: "*.tbi" + - candidate_small_variants: + type: file + description: OPTIONAL - A file containing candidate small variants + pattern: "*.{vcf,vcf.gz}" - meta2: type: map description: | @@ -48,24 +52,16 @@ input: - meta4: type: map description: | - Groovy Map containing candidate small variants information - - candidate_genes: + Groovy Map containing candidate false positive SNV information + - false_positive_snv: type: file description: OPTIONAL - A VCF file containing small variant candidates pattern: "*.{vcf,vcf.gz}" - meta5: - type: map - description: | - Groovy Map containing candidate false positive SNV information - - candidate_genes: - type: file - description: OPTIONAL - A VCF file containing false positive SNVs - pattern: "*.{vcf,vcf.gz}" - - meta6: type: map description: | Groovy Map containing candidate gene transcripts information - - candidate_genes: + - gene_transcripts: type: file description: OPTIONAL - A file containing the preferred gene transcripts to be used in priority during annotation (either space-separated or tab-separated) pattern: "*.txt" diff --git a/tests/modules/nf-core/annotsv/annotsv/main.nf b/tests/modules/nf-core/annotsv/annotsv/main.nf index 30bea512b36..4304e86b8c0 100644 --- a/tests/modules/nf-core/annotsv/annotsv/main.nf +++ b/tests/modules/nf-core/annotsv/annotsv/main.nf @@ -9,7 +9,8 @@ workflow test_annotsv_annotsv { input = [ [ id:'test', single_end:false ], // meta map file(params.test_data["homo_sapiens"]["illumina"]["test_sv_vcf"], checkIfExists: true), - file(params.test_data["homo_sapiens"]["illumina"]["test_sv_vcf_tbi"], checkIfExists: true) + file(params.test_data["homo_sapiens"]["illumina"]["test_sv_vcf_tbi"], checkIfExists: true), + file(params.test_data["homo_sapiens"]["illumina"]["test2_haplotc_vcf_gz"], checkIfExists:true) ] annotations = [ @@ -27,11 +28,6 @@ workflow test_annotsv_annotsv { .collectFile(name:'gene_candidates.txt', newLine:true) .map { [[id:'test'], it]} - small_variants = [ - [ id:'test' ], - file(params.test_data["homo_sapiens"]["illumina"]["test2_haplotc_vcf_gz"], checkIfExists:true) - ] - false_positives = [ [ id:'test' ], file(params.test_data["homo_sapiens"]["illumina"]["test_haplotc_cnn_vcf_gz"], checkIfExists:true) @@ -46,7 +42,6 @@ workflow test_annotsv_annotsv { input, annotations, genes, - small_variants, false_positives, gene_transcripts ) From c8d5b17160a399fc8c3ffd056592bde48833aaed Mon Sep 17 00:00:00 2001 From: Simon Heumos Date: Thu, 20 Apr 2023 11:30:20 +0200 Subject: [PATCH 085/120] Update WFMASH to v0.10.3 (#3307) * add module wfmash * more I/O query options * Update modules/nf-core/wfmash/main.nf Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> * Update modules/nf-core/wfmash/main.nf Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> * address review comments * bump wfmash to 0.10.2 * fix tag of wfmash * address review * fix versions output * predefine prefix when PAF input is given * address personally communicated review * add previously deleted line * enable proper PAF handling when having several input metas * make it clearer PAF input is optional * bind fai,gzi to meta * Update WFMASH to v0.10.3 * Update WFMASH to v0.10.3 --------- Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Co-authored-by: Maxime U. Garcia --- modules/nf-core/wfmash/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/wfmash/main.nf b/modules/nf-core/wfmash/main.nf index 4d65329a766..e7a042f039c 100644 --- a/modules/nf-core/wfmash/main.nf +++ b/modules/nf-core/wfmash/main.nf @@ -2,10 +2,10 @@ process WFMASH { tag "$meta.id" label 'process_medium' - conda "bioconda::wfmash=0.10.2" + conda "bioconda::wfmash=0.10.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/wfmash:0.10.2--hfdddef0_0': - 'quay.io/biocontainers/wfmash:0.10.2--hfdddef0_0' }" + 'https://depot.galaxyproject.org/singularity/wfmash:0.10.3--h71f629c_0': + 'quay.io/biocontainers/wfmash:0.10.3--h71f629c_0' }" input: tuple val(meta), path(fasta_gz), path(paf), path(gzi), path(fai) From 836b967b3a288c8b06efd97c360b654a3f478a0e Mon Sep 17 00:00:00 2001 From: Simon Heumos Date: Thu, 20 Apr 2023 11:30:40 +0200 Subject: [PATCH 086/120] Update seqwish to v0.7.9 (#3308) --- modules/nf-core/seqwish/induce/main.nf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/seqwish/induce/main.nf b/modules/nf-core/seqwish/induce/main.nf index 18555016a08..187d345a448 100644 --- a/modules/nf-core/seqwish/induce/main.nf +++ b/modules/nf-core/seqwish/induce/main.nf @@ -2,11 +2,10 @@ process SEQWISH_INDUCE { tag "$meta.id" label 'process_medium' - conda "bioconda::seqwish=0.7.8" - + conda "bioconda::seqwish=0.7.9" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/seqwish:0.7.8--h5b5514e_0' : - 'quay.io/biocontainers/seqwish:0.7.8--h5b5514e_0' }" + 'https://depot.galaxyproject.org/singularity/seqwish:0.7.9--h5b5514e_0' : + 'quay.io/biocontainers/seqwish:0.7.9--h5b5514e_0' }" input: tuple val(meta), path(paf), path(fasta) From 278dfc354f62ad086ce5dfce491e4fbeaf0848fc Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Fri, 21 Apr 2023 15:28:27 +0100 Subject: [PATCH 087/120] Pairtools version bump (+ improved tests) (#3247) * Pinning numpy to 1.23 when installing pairtools * Updated the MD5 checksums * Cannot use MD5 checksums, but can still check the content * Bumped the version to 1.0.2 * Updated the pairtools/restrict test * Switched the test data to nf-core/test-datasets * Switched to a proper file in the test-datasets repository * bugfix: there cannot be dots in names * Switching to "contains" as the MD5s are not reliable --- modules/nf-core/pairtools/dedup/main.nf | 8 +++++--- modules/nf-core/pairtools/flip/main.nf | 8 +++++--- modules/nf-core/pairtools/parse/main.nf | 8 +++++--- modules/nf-core/pairtools/restrict/main.nf | 8 +++++--- modules/nf-core/pairtools/select/main.nf | 8 +++++--- modules/nf-core/pairtools/sort/main.nf | 8 +++++--- tests/config/test_data.config | 8 ++++++++ tests/modules/nf-core/pairtools/dedup/main.nf | 2 +- tests/modules/nf-core/pairtools/dedup/test.yml | 4 ++-- tests/modules/nf-core/pairtools/flip/main.nf | 4 ++-- tests/modules/nf-core/pairtools/flip/test.yml | 4 +++- tests/modules/nf-core/pairtools/parse/main.nf | 4 ++-- tests/modules/nf-core/pairtools/parse/test.yml | 12 ++++++++++-- tests/modules/nf-core/pairtools/restrict/main.nf | 6 ++---- tests/modules/nf-core/pairtools/restrict/test.yml | 4 +++- tests/modules/nf-core/pairtools/select/main.nf | 2 +- tests/modules/nf-core/pairtools/select/test.yml | 8 ++++++-- tests/modules/nf-core/pairtools/sort/main.nf | 2 +- tests/modules/nf-core/pairtools/sort/test.yml | 4 +++- 19 files changed, 74 insertions(+), 38 deletions(-) diff --git a/modules/nf-core/pairtools/dedup/main.nf b/modules/nf-core/pairtools/dedup/main.nf index d28fbd178c1..1d036b3e914 100644 --- a/modules/nf-core/pairtools/dedup/main.nf +++ b/modules/nf-core/pairtools/dedup/main.nf @@ -2,10 +2,12 @@ process PAIRTOOLS_DEDUP { tag "$meta.id" label 'process_high' - conda "bioconda::pairtools=0.3.0" + // Pinning numpy to 1.23 until https://github.com/open2c/pairtools/issues/170 is resolved + // Not an issue with the biocontainers because they were built prior to numpy 1.24 + conda "bioconda::pairtools=1.0.2 conda-forge::numpy=1.23" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pairtools:0.3.0--py37hb9c2fc3_5' : - 'quay.io/biocontainers/pairtools:0.3.0--py37hb9c2fc3_5' }" + 'https://depot.galaxyproject.org/singularity/pairtools:1.0.2--py39h2a9f597_0' : + 'quay.io/biocontainers/pairtools:1.0.2--py39h2a9f597_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/pairtools/flip/main.nf b/modules/nf-core/pairtools/flip/main.nf index e79aa37347d..4b8b88c41e1 100644 --- a/modules/nf-core/pairtools/flip/main.nf +++ b/modules/nf-core/pairtools/flip/main.nf @@ -2,10 +2,12 @@ process PAIRTOOLS_FLIP { tag "$meta.id" label 'process_low' - conda "bioconda::pairtools=0.3.0" + // Pinning numpy to 1.23 until https://github.com/open2c/pairtools/issues/170 is resolved + // Not an issue with the biocontainers because they were built prior to numpy 1.24 + conda "bioconda::pairtools=1.0.2 conda-forge::numpy=1.23" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pairtools:0.3.0--py37hb9c2fc3_5' : - 'quay.io/biocontainers/pairtools:0.3.0--py37hb9c2fc3_5' }" + 'https://depot.galaxyproject.org/singularity/pairtools:1.0.2--py39h2a9f597_0' : + 'quay.io/biocontainers/pairtools:1.0.2--py39h2a9f597_0' }" input: tuple val(meta), path(sam) diff --git a/modules/nf-core/pairtools/parse/main.nf b/modules/nf-core/pairtools/parse/main.nf index 8b1deb97ea7..1d72cccc654 100644 --- a/modules/nf-core/pairtools/parse/main.nf +++ b/modules/nf-core/pairtools/parse/main.nf @@ -2,10 +2,12 @@ process PAIRTOOLS_PARSE { tag "$meta.id" label 'process_low' - conda "bioconda::pairtools=0.3.0" + // Pinning numpy to 1.23 until https://github.com/open2c/pairtools/issues/170 is resolved + // Not an issue with the biocontainers because they were built prior to numpy 1.24 + conda "bioconda::pairtools=1.0.2 conda-forge::numpy=1.23" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pairtools:0.3.0--py37hb9c2fc3_5' : - 'quay.io/biocontainers/pairtools:0.3.0--py37hb9c2fc3_5' }" + 'https://depot.galaxyproject.org/singularity/pairtools:1.0.2--py39h2a9f597_0' : + 'quay.io/biocontainers/pairtools:1.0.2--py39h2a9f597_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/pairtools/restrict/main.nf b/modules/nf-core/pairtools/restrict/main.nf index edfddbcb505..e3fe7515436 100644 --- a/modules/nf-core/pairtools/restrict/main.nf +++ b/modules/nf-core/pairtools/restrict/main.nf @@ -2,10 +2,12 @@ process PAIRTOOLS_RESTRICT { tag "$meta.id" label 'process_high' - conda "bioconda::pairtools=0.3.0" + // Pinning numpy to 1.23 until https://github.com/open2c/pairtools/issues/170 is resolved + // Not an issue with the biocontainers because they were built prior to numpy 1.24 + conda "bioconda::pairtools=1.0.2 conda-forge::numpy=1.23" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pairtools:0.3.0--py37hb9c2fc3_5' : - 'quay.io/biocontainers/pairtools:0.3.0--py37hb9c2fc3_5' }" + 'https://depot.galaxyproject.org/singularity/pairtools:1.0.2--py39h2a9f597_0' : + 'quay.io/biocontainers/pairtools:1.0.2--py39h2a9f597_0' }" input: tuple val(meta), path(pairs) diff --git a/modules/nf-core/pairtools/select/main.nf b/modules/nf-core/pairtools/select/main.nf index 5699720d052..7dafba2981b 100644 --- a/modules/nf-core/pairtools/select/main.nf +++ b/modules/nf-core/pairtools/select/main.nf @@ -2,10 +2,12 @@ process PAIRTOOLS_SELECT { tag "$meta.id" label 'process_medium' - conda "bioconda::pairtools=0.3.0" + // Pinning numpy to 1.23 until https://github.com/open2c/pairtools/issues/170 is resolved + // Not an issue with the biocontainers because they were built prior to numpy 1.24 + conda "bioconda::pairtools=1.0.2 conda-forge::numpy=1.23" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pairtools:0.3.0--py37hb9c2fc3_5' : - 'quay.io/biocontainers/pairtools:0.3.0--py37hb9c2fc3_5' }" + 'https://depot.galaxyproject.org/singularity/pairtools:1.0.2--py39h2a9f597_0' : + 'quay.io/biocontainers/pairtools:1.0.2--py39h2a9f597_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/pairtools/sort/main.nf b/modules/nf-core/pairtools/sort/main.nf index 9107aa8a31d..b777a9f3611 100644 --- a/modules/nf-core/pairtools/sort/main.nf +++ b/modules/nf-core/pairtools/sort/main.nf @@ -2,10 +2,12 @@ process PAIRTOOLS_SORT { tag "$meta.id" label 'process_high' - conda "bioconda::pairtools=0.3.0" + // Pinning numpy to 1.23 until https://github.com/open2c/pairtools/issues/170 is resolved + // Not an issue with the biocontainers because they were built prior to numpy 1.24 + conda "bioconda::pairtools=1.0.2 conda-forge::numpy=1.23" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pairtools:0.3.0--py37hb9c2fc3_5' : - 'quay.io/biocontainers/pairtools:0.3.0--py37hb9c2fc3_5' }" + 'https://depot.galaxyproject.org/singularity/pairtools:1.0.2--py39h2a9f597_0' : + 'quay.io/biocontainers/pairtools:1.0.2--py39h2a9f597_0' }" input: tuple val(meta), path(input) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 63870553f59..d27fbf8fe58 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -544,6 +544,14 @@ params { test_merge_cool_cp2 = "${params.test_data_base}/data/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cp2.cool" } + 'pairtools' { + mock_4dedup_pairsam = "${params.test_data_base}/data/genomics/homo_sapiens/pairtools/mock.4dedup.pairsam" + mock_4flip_pairs = "${params.test_data_base}/data/genomics/homo_sapiens/pairtools/mock.4flip.pairs" + mock_chrom_sizes = "${params.test_data_base}/data/genomics/homo_sapiens/pairtools/mock.chrom.sizes" + mock_pairsam = "${params.test_data_base}/data/genomics/homo_sapiens/pairtools/mock.pairsam" + mock_sam = "${params.test_data_base}/data/genomics/homo_sapiens/pairtools/mock.sam" + frag_bed = "${params.test_data_base}/data/genomics/homo_sapiens/pairtools/frag.bed" + } 'config' { ncbi_user_settings = "${params.test_data_base}/data/generic/config/ncbi_user_settings.mkfg" } diff --git a/tests/modules/nf-core/pairtools/dedup/main.nf b/tests/modules/nf-core/pairtools/dedup/main.nf index 6772b0bfe09..408dd02da09 100644 --- a/tests/modules/nf-core/pairtools/dedup/main.nf +++ b/tests/modules/nf-core/pairtools/dedup/main.nf @@ -7,7 +7,7 @@ include { PAIRTOOLS_DEDUP } from '../../../../../modules/nf-core/pairtools/dedup workflow test_pairtools_dedup { input = [ [ id:'test', single_end:false ], // meta map - file("https://raw.githubusercontent.com/open2c/pairtools/master/tests/data/mock.4dedup.pairsam", checkIfExists: true) ] + file(params.test_data['generic']['pairtools']['mock_4dedup_pairsam'], checkIfExists: true) ] PAIRTOOLS_DEDUP ( input ) } diff --git a/tests/modules/nf-core/pairtools/dedup/test.yml b/tests/modules/nf-core/pairtools/dedup/test.yml index 65de086fafa..722ec9f66d9 100644 --- a/tests/modules/nf-core/pairtools/dedup/test.yml +++ b/tests/modules/nf-core/pairtools/dedup/test.yml @@ -5,6 +5,6 @@ - pairtools files: - path: output/pairtools/test.dedup.pairs.gz - md5sum: 785ffc9495731fd3d0f6f679a0a0e988 + md5sum: 7ed7436793eccc77aeacb25fbe7816aa - path: output/pairtools/test.dedup.pairs.stat - md5sum: a554a846567cbcda66f070c76a9173bc + md5sum: 94682d1bc608ade150dd11993fbfd2a3 diff --git a/tests/modules/nf-core/pairtools/flip/main.nf b/tests/modules/nf-core/pairtools/flip/main.nf index d891f6ae752..e6c92d10877 100644 --- a/tests/modules/nf-core/pairtools/flip/main.nf +++ b/tests/modules/nf-core/pairtools/flip/main.nf @@ -7,8 +7,8 @@ include { PAIRTOOLS_FLIP } from '../../../../../modules/nf-core/pairtools/flip/m workflow test_pairtools_flip { input = [ [ id:'test', single_end:false ], // meta map - file("https://raw.githubusercontent.com/open2c/pairtools/master/tests/data/mock.4flip.pairs", checkIfExists: true) ] - sizes = file("https://raw.githubusercontent.com/open2c/pairtools/master/tests/data/mock.chrom.sizes", checkIfExists:true) + file(params.test_data['generic']['pairtools']['mock_4flip_pairs'], checkIfExists: true) ] + sizes = file(params.test_data['generic']['pairtools']['mock_chrom_sizes'], checkIfExists:true) PAIRTOOLS_FLIP ( input, sizes ) } diff --git a/tests/modules/nf-core/pairtools/flip/test.yml b/tests/modules/nf-core/pairtools/flip/test.yml index 39235c00786..fb7d36b3892 100644 --- a/tests/modules/nf-core/pairtools/flip/test.yml +++ b/tests/modules/nf-core/pairtools/flip/test.yml @@ -4,4 +4,6 @@ - pairtools/flip - pairtools files: - - path: output/pairtools/test.flip.gz + - path: output/pairtools/test.flip.gz # Not using MD5 checksum because the file includes the run paths, which are different under Conda + contains: + - "readid01\tchr1\t1\tchr1\t2\t+\t+\tUU" diff --git a/tests/modules/nf-core/pairtools/parse/main.nf b/tests/modules/nf-core/pairtools/parse/main.nf index 4b387e1c4e1..684b6c8d8cf 100644 --- a/tests/modules/nf-core/pairtools/parse/main.nf +++ b/tests/modules/nf-core/pairtools/parse/main.nf @@ -7,8 +7,8 @@ include { PAIRTOOLS_PARSE } from '../../../../../modules/nf-core/pairtools/parse workflow test_pairtools_parse { input = [ [ id:'test', single_end:false ], // meta map - file("https://raw.githubusercontent.com/open2c/pairtools/master/tests/data/mock.sam", checkIfExists: true) ] - sizes = file("https://raw.githubusercontent.com/open2c/pairtools/master/tests/data/mock.chrom.sizes", checkIfExists:true) + file(params.test_data['generic']['pairtools']['mock_sam'], checkIfExists: true) ] + sizes = file(params.test_data['generic']['pairtools']['mock_chrom_sizes'], checkIfExists:true) PAIRTOOLS_PARSE ( input, sizes ) } diff --git a/tests/modules/nf-core/pairtools/parse/test.yml b/tests/modules/nf-core/pairtools/parse/test.yml index 8bf033278c9..257929c0db0 100644 --- a/tests/modules/nf-core/pairtools/parse/test.yml +++ b/tests/modules/nf-core/pairtools/parse/test.yml @@ -4,6 +4,14 @@ - pairtools - pairtools/parse files: - - path: output/pairtools/test.raw.pairsam.gz + - path: output/pairtools/test.raw.pairsam.gz # Not using MD5 checksum because the file includes the run paths, which are different under Conda + contains: + - "readid01\tchr1\t10\tchr1\t200\t+\t+\tUU\treadid01" - path: output/pairtools/test.raw.pairsam.stat - md5sum: 11e90f346f855ffd750c7c348ac1d456 + contains: + - "total\t23" + - "total_unmapped\t10" + - "total_single_sided_mapped\t4" + - "total_mapped\t9" + - "total_dups\t0" + - "total_nodups\t9" diff --git a/tests/modules/nf-core/pairtools/restrict/main.nf b/tests/modules/nf-core/pairtools/restrict/main.nf index 62302473002..993daf9348f 100644 --- a/tests/modules/nf-core/pairtools/restrict/main.nf +++ b/tests/modules/nf-core/pairtools/restrict/main.nf @@ -7,10 +7,8 @@ include { PAIRTOOLS_RESTRICT } from '../../../../../modules/nf-core/pairtools/re workflow test_pairtools_restrict { input = [ [ id:'test', single_end:false ], // meta map - file("https://raw.githubusercontent.com/open2c/pairtools/master/tests/data/mock.4flip.pairs", checkIfExists: true) ] - File dig = new File("${workflow.workDir}/frag.bed") - dig.write("chr1\t0\t50\r\nchr1\t50\t100\r\nchr2\t0\t50\r\nchr2\t50\t100\r\n!\t0\t1\r\n") - frag = file(dig) + file(params.test_data['generic']['pairtools']['mock_4flip_pairs'], checkIfExists: true) ] + frag = file(params.test_data['generic']['pairtools']['frag_bed'], checkIfExists: true) PAIRTOOLS_RESTRICT ( input, frag ) } diff --git a/tests/modules/nf-core/pairtools/restrict/test.yml b/tests/modules/nf-core/pairtools/restrict/test.yml index 04f1b4bbba8..6bb0292545c 100644 --- a/tests/modules/nf-core/pairtools/restrict/test.yml +++ b/tests/modules/nf-core/pairtools/restrict/test.yml @@ -4,4 +4,6 @@ - pairtools/restrict - pairtools files: - - path: output/pairtools/test.restrict.pairs.gz + - path: output/pairtools/test.restrict.pairs.gz # Not using MD5 checksum because the file includes the run paths, which are different under Conda + contains: + - "readid01\tchr1\t1\tchr1\t2\t+\t+\tUU\t0\t0\t51\t0\t0\t51" diff --git a/tests/modules/nf-core/pairtools/select/main.nf b/tests/modules/nf-core/pairtools/select/main.nf index 2eddb21bee4..e432bad83a6 100644 --- a/tests/modules/nf-core/pairtools/select/main.nf +++ b/tests/modules/nf-core/pairtools/select/main.nf @@ -7,7 +7,7 @@ include { PAIRTOOLS_SELECT } from '../../../../../modules/nf-core/pairtools/sele workflow test_pairtools_select { input = [ [ id:'test', single_end:false ], // meta map - file("https://raw.githubusercontent.com/open2c/pairtools/master/tests/data/mock.pairsam", checkIfExists: true) ] + file(params.test_data['generic']['pairtools']['mock_pairsam'], checkIfExists: true) ] PAIRTOOLS_SELECT ( input ) } diff --git a/tests/modules/nf-core/pairtools/select/test.yml b/tests/modules/nf-core/pairtools/select/test.yml index 8532a7350df..374d6bb23f3 100644 --- a/tests/modules/nf-core/pairtools/select/test.yml +++ b/tests/modules/nf-core/pairtools/select/test.yml @@ -4,5 +4,9 @@ - pairtools/select - pairtools files: - - path: output/pairtools/test.selected.pairs.gz - - path: output/pairtools/test.unselected.pairs.gz + - path: output/pairtools/test.selected.pairs.gz # Not using MD5 checksum because the file includes the run paths, which are different under Conda + contains: + - "readid01\tchr1\t1\tchr2\t20\t+\t+\tUU\treadid01" + - path: output/pairtools/test.unselected.pairs.gz # Not using MD5 checksum because the file includes the run paths, which are different under Conda + contains: + - "readid06\t!\t0\tchr1\t3\t-\t+\tNU\treadid06" diff --git a/tests/modules/nf-core/pairtools/sort/main.nf b/tests/modules/nf-core/pairtools/sort/main.nf index 6ec22c67f91..82f61cf7f4d 100644 --- a/tests/modules/nf-core/pairtools/sort/main.nf +++ b/tests/modules/nf-core/pairtools/sort/main.nf @@ -7,7 +7,7 @@ include { PAIRTOOLS_SORT } from '../../../../../modules/nf-core/pairtools/sort/m workflow test_pairtools_sort { input = [ [ id:'test', single_end:false ], // meta map - file("https://raw.githubusercontent.com/open2c/pairtools/master/tests/data/mock.pairsam", checkIfExists: true) ] + file(params.test_data['generic']['pairtools']['mock_pairsam'], checkIfExists: true) ] PAIRTOOLS_SORT ( input ) } diff --git a/tests/modules/nf-core/pairtools/sort/test.yml b/tests/modules/nf-core/pairtools/sort/test.yml index 10ea983fe95..4d5f2d81003 100644 --- a/tests/modules/nf-core/pairtools/sort/test.yml +++ b/tests/modules/nf-core/pairtools/sort/test.yml @@ -4,4 +4,6 @@ - pairtools/sort - pairtools files: - - path: output/pairtools/test.sorted.pairs.gz + - path: output/pairtools/test.sorted.pairs.gz # Not using MD5 checksum because the file includes the run paths, which are different under Conda + contains: + - "readid08\t!\t0\t!\t0\t-\t-\tWW\treadid08" From 878e2b18042b5d238e3479315d4efe569126c832 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Mon, 24 Apr 2023 08:51:17 +0200 Subject: [PATCH 088/120] FIX: include tar in bcl2fastq and bclconvert (#3311) * include tar in bcl2fastq and bclconvert modules + remove untar from bcl_demultiplex subworkflow * update meta.yml * fix test output * handle folders that do not have the same name as the tar * exclude from conda * fully copy over the logic from the untar module * actually use false * args as main args, args2, args3 as ancilliary args --- .github/workflows/pytest-workflow.yml | 2 + modules/nf-core/bcl2fastq/main.nf | 50 +++++++++++++++---- modules/nf-core/bcl2fastq/meta.yml | 7 +-- modules/nf-core/bclconvert/main.nf | 50 +++++++++++++++---- modules/nf-core/bclconvert/meta.yml | 7 +-- subworkflows/nf-core/bcl_demultiplex/main.nf | 7 +-- tests/modules/nf-core/bcl2fastq/main.nf | 5 +- .../modules/nf-core/bcl2fastq/nextflow.config | 5 +- tests/modules/nf-core/bcl2fastq/test.yml | 14 +++--- tests/modules/nf-core/bclconvert/main.nf | 5 +- .../nf-core/bclconvert/nextflow.config | 5 +- tests/modules/nf-core/bclconvert/test.yml | 14 +++--- .../nf-core/bcl_demultiplex/main.nf | 1 - .../nf-core/bcl_demultiplex/nextflow.config | 4 +- .../nf-core/bcl_demultiplex/test.yml | 28 +++++------ 15 files changed, 128 insertions(+), 76 deletions(-) diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 3b0c4d0472d..8c7dca7c55b 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -116,6 +116,8 @@ jobs: tags: universc - profile: "singularity" tags: universc + - profile: "conda" + tags: subworkflows/bcl_demultiplex - profile: "conda" tags: subworkflows/vcf_annotate_ensemblvep diff --git a/modules/nf-core/bcl2fastq/main.nf b/modules/nf-core/bcl2fastq/main.nf index 1417925d36c..775c705353a 100644 --- a/modules/nf-core/bcl2fastq/main.nf +++ b/modules/nf-core/bcl2fastq/main.nf @@ -13,29 +13,59 @@ process BCL2FASTQ { tuple val(meta), path(samplesheet), path(run_dir) output: - tuple val(meta), path("**[!Undetermined]_S*_R?_00?.fastq.gz") ,emit: fastq - tuple val(meta), path("**[!Undetermined]_S*_I?_00?.fastq.gz") ,optional:true ,emit: fastq_idx - tuple val(meta), path("**Undetermined_S0*_R?_00?.fastq.gz") ,optional:true ,emit: undetermined - tuple val(meta), path("**Undetermined_S0*_I?_00?.fastq.gz") ,optional:true, emit: undetermined_idx - tuple val(meta), path("Reports") ,emit: reports - tuple val(meta), path("Stats") ,emit: stats - tuple val(meta), path("**/InterOp/*.bin") ,emit: interop - path("versions.yml") ,emit: versions + tuple val(meta), path("**[!Undetermined]_S*_R?_00?.fastq.gz"), emit: fastq + tuple val(meta), path("**[!Undetermined]_S*_I?_00?.fastq.gz"), optional:true, emit: fastq_idx + tuple val(meta), path("**Undetermined_S0*_R?_00?.fastq.gz") , optional:true, emit: undetermined + tuple val(meta), path("**Undetermined_S0*_I?_00?.fastq.gz") , optional:true, emit: undetermined_idx + tuple val(meta), path("Reports") , emit: reports + tuple val(meta), path("Stats") , emit: stats + tuple val(meta), path("InterOp/*.bin") , emit: interop + path("versions.yml") , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - + def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' + def input_tar = run_dir.toString().endsWith(".tar.gz") ? true : false + def input_dir = input_tar ? run_dir.toString() - '.tar.gz' : run_dir """ + if [ ! -d ${input_dir} ]; then + mkdir -p ${input_dir} + fi + + if ${input_tar}; then + ## Ensures --strip-components only applied when top level of tar contents is a directory + ## If just files or multiple directories, place all in $input_dir + + if [[ \$(tar -taf ${run_dir} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then + tar \\ + -C $input_dir --strip-components 1 \\ + -xavf \\ + $args2 \\ + $run_dir \\ + $args3 + else + tar \\ + -C $input_dir \\ + -xavf \\ + $args2 \\ + $run_dir \\ + $args3 + fi + fi + bcl2fastq \\ $args \\ --output-dir . \\ - --runfolder-dir ${run_dir} \\ + --runfolder-dir ${input_dir} \\ --sample-sheet ${samplesheet} \\ --processing-threads ${task.cpus} + cp -r ${input_dir}/InterOp . + cat <<-END_VERSIONS > versions.yml "${task.process}": bcl2fastq: \$(bcl2fastq -V 2>&1 | grep -m 1 bcl2fastq | sed 's/^.*bcl2fastq v//') diff --git a/modules/nf-core/bcl2fastq/meta.yml b/modules/nf-core/bcl2fastq/meta.yml index 6b5ea692dd3..22248d3b6da 100644 --- a/modules/nf-core/bcl2fastq/meta.yml +++ b/modules/nf-core/bcl2fastq/meta.yml @@ -22,9 +22,10 @@ input: description: "Input samplesheet" pattern: "*.{csv}" - run_dir: - type: directory - description: "Input run directory containing RunInfo.xml and BCL data" - + type: file + description: | + Input run directory containing RunInfo.xml and BCL data + Could be a directory or a tar of the directory output: - versions: type: file diff --git a/modules/nf-core/bclconvert/main.nf b/modules/nf-core/bclconvert/main.nf index 64fc3f058a5..82e86b34d6d 100644 --- a/modules/nf-core/bclconvert/main.nf +++ b/modules/nf-core/bclconvert/main.nf @@ -13,29 +13,59 @@ process BCLCONVERT { tuple val(meta), path(samplesheet), path(run_dir) output: - tuple val(meta), path("**[!Undetermined]_S*_R?_00?.fastq.gz") ,emit: fastq - tuple val(meta), path("**[!Undetermined]_S*_I?_00?.fastq.gz") ,optional:true, emit: fastq_idx - tuple val(meta), path("**Undetermined_S0*_R?_00?.fastq.gz") ,optional:true, emit: undetermined - tuple val(meta), path("**Undetermined_S0*_I?_00?.fastq.gz") ,optional:true, emit: undetermined_idx - tuple val(meta), path("Reports") ,emit: reports - tuple val(meta), path("Logs") ,emit: logs - tuple val(meta), path("**/InterOp/*.bin") ,optional:true, emit: interop - path("versions.yml") ,emit: versions + tuple val(meta), path("**[!Undetermined]_S*_R?_00?.fastq.gz"), emit: fastq + tuple val(meta), path("**[!Undetermined]_S*_I?_00?.fastq.gz"), optional:true, emit: fastq_idx + tuple val(meta), path("**Undetermined_S0*_R?_00?.fastq.gz") , optional:true, emit: undetermined + tuple val(meta), path("**Undetermined_S0*_I?_00?.fastq.gz") , optional:true, emit: undetermined_idx + tuple val(meta), path("Reports") , emit: reports + tuple val(meta), path("Logs") , emit: logs + tuple val(meta), path("InterOp/*.bin") , emit: interop + path("versions.yml") , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - + def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' + def input_tar = run_dir.toString().endsWith(".tar.gz") ? true : false + def input_dir = input_tar ? run_dir.toString() - '.tar.gz' : run_dir """ + if [ ! -d ${input_dir} ]; then + mkdir -p ${input_dir} + fi + + if ${input_tar}; then + ## Ensures --strip-components only applied when top level of tar contents is a directory + ## If just files or multiple directories, place all in $input_dir + + if [[ \$(tar -taf ${run_dir} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then + tar \\ + -C $input_dir --strip-components 1 \\ + -xavf \\ + $args2 \\ + $run_dir \\ + $args3 + else + tar \\ + -C $input_dir \\ + -xavf \\ + $args2 \\ + $run_dir \\ + $args3 + fi + fi + bcl-convert \\ $args \\ --output-directory . \\ - --bcl-input-directory ${run_dir} \\ + --bcl-input-directory ${input_dir} \\ --sample-sheet ${samplesheet} \\ --bcl-num-parallel-tiles ${task.cpus} + cp -r ${input_dir}/InterOp . + cat <<-END_VERSIONS > versions.yml "${task.process}": bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') diff --git a/modules/nf-core/bclconvert/meta.yml b/modules/nf-core/bclconvert/meta.yml index 241dc0b41da..c7f9bbd3a3d 100644 --- a/modules/nf-core/bclconvert/meta.yml +++ b/modules/nf-core/bclconvert/meta.yml @@ -22,9 +22,10 @@ input: description: "Input samplesheet" pattern: "*.{csv}" - run_dir: - type: directory - description: "Input run directory containing RunInfo.xml and BCL data" - + type: file + description: | + Input run directory containing RunInfo.xml and BCL data + Could be a directory or a tar of the directory output: - versions: type: file diff --git a/subworkflows/nf-core/bcl_demultiplex/main.nf b/subworkflows/nf-core/bcl_demultiplex/main.nf index ead9aba1d9c..e5f3d131f83 100644 --- a/subworkflows/nf-core/bcl_demultiplex/main.nf +++ b/subworkflows/nf-core/bcl_demultiplex/main.nf @@ -6,7 +6,6 @@ include { BCLCONVERT } from "../../../modules/nf-core/bclconvert/main" include { BCL2FASTQ } from "../../../modules/nf-core/bcl2fastq/main" -include { UNTAR } from "../../../modules/nf-core/untar/main" workflow BCL_DEMULTIPLEX { take: @@ -34,16 +33,13 @@ workflow BCL_DEMULTIPLEX { run_dirs: [ meta, run ] }.set { ch_flowcells_tar } - // MODULE: untar // Runs when run_dir is a tar archive // Re-join the metadata and the untarred run directory with the samplesheet - ch_flowcells_tar_merged = ch_flowcells_tar.samplesheets.join( UNTAR ( ch_flowcells_tar.run_dirs ).untar ) - ch_versions = ch_versions.mix(UNTAR.out.versions) + ch_flowcells_tar_merged = ch_flowcells_tar.samplesheets.join( ch_flowcells_tar.run_dirs ) // Merge the two channels back together ch_flowcells = ch_flowcells.dir.mix(ch_flowcells_tar_merged) - // MODULE: bclconvert // Demultiplex the bcl files if (demultiplexer == "bclconvert") { @@ -54,7 +50,6 @@ workflow BCL_DEMULTIPLEX { ch_versions = ch_versions.mix(BCLCONVERT.out.versions) } - // MODULE: bcl2fastq // Demultiplex the bcl files if (demultiplexer == "bcl2fastq") { diff --git a/tests/modules/nf-core/bcl2fastq/main.nf b/tests/modules/nf-core/bcl2fastq/main.nf index 9718f573257..e547f589d48 100644 --- a/tests/modules/nf-core/bcl2fastq/main.nf +++ b/tests/modules/nf-core/bcl2fastq/main.nf @@ -3,7 +3,6 @@ nextflow.enable.dsl = 2 include { BCL2FASTQ } from '../../../../modules/nf-core/bcl2fastq/main.nf' -include { UNTAR } from '../../../../modules/nf-core/untar/main.nf' workflow test_bcl2fastq { ch_flowcell = Channel.value([ @@ -17,7 +16,7 @@ workflow test_bcl2fastq { tar: [meta, run] }.set{ ch_fc_split } - ch_flowcell_untar = ch_fc_split.samplesheet.join( UNTAR ( ch_fc_split.tar ).untar ) + ch_flowcell_merge = ch_fc_split.samplesheet.join( ch_fc_split.tar ) - BCL2FASTQ (ch_flowcell_untar) + BCL2FASTQ (ch_flowcell_merge) } diff --git a/tests/modules/nf-core/bcl2fastq/nextflow.config b/tests/modules/nf-core/bcl2fastq/nextflow.config index cca10528894..f0e32430f10 100644 --- a/tests/modules/nf-core/bcl2fastq/nextflow.config +++ b/tests/modules/nf-core/bcl2fastq/nextflow.config @@ -1,12 +1,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: BCL2FASTQ { ext.args = {[ "--tiles s_1_1101" ].join(" ").trim()} } - withName: UNTAR { - publishDir = [ enabled: false ] - } + } diff --git a/tests/modules/nf-core/bcl2fastq/test.yml b/tests/modules/nf-core/bcl2fastq/test.yml index 6a4ae1035da..1b3b364a26d 100644 --- a/tests/modules/nf-core/bcl2fastq/test.yml +++ b/tests/modules/nf-core/bcl2fastq/test.yml @@ -39,18 +39,18 @@ md5sum: 0c6f2d87ee183b84d1051cde9a5643d1 - path: output/bcl2fastq/Stats/Stats.json md5sum: 8e5f038b8aa9e465599d3575f930e604 - - path: output/bcl2fastq/test/InterOp/ControlMetricsOut.bin + - path: output/bcl2fastq/InterOp/ControlMetricsOut.bin md5sum: 6d77b38d0793a6e1ce1e85706e488953 - - path: output/bcl2fastq/test/InterOp/CorrectedIntMetricsOut.bin + - path: output/bcl2fastq/InterOp/CorrectedIntMetricsOut.bin md5sum: 2bbf84d3be72734addaa2fe794711434 - - path: output/bcl2fastq/test/InterOp/ErrorMetricsOut.bin + - path: output/bcl2fastq/InterOp/ErrorMetricsOut.bin md5sum: 38c88def138e9bb832539911affdb286 - - path: output/bcl2fastq/test/InterOp/ExtractionMetricsOut.bin + - path: output/bcl2fastq/InterOp/ExtractionMetricsOut.bin md5sum: 7497c3178837eea8f09350b5cd252e99 - - path: output/bcl2fastq/test/InterOp/IndexMetricsOut.bin + - path: output/bcl2fastq/InterOp/IndexMetricsOut.bin md5sum: 9e688c58a5487b8eaf69c9e1005ad0bf - - path: output/bcl2fastq/test/InterOp/QMetricsOut.bin + - path: output/bcl2fastq/InterOp/QMetricsOut.bin md5sum: 7e9f198d53ebdfbb699a5f94cf1ed51c - - path: output/bcl2fastq/test/InterOp/TileMetricsOut.bin + - path: output/bcl2fastq/InterOp/TileMetricsOut.bin md5sum: 83891751ec1c91a425a524b476b6ca3c - path: output/bcl2fastq/versions.yml diff --git a/tests/modules/nf-core/bclconvert/main.nf b/tests/modules/nf-core/bclconvert/main.nf index 74640d5a4d6..5e0f4951922 100644 --- a/tests/modules/nf-core/bclconvert/main.nf +++ b/tests/modules/nf-core/bclconvert/main.nf @@ -3,7 +3,6 @@ nextflow.enable.dsl = 2 include { BCLCONVERT } from '../../../../modules/nf-core/bclconvert/main.nf' -include { UNTAR } from '../../../../modules/nf-core/untar/main.nf' workflow test_bclconvert { ch_flowcell = Channel.value([ @@ -17,7 +16,7 @@ workflow test_bclconvert { tar: [meta, run] }.set{ ch_fc_split } - ch_flowcell_untar = ch_fc_split.samplesheet.join( UNTAR ( ch_fc_split.tar ).untar ) + ch_flowcell_merge = ch_fc_split.samplesheet.join( ch_fc_split.tar ) - BCLCONVERT (ch_flowcell_untar) + BCLCONVERT (ch_flowcell_merge) } diff --git a/tests/modules/nf-core/bclconvert/nextflow.config b/tests/modules/nf-core/bclconvert/nextflow.config index ae8c9c78e79..b3fcbe3fa02 100644 --- a/tests/modules/nf-core/bclconvert/nextflow.config +++ b/tests/modules/nf-core/bclconvert/nextflow.config @@ -1,6 +1,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: BCLCONVERT { ext.args = {[ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", @@ -8,7 +9,5 @@ process { "--first-tile-only true" ].join(" ").trim()} } - withName: UNTAR { - publishDir = [ enabled: false ] - } + } diff --git a/tests/modules/nf-core/bclconvert/test.yml b/tests/modules/nf-core/bclconvert/test.yml index 21e0b54a598..4ff28dcb859 100644 --- a/tests/modules/nf-core/bclconvert/test.yml +++ b/tests/modules/nf-core/bclconvert/test.yml @@ -35,17 +35,17 @@ md5sum: 0a0341e2990b4fa1d9ad4b4c603144c1 - path: output/bclconvert/Undetermined_S0_L001_R1_001.fastq.gz md5sum: febef808ae5397ea4ee7ee40e5fd39e0 - - path: output/bclconvert/test/InterOp/ControlMetricsOut.bin + - path: output/bclconvert/InterOp/ControlMetricsOut.bin md5sum: 6d77b38d0793a6e1ce1e85706e488953 - - path: output/bclconvert/test/InterOp/CorrectedIntMetricsOut.bin + - path: output/bclconvert/InterOp/CorrectedIntMetricsOut.bin md5sum: 2bbf84d3be72734addaa2fe794711434 - - path: output/bclconvert/test/InterOp/ErrorMetricsOut.bin + - path: output/bclconvert/InterOp/ErrorMetricsOut.bin md5sum: 38c88def138e9bb832539911affdb286 - - path: output/bclconvert/test/InterOp/ExtractionMetricsOut.bin + - path: output/bclconvert/InterOp/ExtractionMetricsOut.bin md5sum: 7497c3178837eea8f09350b5cd252e99 - - path: output/bclconvert/test/InterOp/IndexMetricsOut.bin - - path: output/bclconvert/test/InterOp/QMetricsOut.bin + - path: output/bclconvert/InterOp/IndexMetricsOut.bin + - path: output/bclconvert/InterOp/QMetricsOut.bin md5sum: 7e9f198d53ebdfbb699a5f94cf1ed51c - - path: output/bclconvert/test/InterOp/TileMetricsOut.bin + - path: output/bclconvert/InterOp/TileMetricsOut.bin md5sum: 83891751ec1c91a425a524b476b6ca3c - path: output/bclconvert/versions.yml diff --git a/tests/subworkflows/nf-core/bcl_demultiplex/main.nf b/tests/subworkflows/nf-core/bcl_demultiplex/main.nf index ee0f5ef5cd4..92a7850ade0 100644 --- a/tests/subworkflows/nf-core/bcl_demultiplex/main.nf +++ b/tests/subworkflows/nf-core/bcl_demultiplex/main.nf @@ -3,7 +3,6 @@ nextflow.enable.dsl = 2 include { BCL_DEMULTIPLEX } from '../../../../subworkflows/nf-core/bcl_demultiplex/main.nf' -include { UNTAR } from '../../../../modules/nf-core/untar/main.nf' workflow test_bcl_demultiplex_bclconvert { diff --git a/tests/subworkflows/nf-core/bcl_demultiplex/nextflow.config b/tests/subworkflows/nf-core/bcl_demultiplex/nextflow.config index 5ad93c2092c..9dcb0159db6 100644 --- a/tests/subworkflows/nf-core/bcl_demultiplex/nextflow.config +++ b/tests/subworkflows/nf-core/bcl_demultiplex/nextflow.config @@ -15,7 +15,5 @@ process { "--tiles s_1_1101" ].join(" ").trim()} } - withName: UNTAR { - publishDir = [ enabled: false ] - } + } diff --git a/tests/subworkflows/nf-core/bcl_demultiplex/test.yml b/tests/subworkflows/nf-core/bcl_demultiplex/test.yml index ffed1dc3746..02b15d6f735 100644 --- a/tests/subworkflows/nf-core/bcl_demultiplex/test.yml +++ b/tests/subworkflows/nf-core/bcl_demultiplex/test.yml @@ -37,18 +37,18 @@ md5sum: 0a0341e2990b4fa1d9ad4b4c603144c1 - path: output/bclconvert/Undetermined_S0_L001_R1_001.fastq.gz md5sum: febef808ae5397ea4ee7ee40e5fd39e0 - - path: output/bclconvert/test/InterOp/ControlMetricsOut.bin + - path: output/bclconvert/InterOp/ControlMetricsOut.bin md5sum: 6d77b38d0793a6e1ce1e85706e488953 - - path: output/bclconvert/test/InterOp/CorrectedIntMetricsOut.bin + - path: output/bclconvert/InterOp/CorrectedIntMetricsOut.bin md5sum: 2bbf84d3be72734addaa2fe794711434 - - path: output/bclconvert/test/InterOp/ErrorMetricsOut.bin + - path: output/bclconvert/InterOp/ErrorMetricsOut.bin md5sum: 38c88def138e9bb832539911affdb286 - - path: output/bclconvert/test/InterOp/ExtractionMetricsOut.bin + - path: output/bclconvert/InterOp/ExtractionMetricsOut.bin md5sum: 7497c3178837eea8f09350b5cd252e99 - - path: output/bclconvert/test/InterOp/IndexMetricsOut.bin - - path: output/bclconvert/test/InterOp/QMetricsOut.bin + - path: output/bclconvert/InterOp/IndexMetricsOut.bin + - path: output/bclconvert/InterOp/QMetricsOut.bin md5sum: 7e9f198d53ebdfbb699a5f94cf1ed51c - - path: output/bclconvert/test/InterOp/TileMetricsOut.bin + - path: output/bclconvert/InterOp/TileMetricsOut.bin md5sum: 83891751ec1c91a425a524b476b6ca3c - name: bcl_demultiplex test_bcl_demultiplex_bcl2fastq @@ -72,17 +72,17 @@ md5sum: 0c6f2d87ee183b84d1051cde9a5643d1 - path: output/bcl2fastq/Stats/Stats.json md5sum: 8e5f038b8aa9e465599d3575f930e604 - - path: output/bcl2fastq/test/InterOp/ControlMetricsOut.bin + - path: output/bcl2fastq/InterOp/ControlMetricsOut.bin md5sum: 6d77b38d0793a6e1ce1e85706e488953 - - path: output/bcl2fastq/test/InterOp/CorrectedIntMetricsOut.bin + - path: output/bcl2fastq/InterOp/CorrectedIntMetricsOut.bin md5sum: 2bbf84d3be72734addaa2fe794711434 - - path: output/bcl2fastq/test/InterOp/ErrorMetricsOut.bin + - path: output/bcl2fastq/InterOp/ErrorMetricsOut.bin md5sum: 38c88def138e9bb832539911affdb286 - - path: output/bcl2fastq/test/InterOp/ExtractionMetricsOut.bin + - path: output/bcl2fastq/InterOp/ExtractionMetricsOut.bin md5sum: 7497c3178837eea8f09350b5cd252e99 - - path: output/bcl2fastq/test/InterOp/IndexMetricsOut.bin + - path: output/bcl2fastq/InterOp/IndexMetricsOut.bin md5sum: 9e688c58a5487b8eaf69c9e1005ad0bf - - path: output/bcl2fastq/test/InterOp/QMetricsOut.bin + - path: output/bcl2fastq/InterOp/QMetricsOut.bin md5sum: 7e9f198d53ebdfbb699a5f94cf1ed51c - - path: output/bcl2fastq/test/InterOp/TileMetricsOut.bin + - path: output/bcl2fastq/InterOp/TileMetricsOut.bin md5sum: 83891751ec1c91a425a524b476b6ca3c From ca2bf9212707e83717934ec6c5d4cab42b39ca69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20H=C3=B6rtenhuber?= Date: Mon, 24 Apr 2023 11:29:30 +0200 Subject: [PATCH 089/120] Fix subworkflows based on json schema (#3306) * add json schema for meta yamls in subworkflows * fix pre-commit config * fix schema definitions * fix enums * add default and enums to schemas * more fixes according to the schema * fix modules schema --- .pre-commit-config.yaml | 8 +- modules/nf-core/fqtk/meta.yml | 8 +- modules/nf-core/vsearch/sort/meta.yml | 2 +- yaml-schema.json => modules/yaml-schema.json | 17 +++ .../nf-core/bam_create_som_pon_gatk/meta.yml | 2 + .../meta.yml | 1 + .../bam_docounts_contamination_angsd/meta.yml | 4 +- .../bam_markduplicates_picard/meta.yml | 1 + .../nf-core/bam_ngscheckmate/meta.yml | 3 + subworkflows/nf-core/bam_qc_picard/meta.yml | 1 + subworkflows/nf-core/bam_rseqc/meta.yml | 12 +- .../nf-core/bam_sort_stats_samtools/meta.yml | 1 + .../nf-core/bam_split_by_region/meta.yml | 1 + .../nf-core/bam_stats_samtools/meta.yml | 1 + .../meta.yml | 1 + .../meta.yml | 1 + .../bam_variant_demix_boot_freyja/meta.yml | 1 + subworkflows/nf-core/bcl_demultiplex/meta.yml | 1 + .../nf-core/bed_scatter_bedtools/meta.yml | 1 + .../meta.yml | 9 +- .../nf-core/fasta_binning_concoct/meta.yml | 1 + subworkflows/nf-core/fasta_index_dna/meta.yml | 1 + .../nf-core/fasta_newick_epang_gappa/meta.yml | 25 ++-- .../nf-core/fastq_align_bowtie2/meta.yml | 4 +- subworkflows/nf-core/fastq_align_bwa/meta.yml | 1 + .../nf-core/fastq_align_bwaaln/meta.yml | 1 + .../nf-core/fastq_align_chromap/meta.yml | 1 + subworkflows/nf-core/fastq_align_dna/meta.yml | 1 + .../nf-core/fastq_align_hisat2/meta.yml | 1 + .../nf-core/fastq_align_star/meta.yml | 1 + .../fastq_contam_seqtk_kraken/meta.yml | 1 + .../fastq_create_umi_consensus_fgbio/meta.yml | 13 +- .../meta.yml | 1 + .../fastq_fastqc_umitools_fastp/meta.yml | 30 ++--- .../fastq_fastqc_umitools_trimgalore/meta.yml | 13 +- .../fastq_subsample_fq_salmon/meta.yml | 1 + .../nf-core/fastq_trim_fastp_fastqc/meta.yml | 103 ++++++++-------- .../meta.yml | 1 + .../nf-core/vcf_annotate_ensemblvep/meta.yml | 1 + .../nf-core/vcf_annotate_snpeff/meta.yml | 1 + .../vcf_extract_relate_somalier/meta.yml | 1 + .../nf-core/vcf_gather_bcftools/meta.yml | 1 + .../nf-core/vcf_impute_glimpse/meta.yml | 1 + .../nf-core/vcf_phase_shapeit5/meta.yml | 1 + subworkflows/yaml-schema.json | 113 ++++++++++++++++++ 45 files changed, 287 insertions(+), 108 deletions(-) rename yaml-schema.json => modules/yaml-schema.json (87%) create mode 100644 subworkflows/yaml-schema.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bf9d67755da..b72372f9a75 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,9 +4,13 @@ repos: hooks: - id: prettier - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.21.0 + rev: 0.22.0 hooks: - id: check-jsonschema # match meta.ymls in one of the subdirectories of modules/nf-core files: ^modules/nf-core/.*/meta\.yml$ - args: ["--schemafile", "yaml-schema.json"] + args: ["--schemafile", "modules/yaml-schema.json"] + - id: check-jsonschema + # match meta.ymls in one of the subdirectories of subworkflows/nf-core + files: ^subworkflows/nf-core/.*/meta\.yml$ + args: ["--schemafile", "subworkflows/yaml-schema.json"] diff --git a/modules/nf-core/fqtk/meta.yml b/modules/nf-core/fqtk/meta.yml index d25c23acaf8..7ebc0c150cc 100644 --- a/modules/nf-core/fqtk/meta.yml +++ b/modules/nf-core/fqtk/meta.yml @@ -45,10 +45,10 @@ output: Demultiplexing summary stats; sample_id, barcode templates, frac_templates, ratio_to_mean, ratio_to_best pattern: "output/demux-metrics.txt" - most_frequent_unmatched: - type: file - description: | - File containing unmatched fastq records - pattern: "output/unmatched*.fq.gz" + type: file + description: | + File containing unmatched fastq records + pattern: "output/unmatched*.fq.gz" authors: - "Samantha White @sam-white04" diff --git a/modules/nf-core/vsearch/sort/meta.yml b/modules/nf-core/vsearch/sort/meta.yml index a527b7f13d8..8e75c186724 100644 --- a/modules/nf-core/vsearch/sort/meta.yml +++ b/modules/nf-core/vsearch/sort/meta.yml @@ -28,7 +28,7 @@ input: - sort_arg: type: string description: Argument to provide to sort algorithm. Sort by abundance with --sortbysize or by sequence length with --sortbylength. - enums: ["--sortbysize", "--sortbylength"] + enum: ["--sortbysize", "--sortbylength"] output: - meta: diff --git a/yaml-schema.json b/modules/yaml-schema.json similarity index 87% rename from yaml-schema.json rename to modules/yaml-schema.json index 350ad1bcb4f..5cd6396f675 100644 --- a/yaml-schema.json +++ b/modules/yaml-schema.json @@ -53,6 +53,14 @@ "default": { "type": ["string", "number", "boolean", "array", "object"], "description": "Default value for the input channel" + }, + "enum": { + "type": "array", + "description": "List of allowed values for the input channel", + "items": { + "type": ["string", "number", "boolean", "array", "object"] + }, + "uniqueItems": true } }, "required": ["type", "description"] @@ -60,6 +68,7 @@ } } }, + "output": { "type": "array", "description": "Output channels for the module", @@ -81,6 +90,14 @@ "pattern": { "type": "string", "description": "Pattern of the input channel, given in Java glob syntax" + }, + "enum": { + "type": "array", + "description": "List of allowed values for the output channel", + "items": { + "type": ["string", "number", "boolean", "array", "object"] + }, + "uniqueItems": true } }, "required": ["type", "description"] diff --git a/subworkflows/nf-core/bam_create_som_pon_gatk/meta.yml b/subworkflows/nf-core/bam_create_som_pon_gatk/meta.yml index dff85222668..aa50f2abe53 100644 --- a/subworkflows/nf-core/bam_create_som_pon_gatk/meta.yml +++ b/subworkflows/nf-core/bam_create_som_pon_gatk/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: bam_create_som_pon_gatk description: Perform variant calling on a set of normal samples using mutect2 panel of normals mode. Group them into a genomicsdbworkspace using genomicsdbimport, then use this to create a panel of normals using createsomaticpanelofnormals. keywords: @@ -14,6 +15,7 @@ modules: - gatk4/createsomaticpanelofnormals input: - ch_mutect2_in: + type: list description: | An input channel containing the following files: - input: One or more BAM/CRAM files diff --git a/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/meta.yml b/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/meta.yml index c5ecdb01ade..467ade2a18c 100644 --- a/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/meta.yml +++ b/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "bam_dedup_stats_samtools_umitools" description: UMI-tools dedup, index BAM file and run samtools stats, flagstat and idxstats keywords: diff --git a/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml b/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml index 844537c6d2d..7d49ead95fb 100644 --- a/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml +++ b/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "bam_docounts_contamination_angsd" description: Calculate contamination of the X-chromosome with ANGSD keywords: @@ -22,7 +23,8 @@ input: description: BAM/SAM samtools index pattern: "*.{bai,csi}" - hapmap_file: - type: + type: file + description: Hapmap file output: - meta: type: map diff --git a/subworkflows/nf-core/bam_markduplicates_picard/meta.yml b/subworkflows/nf-core/bam_markduplicates_picard/meta.yml index 822c61328ca..a324359e679 100644 --- a/subworkflows/nf-core/bam_markduplicates_picard/meta.yml +++ b/subworkflows/nf-core/bam_markduplicates_picard/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "bam_markduplicates_picard" description: Picard MarkDuplicates, index BAM file and run samtools stats, flagstat and idxstats keywords: diff --git a/subworkflows/nf-core/bam_ngscheckmate/meta.yml b/subworkflows/nf-core/bam_ngscheckmate/meta.yml index 9faaace9aab..4f1081fb200 100644 --- a/subworkflows/nf-core/bam_ngscheckmate/meta.yml +++ b/subworkflows/nf-core/bam_ngscheckmate/meta.yml @@ -1,8 +1,11 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "bam_ngscheckmate" description: Take a set of bam files and run NGSCheckMate to determine whether samples match with each other, using a set of SNPs. keywords: - ngscheckmate - qc + - bam + - snp modules: - bcftools/mpileup - ngscheckmate/ncm diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml index 1bb481d98d9..90d1c68f788 100644 --- a/subworkflows/nf-core/bam_qc_picard/meta.yml +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: bam_qc description: Produces comprehensive statistics from BAM file keywords: diff --git a/subworkflows/nf-core/bam_rseqc/meta.yml b/subworkflows/nf-core/bam_rseqc/meta.yml index cc074c21f5f..2bc970aed64 100644 --- a/subworkflows/nf-core/bam_rseqc/meta.yml +++ b/subworkflows/nf-core/bam_rseqc/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: bam_rseqc description: Subworkflow to run multiple commands in the RSeqC package keywords: @@ -11,15 +12,8 @@ keywords: - readdistribution - readduplication - tin -tools: - - rseqc: - description: | - RSeQC package provides a number of useful modules that can comprehensively evaluate - high throughput sequence data especially RNA-seq data. - homepage: http://rseqc.sourceforge.net/ - documentation: http://rseqc.sourceforge.net/ - doi: 10.1093/bioinformatics/bts356 - licence: ["GPL-3.0-or-later"] +modules: + - rseqc input: - meta: type: map diff --git a/subworkflows/nf-core/bam_sort_stats_samtools/meta.yml b/subworkflows/nf-core/bam_sort_stats_samtools/meta.yml index 131065be189..675378d15ba 100644 --- a/subworkflows/nf-core/bam_sort_stats_samtools/meta.yml +++ b/subworkflows/nf-core/bam_sort_stats_samtools/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: bam_sort_stats_samtools description: Sort SAM/BAM/CRAM file keywords: diff --git a/subworkflows/nf-core/bam_split_by_region/meta.yml b/subworkflows/nf-core/bam_split_by_region/meta.yml index aeb945f493a..f0d5a7e29a9 100644 --- a/subworkflows/nf-core/bam_split_by_region/meta.yml +++ b/subworkflows/nf-core/bam_split_by_region/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "bam_split_by_region" description: Split the reads in the input bam by specified genomic region. keywords: diff --git a/subworkflows/nf-core/bam_stats_samtools/meta.yml b/subworkflows/nf-core/bam_stats_samtools/meta.yml index b6072686ecd..a97d9f37c6b 100644 --- a/subworkflows/nf-core/bam_stats_samtools/meta.yml +++ b/subworkflows/nf-core/bam_stats_samtools/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: bam_stats_samtools description: Produces comprehensive statistics from SAM/BAM/CRAM file keywords: diff --git a/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/meta.yml b/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/meta.yml index 6ba958b9fe8..2164c0fe7d5 100644 --- a/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/meta.yml +++ b/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: bam_tumor_normal_somatic_variant_calling_gatk description: | Perform variant calling on a paired tumor normal set of samples using mutect2 tumor normal mode. diff --git a/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/meta.yml b/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/meta.yml index 2a07a208ab7..3c8de85fc6e 100644 --- a/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/meta.yml +++ b/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "bam_variant_calling_sort_freebayes_bcftools" description: Call variants using freebayes, then sort and index keywords: diff --git a/subworkflows/nf-core/bam_variant_demix_boot_freyja/meta.yml b/subworkflows/nf-core/bam_variant_demix_boot_freyja/meta.yml index 2515b4fbbca..53ba6ce5a34 100644 --- a/subworkflows/nf-core/bam_variant_demix_boot_freyja/meta.yml +++ b/subworkflows/nf-core/bam_variant_demix_boot_freyja/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "bam_variant_demix_boot_freyja" description: Recover relative lineage abundances from mixed SARS-CoV-2 samples from a sequencing dataset (BAM aligned to the Hu-1 reference) keywords: diff --git a/subworkflows/nf-core/bcl_demultiplex/meta.yml b/subworkflows/nf-core/bcl_demultiplex/meta.yml index dbd129da841..b358f2867ab 100644 --- a/subworkflows/nf-core/bcl_demultiplex/meta.yml +++ b/subworkflows/nf-core/bcl_demultiplex/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "bcl_demultiplex" description: Demultiplex Illumina BCL data using bcl-convert or bcl2fastq keywords: diff --git a/subworkflows/nf-core/bed_scatter_bedtools/meta.yml b/subworkflows/nf-core/bed_scatter_bedtools/meta.yml index 6ad6ad91f1f..c3e8c26de51 100644 --- a/subworkflows/nf-core/bed_scatter_bedtools/meta.yml +++ b/subworkflows/nf-core/bed_scatter_bedtools/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "bed_scatter_bedtools" description: | Scatters inputted BED files by the amount specified. diff --git a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/meta.yml b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/meta.yml index 3fb7674863e..b33fdf35c15 100644 --- a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/meta.yml +++ b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/meta.yml @@ -1,19 +1,22 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "bedgraph_bedclip_bedgraphtobigwig" -description: Convert gedgraph to bigwig with clip +description: Convert bedgraph to bigwig with clip keywords: - bedgraph - bigwig + - clip + - conversion modules: - ucsc/bedclip - ucsc/bedgraphtobigwig input: - bedgraph: type: file - description: bedGraph file whoch should be converted + description: bedGraph file which should be converted pattern: "*.bedGraph" - sizes: type: file - description: File with chromosom sizes + description: File with chromosome sizes pattern: "*.sizes" output: - bigwig: diff --git a/subworkflows/nf-core/fasta_binning_concoct/meta.yml b/subworkflows/nf-core/fasta_binning_concoct/meta.yml index 5450dc492f4..6b7416e1d1b 100644 --- a/subworkflows/nf-core/fasta_binning_concoct/meta.yml +++ b/subworkflows/nf-core/fasta_binning_concoct/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fasta_binning_concoct" description: Runs the CONCOCT workflow of contig binning keywords: diff --git a/subworkflows/nf-core/fasta_index_dna/meta.yml b/subworkflows/nf-core/fasta_index_dna/meta.yml index 9e6917ee6c1..9a2aed74bd0 100644 --- a/subworkflows/nf-core/fasta_index_dna/meta.yml +++ b/subworkflows/nf-core/fasta_index_dna/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fasta_index_dna" description: | Generate aligner index for a reference genome. diff --git a/subworkflows/nf-core/fasta_newick_epang_gappa/meta.yml b/subworkflows/nf-core/fasta_newick_epang_gappa/meta.yml index a6dbe999349..49e91ed7c02 100644 --- a/subworkflows/nf-core/fasta_newick_epang_gappa/meta.yml +++ b/subworkflows/nf-core/fasta_newick_epang_gappa/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fasta_newick_epang_gappa" description: Run phylogenetic placement with a number of query sequences plus a reference alignment and phylogeny. Used in nf-core/phyloplace. keywords: @@ -19,19 +20,19 @@ modules: - gappa/examineheattree input: - ch_pp_data: - type: map - description: | - Structure: [ - meta: val(meta), - data: [ - alignmethod: 'hmmer', - queryseqfile: path("*.faa"), - refseqfile: path("*.alnfaa"), - refphylogeny: path("*.newick"), - model: "LG", - taxonomy: path("*.tsv") + type: map + description: | + Structure: [ + meta: val(meta), + data: [ + alignmethod: 'hmmer', + queryseqfile: path("*.faa"), + refseqfile: path("*.alnfaa"), + refphylogeny: path("*.newick"), + model: "LG", + taxonomy: path("*.tsv") + ] ] - ] - meta: type: map description: | diff --git a/subworkflows/nf-core/fastq_align_bowtie2/meta.yml b/subworkflows/nf-core/fastq_align_bowtie2/meta.yml index ad378077601..a8cd49e6f11 100644 --- a/subworkflows/nf-core/fastq_align_bowtie2/meta.yml +++ b/subworkflows/nf-core/fastq_align_bowtie2/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: fastq_align_bowtie2 description: Align reads to a reference genome using bowtie2 then sort with samtools keywords: @@ -33,9 +34,10 @@ input: Save reads that do not map to the reference (true) or discard them (false) (default: false) - sort_bam: + type: boolean description: | Save reads that do not map to the reference (true) or discard them (false) - (default: false) + default: false - ch_fasta: type: file description: Reference fasta file diff --git a/subworkflows/nf-core/fastq_align_bwa/meta.yml b/subworkflows/nf-core/fastq_align_bwa/meta.yml index 03f84860a30..39d367b2485 100644 --- a/subworkflows/nf-core/fastq_align_bwa/meta.yml +++ b/subworkflows/nf-core/fastq_align_bwa/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: fastq_align_bwa description: Align reads to a reference genome using bwa then sort with samtools keywords: diff --git a/subworkflows/nf-core/fastq_align_bwaaln/meta.yml b/subworkflows/nf-core/fastq_align_bwaaln/meta.yml index 708286c859a..bad3b07f819 100644 --- a/subworkflows/nf-core/fastq_align_bwaaln/meta.yml +++ b/subworkflows/nf-core/fastq_align_bwaaln/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fastq_align_bwaaln_samtools" description: Align FASTQ files against reference genome with the bwa aln short-read aligner producing a sorted and indexed BAM files keywords: diff --git a/subworkflows/nf-core/fastq_align_chromap/meta.yml b/subworkflows/nf-core/fastq_align_chromap/meta.yml index 6d701bcede7..41c46e8230d 100644 --- a/subworkflows/nf-core/fastq_align_chromap/meta.yml +++ b/subworkflows/nf-core/fastq_align_chromap/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fastq_align_chromap" description: Align high throughput chromatin profiles using Chromap then sort with samtools keywords: diff --git a/subworkflows/nf-core/fastq_align_dna/meta.yml b/subworkflows/nf-core/fastq_align_dna/meta.yml index f0820bac970..3b7b8007c89 100644 --- a/subworkflows/nf-core/fastq_align_dna/meta.yml +++ b/subworkflows/nf-core/fastq_align_dna/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fastq_align_dna" description: Align fastq files to a reference genome keywords: diff --git a/subworkflows/nf-core/fastq_align_hisat2/meta.yml b/subworkflows/nf-core/fastq_align_hisat2/meta.yml index ed37ed7ff1c..55063d19a52 100644 --- a/subworkflows/nf-core/fastq_align_hisat2/meta.yml +++ b/subworkflows/nf-core/fastq_align_hisat2/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fastq_align_hisat2" description: Align reads to a reference genome using hisat2 then sort with samtools keywords: diff --git a/subworkflows/nf-core/fastq_align_star/meta.yml b/subworkflows/nf-core/fastq_align_star/meta.yml index 54e5c8e0e77..3c41e90b132 100644 --- a/subworkflows/nf-core/fastq_align_star/meta.yml +++ b/subworkflows/nf-core/fastq_align_star/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fastq_align_star" description: Align reads to a reference genome using bowtie2 then sort with samtools keywords: diff --git a/subworkflows/nf-core/fastq_contam_seqtk_kraken/meta.yml b/subworkflows/nf-core/fastq_contam_seqtk_kraken/meta.yml index 2c31b55ce5f..d62f2d038bc 100644 --- a/subworkflows/nf-core/fastq_contam_seqtk_kraken/meta.yml +++ b/subworkflows/nf-core/fastq_contam_seqtk_kraken/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "FASTQ_CONTAM_SEQTK_KRAKEN" description: Produces a contamination report from FastQ input after subsampling keywords: diff --git a/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/meta.yml b/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/meta.yml index af4ad5bc482..c6ff2f343ed 100644 --- a/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/meta.yml +++ b/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: fgbio_create_umi_consensus description: | This workflow uses the suite FGBIO to identify and remove UMI tags from FASTQ reads @@ -40,10 +41,14 @@ input: If the read does not contain any UMI, the structure will be +T (i.e. only template of any length). https://github.com/fulcrumgenomics/fgbio/wiki/Read-Structures - groupreadsbyumi_strategy: - type: string - description: | - Reguired argument: defines the UMI assignment strategy. - Must be chosen among: Identity, Edit, Adjacency, Paired. + type: string + description: | + Reguired argument: defines the UMI assignment strategy. + enum: + - Identity + - Edit + - Adjacency + - Paired output: - versions: type: file diff --git a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/meta.yml b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/meta.yml index c385ca21936..ed93a54ac47 100644 --- a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/meta.yml +++ b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: fastq_download_prefetch_fasterqdump_sratools description: Download FASTQ sequencing reads from the NCBI's Sequence Read Archive (SRA). keywords: diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml index d80ebc0a1f0..857f1385548 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=yaml-schema.json name: "fastq_fastqc_umitools_fastp" description: Read QC, UMI extraction and trimming keywords: @@ -65,12 +67,12 @@ output: Groovy Map containing sample information e.g. [ id:'test' ] - reads: - type: file - description: > - Extracted FASTQ files. | - For single-end reads, pattern is \${prefix}.umi_extract.fastq.gz. | - For paired-end reads, pattern is \${prefix}.umi_extract_{1,2}.fastq.gz. - pattern: "*.{fastq.gz}" + type: file + description: > + Extracted FASTQ files. | + For single-end reads, pattern is \${prefix}.umi_extract.fastq.gz. | + For paired-end reads, pattern is \${prefix}.umi_extract_{1,2}.fastq.gz. + pattern: "*.{fastq.gz}" - fastqc_html: type: file description: FastQC report @@ -96,16 +98,16 @@ output: description: Logfile FastP pattern: "*.{fastp.log}" - trim_reads_fail: - type: file - description: Trimmed fastq files failing QC - pattern: "*.{fastq.gz}" + type: file + description: Trimmed fastq files failing QC + pattern: "*.{fastq.gz}" - trim_reads_merged: - type: file - description: Trimmed and merged fastq files - pattern: "*.{fastq.gz}" + type: file + description: Trimmed and merged fastq files + pattern: "*.{fastq.gz}" - trim_read_count: - type: integer - description: Number of reads after trimming + type: integer + description: Number of reads after trimming - fastqc_trim_html: type: file description: FastQC report diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/meta.yml b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/meta.yml index b05004d45ac..35f0e272ecb 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/meta.yml +++ b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fastq_fastqc_umitools_trimgalore" description: Read QC, UMI extraction and trimming keywords: @@ -49,12 +50,12 @@ input: output: - reads: - type: file - description: > - Extracted FASTQ files. | - For single-end reads, pattern is \${prefix}.umi_extract.fastq.gz. | - For paired-end reads, pattern is \${prefix}.umi_extract_{1,2}.fastq.gz. - pattern: "*.{fastq.gz}" + type: file + description: > + Extracted FASTQ files. | + For single-end reads, pattern is \${prefix}.umi_extract.fastq.gz. | + For paired-end reads, pattern is \${prefix}.umi_extract_{1,2}.fastq.gz. + pattern: "*.{fastq.gz}" - fastqc_html: type: file description: FastQC report diff --git a/subworkflows/nf-core/fastq_subsample_fq_salmon/meta.yml b/subworkflows/nf-core/fastq_subsample_fq_salmon/meta.yml index fd13a374816..4c196da7240 100644 --- a/subworkflows/nf-core/fastq_subsample_fq_salmon/meta.yml +++ b/subworkflows/nf-core/fastq_subsample_fq_salmon/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fastq_subsample_fq_salmon" description: Subsample fastq keywords: diff --git a/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml b/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml index ccda6574946..cc6a45a2cf9 100644 --- a/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml +++ b/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "fastq_trim_fastp_fastqc" description: Read QC, fastp trimming and read qc keywords: @@ -35,72 +36,72 @@ input: Structure: val(save_merged) Specify true to save all merged reads to the a file ending in `*.merged.fastq.gz` - val_skip_fastqc: - type: boolean - description: | - Structure: val(skip_fastqc) - skip the fastqc process if true + type: boolean + description: | + Structure: val(skip_fastqc) + skip the fastqc process if true - val_skip_fastp: - type: boolean - description: | - Structure: val(skip_fastp) - skip the fastp process if true + type: boolean + description: | + Structure: val(skip_fastp) + skip the fastp process if true output: - meta: - type: value - description: Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + type: value + description: Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - reads: - type: file - description: | - Structure: [ val(meta), path(reads) ] - The trimmed/modified/unmerged fastq reads + type: file + description: | + Structure: [ val(meta), path(reads) ] + The trimmed/modified/unmerged fastq reads - trim_json: - type: file - description: | - Structure: [ val(meta), path(trim_json) ] - Results in JSON format + type: file + description: | + Structure: [ val(meta), path(trim_json) ] + Results in JSON format - trim_html: - type: file - description: | - Structure: [ val(meta), path(trim_html) ] - Results in HTML format + type: file + description: | + Structure: [ val(meta), path(trim_html) ] + Results in HTML format - trim_log: - type: file - description: | - Structure: [ val(meta), path(trim_log) ] - fastq log file + type: file + description: | + Structure: [ val(meta), path(trim_log) ] + fastq log file - trim_reads_fail: - type: file - description: | - Structure: [ val(meta), path(trim_reads_fail) ] - Reads the failed the preprocessing + type: file + description: | + Structure: [ val(meta), path(trim_reads_fail) ] + Reads the failed the preprocessing - trim_reads_merged: - type: file - description: | - Structure: [ val(meta), path(trim_reads_merged) ] - Reads that were successfully merged + type: file + description: | + Structure: [ val(meta), path(trim_reads_merged) ] + Reads that were successfully merged - fastqc_raw_html: - type: file - description: | - Structure: [ val(meta), path(fastqc_raw_html) ] - Raw fastQC report + type: file + description: | + Structure: [ val(meta), path(fastqc_raw_html) ] + Raw fastQC report - fastqc_raw_zip: - type: file - description: | - Structure: [ val(meta), path(fastqc_raw_zip) ] - Raw fastQC report archive + type: file + description: | + Structure: [ val(meta), path(fastqc_raw_zip) ] + Raw fastQC report archive - fastqc_trim_html: - type: file - description: | - Structure: [ val(meta), path(fastqc_trim_html) ] - Trimmed fastQC report + type: file + description: | + Structure: [ val(meta), path(fastqc_trim_html) ] + Trimmed fastQC report - fastqc_trim_zip: - type: file - description: | - Structure: [ val(meta), path(fastqc_trim_zip) ] - Trimmed fastQC report archive + type: file + description: | + Structure: [ val(meta), path(fastqc_trim_zip) ] + Trimmed fastQC report archive - versions: type: file description: File containing software versions diff --git a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml b/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml index 4c41f1f261e..7e346011f57 100644 --- a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml +++ b/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: gatk_tumor_only_somatic_variant_calling description: | Perform variant calling on a single tumor sample using mutect2 tumor only mode. diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml b/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml index 8be33b6dcfb..9e2d61faa62 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: vcf_annotate_ensemblvep description: Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file keywords: diff --git a/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml b/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml index facae2f9876..6bdababdf2d 100644 --- a/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml +++ b/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: vcf_annotate_snpeff description: Perform annotation with snpEff and bgzip + tabix index the resulting VCF file keywords: diff --git a/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml b/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml index 3a07460202b..b37b1fd8c5b 100644 --- a/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml +++ b/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "vcf_extract_relate_somalier" description: Perform somalier extraction and relate stats on input VCFs keywords: diff --git a/subworkflows/nf-core/vcf_gather_bcftools/meta.yml b/subworkflows/nf-core/vcf_gather_bcftools/meta.yml index 166669ec52f..035d131c67d 100644 --- a/subworkflows/nf-core/vcf_gather_bcftools/meta.yml +++ b/subworkflows/nf-core/vcf_gather_bcftools/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "vcf_gather_bcftools" description: | Concatenate several VCF files using bcftools concat. diff --git a/subworkflows/nf-core/vcf_impute_glimpse/meta.yml b/subworkflows/nf-core/vcf_impute_glimpse/meta.yml index e4908e0435e..6ea00496945 100644 --- a/subworkflows/nf-core/vcf_impute_glimpse/meta.yml +++ b/subworkflows/nf-core/vcf_impute_glimpse/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "vcf_imputation_glimpse" description: Impute VCF/BCF files with Glimpse keywords: diff --git a/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml b/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml index e2b9aebb047..5886a01f1c7 100644 --- a/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml +++ b/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json name: "vcf_phase_shapeit5" description: Phase vcf panel with Shapeit5 tools keywords: diff --git a/subworkflows/yaml-schema.json b/subworkflows/yaml-schema.json new file mode 100644 index 00000000000..b8fc6ccf580 --- /dev/null +++ b/subworkflows/yaml-schema.json @@ -0,0 +1,113 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Meta yaml", + "description": "Validate the meta yaml file for an nf-core subworkflow", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the subworkflow" + }, + "description": { + "type": "string", + "description": "Description of the subworkflow" + }, + "authors": { + "type": "array", + "description": "Authors of the subworkflow", + "items": { + "type": "string" + } + }, + "modules": { + "type": "array", + "description": "Modules used in the subworkflow", + "items": { + "type": "string" + } + }, + "keywords": { + "type": "array", + "description": "Keywords for the module", + "items": { + "type": "string" + }, + "minItems": 3 + }, + "input": { + "type": "array", + "description": "Input channels for the subworkflow", + "items": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of the input channel" + }, + "description": { + "type": "string", + "description": "Description of the input channel" + }, + "pattern": { + "type": "string", + "description": "Pattern of the input channel, given in Java glob syntax" + }, + "default": { + "type": ["string", "number", "boolean", "array", "object"], + "description": "Default value for the input channel" + }, + "enum": { + "type": "array", + "description": "List of allowed values for the input channel", + "items": { + "type": ["string", "number", "boolean", "array", "object"] + }, + "uniqueItems": true + } + }, + "required": ["description"] + } + } + } + }, + "output": { + "type": "array", + "description": "Output channels for the subworkflow", + "items": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of the output channel" + }, + "description": { + "type": "string", + "description": "Description of the output channel" + }, + "pattern": { + "type": "string", + "description": "Pattern of the input channel, given in Java glob syntax" + }, + "enum": { + "type": "array", + "description": "List of allowed values for the output channel", + "items": { + "type": ["string", "number", "boolean", "array", "object"] + }, + "uniqueItems": true + } + }, + "required": ["description"] + } + } + } + } + }, + "required": ["name", "description", "keywords", "authors", "output", "modules"] +} From 0a9c4eb264cce197707491861ce058a4c79d9c4f Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Mon, 24 Apr 2023 11:06:17 +0100 Subject: [PATCH 090/120] Make tmp dir if it doesn't exist for qualimap modules (#3317) --- modules/nf-core/qualimap/bamqc/main.nf | 2 +- modules/nf-core/qualimap/bamqccram/main.nf | 2 +- modules/nf-core/qualimap/rnaseq/main.nf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/qualimap/bamqc/main.nf b/modules/nf-core/qualimap/bamqc/main.nf index 810cf40248d..be505f56bec 100644 --- a/modules/nf-core/qualimap/bamqc/main.nf +++ b/modules/nf-core/qualimap/bamqc/main.nf @@ -34,7 +34,7 @@ process QUALIMAP_BAMQC { } """ unset DISPLAY - mkdir tmp + mkdir -p tmp export _JAVA_OPTIONS=-Djava.io.tmpdir=./tmp qualimap \\ --java-mem-size=$memory \\ diff --git a/modules/nf-core/qualimap/bamqccram/main.nf b/modules/nf-core/qualimap/bamqccram/main.nf index 6e57cc6502d..5510d7908d9 100644 --- a/modules/nf-core/qualimap/bamqccram/main.nf +++ b/modules/nf-core/qualimap/bamqccram/main.nf @@ -36,7 +36,7 @@ process QUALIMAP_BAMQCCRAM { } """ unset DISPLAY - mkdir tmp + mkdir -p tmp export _JAVA_OPTIONS=-Djava.io.tmpdir=./tmp samtools view -hb -T ${fasta} ${cram} | diff --git a/modules/nf-core/qualimap/rnaseq/main.nf b/modules/nf-core/qualimap/rnaseq/main.nf index c3cd5c06e13..b84ca060b16 100644 --- a/modules/nf-core/qualimap/rnaseq/main.nf +++ b/modules/nf-core/qualimap/rnaseq/main.nf @@ -32,7 +32,7 @@ process QUALIMAP_RNASEQ { } """ unset DISPLAY - mkdir tmp + mkdir -p tmp export _JAVA_OPTIONS=-Djava.io.tmpdir=./tmp qualimap \\ --java-mem-size=$memory \\ From 41f126f0aafc1f0608e3d4df29672b57abda7f7b Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Mon, 24 Apr 2023 12:08:35 +0200 Subject: [PATCH 091/120] make header file sample dependent in bcftools/annotate (#3316) * make header file sample dependent * Update tests/modules/nf-core/bcftools/annotate/nextflow.config Co-authored-by: Maxime U Garcia --------- Co-authored-by: Maxime U Garcia --- modules/nf-core/bcftools/annotate/main.nf | 9 ++++---- .../modules/nf-core/bcftools/annotate/main.nf | 21 ++++++++++++------- .../nf-core/bcftools/annotate/nextflow.config | 3 ++- .../nf-core/bcftools/annotate/test.yml | 15 +++---------- 4 files changed, 23 insertions(+), 25 deletions(-) diff --git a/modules/nf-core/bcftools/annotate/main.nf b/modules/nf-core/bcftools/annotate/main.nf index c529f2c2025..91f672f3c51 100644 --- a/modules/nf-core/bcftools/annotate/main.nf +++ b/modules/nf-core/bcftools/annotate/main.nf @@ -2,14 +2,13 @@ process BCFTOOLS_ANNOTATE { tag "$meta.id" label 'process_low' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: - tuple val(meta), path(input), path(index), path(annotations), path(annotations_index) - path(header_lines) + tuple val(meta), path(input), path(index), path(annotations), path(annotations_index), path(header_lines) output: tuple val(meta), path("*.{vcf,vcf.gz,bcf,bcf.gz}"), emit: vcf diff --git a/tests/modules/nf-core/bcftools/annotate/main.nf b/tests/modules/nf-core/bcftools/annotate/main.nf index f2108a3bdd2..f8843a35ae3 100644 --- a/tests/modules/nf-core/bcftools/annotate/main.nf +++ b/tests/modules/nf-core/bcftools/annotate/main.nf @@ -10,19 +10,26 @@ workflow test_bcftools_annotate_out_vcf { input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), - [],[] + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true), + [] ] - BCFTOOLS_ANNOTATE_VCF ( input, [] ) + BCFTOOLS_ANNOTATE_VCF ( input ) } workflow test_bcftools_annotate_out_bcf { - input = [ [ id:'test', single_end:false ], // meta map + input = Channel.of([ + [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_bcf'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true), - [],[] - ] + [], + [], + [] + ]) + + headers = Channel.of('##INFO=\n##INFO=') + .collectFile(name:"headers.vcf") - BCFTOOLS_ANNOTATE_BCF ( input, [] ) + BCFTOOLS_ANNOTATE_BCF ( input.combine(headers) ) } diff --git a/tests/modules/nf-core/bcftools/annotate/nextflow.config b/tests/modules/nf-core/bcftools/annotate/nextflow.config index 7bbdca53227..29e89b7fe0f 100644 --- a/tests/modules/nf-core/bcftools/annotate/nextflow.config +++ b/tests/modules/nf-core/bcftools/annotate/nextflow.config @@ -1,6 +1,7 @@ process { withName: 'BCFTOOLS_ANNOTATE_VCF' { - ext.args = "-x ID,INFO/DP,FORMAT/DP --output-type v" + ext.prefix = { "${meta.id}_vcf" } + ext.args = "-x ID,INFO/DP,FORMAT/DP --output-type z" publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } } diff --git a/tests/modules/nf-core/bcftools/annotate/test.yml b/tests/modules/nf-core/bcftools/annotate/test.yml index 34d54e83413..2274402d5be 100644 --- a/tests/modules/nf-core/bcftools/annotate/test.yml +++ b/tests/modules/nf-core/bcftools/annotate/test.yml @@ -1,23 +1,14 @@ - name: bcftools annotate test_bcftools_annotate_out_vcf - command: nextflow run ./tests/modules/nf-core/bcftools/annotate -entry test_bcftools_annotate_out_vcf -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/bcftools/annotate -entry test_bcftools_annotate_out_vcf -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bcftools/annotate/nextflow.config tags: - bcftools/annotate - bcftools files: - - path: output/bcftools/test.vcf + - path: output/bcftools/test_vcf.vcf.gz - path: output/bcftools/versions.yml - name: bcftools annotate test_bcftools_annotate_out_bcf - command: nextflow run ./tests/modules/nf-core/bcftools/annotate -entry test_bcftools_annotate_out_bcf -c ./tests/config/nextflow.config - tags: - - bcftools/annotate - - bcftools - files: - - path: output/bcftools/test_ann.bcf - - path: output/bcftools/versions.yml - -- name: bcftools annotate test_bcftools_annotate_out_bcf_stub - command: nextflow run ./tests/modules/nf-core/bcftools/annotate -entry test_bcftools_annotate_out_bcf -c ./tests/config/nextflow.config -stub + command: nextflow run ./tests/modules/nf-core/bcftools/annotate -entry test_bcftools_annotate_out_bcf -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bcftools/annotate/nextflow.config tags: - bcftools/annotate - bcftools From 8c04ecc0c5d4ad102755b919b2525481f0380090 Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen <37172585+asp8200@users.noreply.github.com> Date: Mon, 24 Apr 2023 12:29:26 +0200 Subject: [PATCH 092/120] Improving Sentieon-dedup-module (#3315) * Enabling user to set name of metrics file from Dedup * Updating md5sums --- modules/nf-core/sentieon/dedup/main.nf | 3 ++- tests/modules/nf-core/sentieon/dedup/test.yml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/nf-core/sentieon/dedup/main.nf b/modules/nf-core/sentieon/dedup/main.nf index 4415350896a..6738b7bd071 100644 --- a/modules/nf-core/sentieon/dedup/main.nf +++ b/modules/nf-core/sentieon/dedup/main.nf @@ -36,6 +36,7 @@ process SENTIEON_DEDUP { def args4 = task.ext.args4 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def suffix = task.ext.suffix ?: ".cram" // The suffix should be either ".cram" or ".bam". + def metrics = task.ext.metrics ?: "${prefix}${suffix}.metrics" def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' def sentieon_auth_data_base64 = task.ext.sentieon_auth_data_base64 ?: '' def input_list = bam.collect{"-i $it"}.join(' ') @@ -51,7 +52,7 @@ process SENTIEON_DEDUP { fi sentieon driver $args $input_list -r ${fasta} --algo LocusCollector $args2 --fun score_info ${prefix}.score - sentieon driver $args3 -t $task.cpus $input_list -r ${fasta} --algo Dedup $args4 --score_info ${prefix}.score --metrics ${prefix}.metrics ${prefix}${suffix} + sentieon driver $args3 -t $task.cpus $input_list -r ${fasta} --algo Dedup $args4 --score_info ${prefix}.score --metrics ${metrics} ${prefix}${suffix} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/nf-core/sentieon/dedup/test.yml b/tests/modules/nf-core/sentieon/dedup/test.yml index 48686c4367b..412a1f5636b 100644 --- a/tests/modules/nf-core/sentieon/dedup/test.yml +++ b/tests/modules/nf-core/sentieon/dedup/test.yml @@ -5,11 +5,11 @@ - sentieon/dedup files: - path: ./output/sentieon/test.cram - md5sum: 6abb0fc667edc1ce61b67929c1ec0881 + md5sum: 22e6ed2be1f2a1725d27f0c9c8e20f37 - path: ./output/sentieon/test.cram.crai - md5sum: f8da02b770410adb02561aa69a46cc15 - - path: ./output/sentieon/test.metrics - md5sum: aba47c5fed7143500d91cc39df1e2eb2 + md5sum: 99594ee9725d4cc2023ecbbd7d5b8e05 + - path: ./output/sentieon/test.cram.metrics + md5sum: b9026573bc740e93d8d6a2186010eb34 - path: ./output/sentieon/test.score md5sum: 4a36fe59dc6865cd5ee9e7ecd936106e - path: ./output/sentieon/versions.yml @@ -20,11 +20,11 @@ - sentieon/dedup files: - path: ./output/sentieon/test.cram - md5sum: a605337533680a85453df5e34900f833 + md5sum: 2aeaf710f5d7d5057cd2e40b0cb16a21 - path: ./output/sentieon/test.cram.crai - md5sum: ac694a8870a098b8f81a87ef3f5bd590 - - path: ./output/sentieon/test.metrics - md5sum: da2dd03dca502c3fbe23f655e44963f3 + md5sum: 8273946b2eb2fe4410657496afd719e2 + - path: ./output/sentieon/test.cram.metrics + md5sum: 8608759432f5d91819f199a76d00703d - path: ./output/sentieon/test.score md5sum: 4a36fe59dc6865cd5ee9e7ecd936106e - path: ./output/sentieon/versions.yml From e53ca1ea41b5e9ab001ac84fbdb10ebcc852c5b8 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Mon, 24 Apr 2023 15:10:48 +0200 Subject: [PATCH 093/120] new module bedtools jaccard (#3320) --- modules/nf-core/bedtools/jaccard/main.nf | 49 ++++++++++++++++ modules/nf-core/bedtools/jaccard/meta.yml | 58 +++++++++++++++++++ tests/config/pytest_modules.yml | 12 ++-- .../modules/nf-core/bedtools/jaccard/main.nf | 32 ++++++++++ .../nf-core/bedtools/jaccard/nextflow.config | 9 +++ .../modules/nf-core/bedtools/jaccard/test.yml | 19 ++++++ 6 files changed, 175 insertions(+), 4 deletions(-) create mode 100644 modules/nf-core/bedtools/jaccard/main.nf create mode 100644 modules/nf-core/bedtools/jaccard/meta.yml create mode 100644 tests/modules/nf-core/bedtools/jaccard/main.nf create mode 100644 tests/modules/nf-core/bedtools/jaccard/nextflow.config create mode 100644 tests/modules/nf-core/bedtools/jaccard/test.yml diff --git a/modules/nf-core/bedtools/jaccard/main.nf b/modules/nf-core/bedtools/jaccard/main.nf new file mode 100644 index 00000000000..cdfc931e6fc --- /dev/null +++ b/modules/nf-core/bedtools/jaccard/main.nf @@ -0,0 +1,49 @@ +process BEDTOOLS_JACCARD { + tag "$meta.id" + label 'process_single' + + conda "bioconda::bedtools=2.30.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' : + 'quay.io/biocontainers/bedtools:2.30.0--hc088bd4_0' }" + + input: + tuple val(meta), path(input_a), path(input_b) + tuple val(meta2), path(genome_file) + + output: + tuple val(meta), path("*.tsv"), emit: tsv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def genome = genome_file ? "-g ${genome_file}" : "" + """ + bedtools jaccard \\ + -a ${input_a} \\ + -b ${input_b} \\ + ${genome} \\ + ${args} \\ + > ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") + END_VERSIONS + """ +} diff --git a/modules/nf-core/bedtools/jaccard/meta.yml b/modules/nf-core/bedtools/jaccard/meta.yml new file mode 100644 index 00000000000..f8d9566766d --- /dev/null +++ b/modules/nf-core/bedtools/jaccard/meta.yml @@ -0,0 +1,58 @@ +name: "bedtools_jaccard" +description: Calculate Jaccard statistic b/w two feature files. +keywords: + - vcf + - gff + - bed + - jaccard + - intersection + - union + - statistics +tools: + - "bedtools": + description: | + A set of tools for genomic analysis tasks, specifically enabling genome arithmetic (merge, count, complement) on various file types. + documentation: https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input_a: + type: file + description: VCF,GFF or BED file to use with the `-a` option + pattern: "*.{vcf,vcf.gz,bed,bed.gz,gff}" + - input_b: + type: file + description: VCF,GFF or BED file to use with the `-b` option + pattern: "*.{vcf,vcf.gz,bed,bed.gz,gff}" + - meta2: + type: map + description: | + Groovy Map containing genome file information + e.g. [ id:'test', single_end:false ] + - genome_file: + type: file + description: A file containing all the contigs of the genome used to create the input files + pattern: "*.{txt,sizes,fai}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - tsv: + type: file + description: TSV file containing the results + pattern: "*.tsv" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 79fe292b864..34c3398efb6 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -361,6 +361,10 @@ bedtools/intersect: - modules/nf-core/bedtools/intersect/** - tests/modules/nf-core/bedtools/intersect/** +bedtools/jaccard: + - modules/nf-core/bedtools/jaccard/** + - tests/modules/nf-core/bedtools/jaccard/** + bedtools/makewindows: - modules/nf-core/bedtools/makewindows/** - tests/modules/nf-core/bedtools/makewindows/** @@ -1571,14 +1575,14 @@ glnexus: - modules/nf-core/glnexus/** - tests/modules/nf-core/glnexus/** -goat/taxonsearch: - - modules/nf-core/goat/taxonsearch/** - - tests/modules/nf-core/goat/taxonsearch/** - gnu/sort: - modules/nf-core/gnu/sort/** - tests/modules/nf-core/gnu/sort/** +goat/taxonsearch: + - modules/nf-core/goat/taxonsearch/** + - tests/modules/nf-core/goat/taxonsearch/** + goleft/indexsplit: - modules/nf-core/goleft/indexsplit/** - tests/modules/nf-core/goleft/indexsplit/** diff --git a/tests/modules/nf-core/bedtools/jaccard/main.nf b/tests/modules/nf-core/bedtools/jaccard/main.nf new file mode 100644 index 00000000000..97823041cc3 --- /dev/null +++ b/tests/modules/nf-core/bedtools/jaccard/main.nf @@ -0,0 +1,32 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BEDTOOLS_JACCARD } from '../../../../../modules/nf-core/bedtools/jaccard/main.nf' + +workflow test_bedtools_jaccard { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) + ] + + BEDTOOLS_JACCARD ( input, [[],[]] ) +} + +workflow test_bedtools_jaccard_genome { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) + ] + + genome = [ + [ id:'genome' ], + file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + ] + + BEDTOOLS_JACCARD ( input, genome ) +} diff --git a/tests/modules/nf-core/bedtools/jaccard/nextflow.config b/tests/modules/nf-core/bedtools/jaccard/nextflow.config new file mode 100644 index 00000000000..499fa9974b3 --- /dev/null +++ b/tests/modules/nf-core/bedtools/jaccard/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: "test_bedtools_jaccard_genome:BEDTOOLS_JACCARD" { + ext.args = "-sorted" + } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/bedtools/jaccard/test.yml b/tests/modules/nf-core/bedtools/jaccard/test.yml new file mode 100644 index 00000000000..0368fc92217 --- /dev/null +++ b/tests/modules/nf-core/bedtools/jaccard/test.yml @@ -0,0 +1,19 @@ +- name: bedtools jaccard test_bedtools_jaccard + command: nextflow run ./tests/modules/nf-core/bedtools/jaccard -entry test_bedtools_jaccard -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bedtools/jaccard/nextflow.config + tags: + - bedtools/jaccard + - bedtools + files: + - path: output/bedtools/test.tsv + md5sum: b737742026a3b512a494f3aa7935fded + - path: output/bedtools/versions.yml + +- name: bedtools jaccard test_bedtools_jaccard_genome + command: nextflow run ./tests/modules/nf-core/bedtools/jaccard -entry test_bedtools_jaccard_genome -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bedtools/jaccard/nextflow.config + tags: + - bedtools/jaccard + - bedtools + files: + - path: output/bedtools/test.tsv + md5sum: b737742026a3b512a494f3aa7935fded + - path: output/bedtools/versions.yml From 6ac18e3d76f0adc8c63a583a6007ca02607ce3c1 Mon Sep 17 00:00:00 2001 From: Florian Wuennemann Date: Mon, 24 Apr 2023 19:25:19 +0200 Subject: [PATCH 094/120] New module: Basicpy (#3293) * First working version of basicpy * Used existing test-data for testing. * Addressed first review comments. * Removed non-reproducible md5sum from test files. * Fixed linting error. * Removed conda checks and md5sums. * Updated container and CLI. * Removed md5sums from test files again. * Fixed conda exception for test workflow. --- .github/workflows/pytest-workflow.yml | 2 + modules/nf-core/basicpy/main.nf | 45 ++++++++++++++++++ modules/nf-core/basicpy/meta.yml | 47 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/basicpy/main.nf | 15 ++++++ tests/modules/nf-core/basicpy/nextflow.config | 7 +++ tests/modules/nf-core/basicpy/test.yml | 8 ++++ 7 files changed, 128 insertions(+) create mode 100644 modules/nf-core/basicpy/main.nf create mode 100644 modules/nf-core/basicpy/meta.yml create mode 100644 tests/modules/nf-core/basicpy/main.nf create mode 100644 tests/modules/nf-core/basicpy/nextflow.config create mode 100644 tests/modules/nf-core/basicpy/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 8c7dca7c55b..db46289add9 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -50,6 +50,8 @@ jobs: tags: bases2fastq - profile: "conda" tags: backsub + - profile: "conda" + tags: basicpy - profile: "conda" tags: bcl2fastq - profile: "conda" diff --git a/modules/nf-core/basicpy/main.nf b/modules/nf-core/basicpy/main.nf new file mode 100644 index 00000000000..4cc92517067 --- /dev/null +++ b/modules/nf-core/basicpy/main.nf @@ -0,0 +1,45 @@ +process BASICPY { + tag "$meta.id" + label 'process_single' + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "Basicpy module does not support Conda. Please use Docker / Singularity instead." + } + + container "yfukai/basicpy-docker-mcmicro:0.2.1" + + input: + tuple val(meta), path(image) + + output: + tuple val(meta), path("*.tiff"), emit: fields + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = "1.0.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping + """ + /opt/main.py -i $image -o . $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + basicpy:: $VERSION + END_VERSIONS + """ + + stub: + """ + touch ${prefix}.-dfp.tiff + touch ${prefix}.-dfp.tiff + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + basicpy:: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/basicpy/meta.yml b/modules/nf-core/basicpy/meta.yml new file mode 100644 index 00000000000..bf9e69037e0 --- /dev/null +++ b/modules/nf-core/basicpy/meta.yml @@ -0,0 +1,47 @@ +name: "basicpy" +description: BaSiCPy is a python package for background and shading correction of optical microscopy images. It is developed based on the Matlab version of BaSiC tool with major improvements in the algorithm. +keywords: + - illumiation_correction + - background_correction + - microscopy + - imaging +tools: + - "basicpy": + description: "BaSiCPy is a python package for background and shading correction of optical microscopy images. It is developed based on the Matlab version of BaSiC tool with major improvements in the algorithm. The container of this tool needs to be initialized with an empty Entrypoint. See the nextflow.config of the tests for details." + homepage: "https://github.com/peng-lab/BaSiCPy" + documentation: "https://basicpy.readthedocs.io/en/latest/index.html" + tool_dev_url: "https://github.com/peng-lab/BaSiCPy" + doi: "doi: 10.1038/ncomms14836." + licence: "MIT License" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + + - image: + type: file + description: Tiff file to be used for dark and flat field illumination correction + pattern: "*.{tiff,tif}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - fields: + type: file + description: Tiff fields for dark and flat field illumination correction + pattern: "*.{tiff,tif}" + +authors: + - "@FloWuenne" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 34c3398efb6..8e04884e88b 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -215,6 +215,10 @@ bases2fastq: - modules/nf-core/bases2fastq/** - tests/modules/nf-core/bases2fastq/** +basicpy: + - modules/nf-core/basicpy/** + - tests/modules/nf-core/basicpy/** + bbmap/align: - modules/nf-core/bbmap/align/** - tests/modules/nf-core/bbmap/align/** diff --git a/tests/modules/nf-core/basicpy/main.nf b/tests/modules/nf-core/basicpy/main.nf new file mode 100644 index 00000000000..482533c362f --- /dev/null +++ b/tests/modules/nf-core/basicpy/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BASICPY } from '../../../../modules/nf-core/basicpy/main.nf' + +workflow test_basicpy { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['imaging']['ome-tiff']['cycif_tonsil_cycle1'], checkIfExists: true) + ] + + BASICPY ( input ) +} diff --git a/tests/modules/nf-core/basicpy/nextflow.config b/tests/modules/nf-core/basicpy/nextflow.config new file mode 100644 index 00000000000..879928a9509 --- /dev/null +++ b/tests/modules/nf-core/basicpy/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} + +docker.runOptions = '--entrypoint ""' diff --git a/tests/modules/nf-core/basicpy/test.yml b/tests/modules/nf-core/basicpy/test.yml new file mode 100644 index 00000000000..1284598ec76 --- /dev/null +++ b/tests/modules/nf-core/basicpy/test.yml @@ -0,0 +1,8 @@ +- name: basicpy test_basicpy + command: nextflow run ./tests/modules/nf-core/basicpy -entry test_basicpy -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/basicpy/nextflow.config + tags: + - basicpy + files: + - path: output/basicpy/cycif-tonsil-cycle1.ome-dfp.tiff + - path: output/basicpy/cycif-tonsil-cycle1.ome-ffp.tiff + - path: output/basicpy/versions.yml From 371eff7748d769c2ddc8bd593773523a364a52fe Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 24 Apr 2023 19:44:52 +0200 Subject: [PATCH 095/120] update samtools (#3313) * update samtools * update tests * fix more tests * more fixes * fix even more tests * fix fastq_align_bwaaln test --- modules/nf-core/samtools/ampliconclip/main.nf | 6 +-- modules/nf-core/samtools/bam2fq/main.nf | 6 +-- modules/nf-core/samtools/calmd/main.nf | 6 +-- modules/nf-core/samtools/collate/main.nf | 6 +-- modules/nf-core/samtools/collatefastq/main.nf | 6 +-- modules/nf-core/samtools/convert/main.nf | 6 +-- modules/nf-core/samtools/coverage/main.nf | 6 +-- modules/nf-core/samtools/depth/main.nf | 6 +-- modules/nf-core/samtools/dict/main.nf | 6 +-- modules/nf-core/samtools/faidx/main.nf | 6 +-- modules/nf-core/samtools/fasta/main.nf | 6 +-- modules/nf-core/samtools/fastq/main.nf | 6 +-- modules/nf-core/samtools/fixmate/main.nf | 6 +-- modules/nf-core/samtools/flagstat/main.nf | 6 +-- modules/nf-core/samtools/getrg/main.nf | 6 +-- modules/nf-core/samtools/idxstats/main.nf | 6 +-- modules/nf-core/samtools/index/main.nf | 6 +-- modules/nf-core/samtools/markdup/main.nf | 6 +-- modules/nf-core/samtools/merge/main.nf | 6 +-- modules/nf-core/samtools/mpileup/main.nf | 6 +-- modules/nf-core/samtools/sort/main.nf | 16 +++++-- modules/nf-core/samtools/stats/main.nf | 6 +-- modules/nf-core/samtools/view/main.nf | 6 +-- .../nf-core/samtools/ampliconclip/test.yml | 25 ++++++----- .../modules/nf-core/samtools/bam2fq/test.yml | 6 +-- tests/modules/nf-core/samtools/calmd/test.yml | 5 ++- .../modules/nf-core/samtools/collate/test.yml | 10 +++-- .../nf-core/samtools/collatefastq/test.yml | 19 ++++++-- .../modules/nf-core/samtools/convert/test.yml | 8 ++-- .../nf-core/samtools/coverage/test.yml | 2 +- tests/modules/nf-core/samtools/depth/test.yml | 3 +- tests/modules/nf-core/samtools/dict/test.yml | 2 +- tests/modules/nf-core/samtools/faidx/test.yml | 9 ++-- tests/modules/nf-core/samtools/fasta/test.yml | 3 ++ tests/modules/nf-core/samtools/fastq/test.yml | 3 ++ .../modules/nf-core/samtools/fixmate/test.yml | 5 ++- .../nf-core/samtools/flagstat/test.yml | 5 ++- tests/modules/nf-core/samtools/getrg/test.yml | 5 ++- .../nf-core/samtools/idxstats/test.yml | 3 +- tests/modules/nf-core/samtools/index/test.yml | 9 ++-- .../nf-core/samtools/markdup/nextflow.config | 7 ++- .../modules/nf-core/samtools/markdup/test.yml | 4 +- tests/modules/nf-core/samtools/merge/test.yml | 11 +++-- .../modules/nf-core/samtools/mpileup/test.yml | 10 ++--- tests/modules/nf-core/samtools/sort/test.yml | 7 +-- tests/modules/nf-core/samtools/stats/test.yml | 10 +++-- tests/modules/nf-core/samtools/view/test.yml | 44 +++++++++++-------- .../bam_markduplicates_picard/test.yml | 4 +- .../nf-core/bam_split_by_region/test.yml | 20 ++++----- .../nf-core/bam_stats_samtools/test.yml | 6 +-- .../nf-core/fastq_align_bwaaln/test.yml | 4 +- .../fastq_create_umi_consensus_fgbio/test.yml | 8 ++-- 52 files changed, 230 insertions(+), 175 deletions(-) diff --git a/modules/nf-core/samtools/ampliconclip/main.nf b/modules/nf-core/samtools/ampliconclip/main.nf index 2b659aee592..efed585b3ac 100644 --- a/modules/nf-core/samtools/ampliconclip/main.nf +++ b/modules/nf-core/samtools/ampliconclip/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_AMPLICONCLIP { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/samtools/bam2fq/main.nf b/modules/nf-core/samtools/bam2fq/main.nf index 0b06352533d..6b20efc7fdc 100644 --- a/modules/nf-core/samtools/bam2fq/main.nf +++ b/modules/nf-core/samtools/bam2fq/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_BAM2FQ { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(inputbam) diff --git a/modules/nf-core/samtools/calmd/main.nf b/modules/nf-core/samtools/calmd/main.nf index c4baf8f11e7..b035a29684b 100644 --- a/modules/nf-core/samtools/calmd/main.nf +++ b/modules/nf-core/samtools/calmd/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_CALMD { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/samtools/collate/main.nf b/modules/nf-core/samtools/collate/main.nf index 0e4ba5d6c13..9530b289299 100644 --- a/modules/nf-core/samtools/collate/main.nf +++ b/modules/nf-core/samtools/collate/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_COLLATE { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1': - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0': + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/collatefastq/main.nf b/modules/nf-core/samtools/collatefastq/main.nf index 857f60c64ef..b8f15644d13 100644 --- a/modules/nf-core/samtools/collatefastq/main.nf +++ b/modules/nf-core/samtools/collatefastq/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_COLLATEFASTQ { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/convert/main.nf b/modules/nf-core/samtools/convert/main.nf index 7efebb8e51d..630336b306a 100644 --- a/modules/nf-core/samtools/convert/main.nf +++ b/modules/nf-core/samtools/convert/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_CONVERT { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input), path(index) diff --git a/modules/nf-core/samtools/coverage/main.nf b/modules/nf-core/samtools/coverage/main.nf index 5b62e196fce..25f742de6d2 100644 --- a/modules/nf-core/samtools/coverage/main.nf +++ b/modules/nf-core/samtools/coverage/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_COVERAGE { tag "$meta.id" label 'process_single' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input), path(input_index) diff --git a/modules/nf-core/samtools/depth/main.nf b/modules/nf-core/samtools/depth/main.nf index aeacf8016af..29a5851359e 100644 --- a/modules/nf-core/samtools/depth/main.nf +++ b/modules/nf-core/samtools/depth/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_DEPTH { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/samtools/dict/main.nf b/modules/nf-core/samtools/dict/main.nf index a8c81ab4ea2..9826890f647 100644 --- a/modules/nf-core/samtools/dict/main.nf +++ b/modules/nf-core/samtools/dict/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_DICT { tag "$fasta" label 'process_single' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf index ce6580d25da..21be8bad9cd 100644 --- a/modules/nf-core/samtools/faidx/main.nf +++ b/modules/nf-core/samtools/faidx/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FAIDX { tag "$fasta" label 'process_single' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/nf-core/samtools/fasta/main.nf b/modules/nf-core/samtools/fasta/main.nf index 3b287eeebcd..693f4159579 100644 --- a/modules/nf-core/samtools/fasta/main.nf +++ b/modules/nf-core/samtools/fasta/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FASTA { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/fastq/main.nf b/modules/nf-core/samtools/fastq/main.nf index c0b36f6f22e..514a4e2f56e 100644 --- a/modules/nf-core/samtools/fastq/main.nf +++ b/modules/nf-core/samtools/fastq/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FASTQ { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/fixmate/main.nf b/modules/nf-core/samtools/fixmate/main.nf index d53d8abd390..682b74e04d7 100644 --- a/modules/nf-core/samtools/fixmate/main.nf +++ b/modules/nf-core/samtools/fixmate/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FIXMATE { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/samtools/flagstat/main.nf b/modules/nf-core/samtools/flagstat/main.nf index 2120cd7d3ad..4b3070fc4e8 100644 --- a/modules/nf-core/samtools/flagstat/main.nf +++ b/modules/nf-core/samtools/flagstat/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FLAGSTAT { tag "$meta.id" label 'process_single' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/samtools/getrg/main.nf b/modules/nf-core/samtools/getrg/main.nf index 1800a1363b9..a4fdd24c33f 100644 --- a/modules/nf-core/samtools/getrg/main.nf +++ b/modules/nf-core/samtools/getrg/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_GETRG { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/idxstats/main.nf b/modules/nf-core/samtools/idxstats/main.nf index a7b87d8b94c..5eefc058a8a 100644 --- a/modules/nf-core/samtools/idxstats/main.nf +++ b/modules/nf-core/samtools/idxstats/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_IDXSTATS { tag "$meta.id" label 'process_single' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index 8b95687a96e..19d25cae437 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/markdup/main.nf b/modules/nf-core/samtools/markdup/main.nf index dfed2010378..3201d964289 100644 --- a/modules/nf-core/samtools/markdup/main.nf +++ b/modules/nf-core/samtools/markdup/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_MARKDUP { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/merge/main.nf b/modules/nf-core/samtools/merge/main.nf index a80ff3a227b..ebd6422149e 100644 --- a/modules/nf-core/samtools/merge/main.nf +++ b/modules/nf-core/samtools/merge/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_MERGE { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input_files, stageAs: "?/*") diff --git a/modules/nf-core/samtools/mpileup/main.nf b/modules/nf-core/samtools/mpileup/main.nf index 28092683ac9..cbf0bd83905 100644 --- a/modules/nf-core/samtools/mpileup/main.nf +++ b/modules/nf-core/samtools/mpileup/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_MPILEUP { tag "$meta.id" label 'process_single' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input), path(intervals) path fasta diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index 84c167cdd4e..933ebbe916d 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(bam) @@ -21,9 +21,17 @@ process SAMTOOLS_SORT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def sort_memory = (task.memory.mega/task.cpus).intValue() if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ - samtools sort $args -@ $task.cpus -o ${prefix}.bam -T $prefix $bam + samtools sort \\ + $args \\ + -@ $task.cpus \\ + -m ${sort_memory}M \\ + -o ${prefix}.bam \\ + -T $prefix \\ + $bam + cat <<-END_VERSIONS > versions.yml "${task.process}": samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') diff --git a/modules/nf-core/samtools/stats/main.nf b/modules/nf-core/samtools/stats/main.nf index 0a2a364015b..8dbcc53be79 100644 --- a/modules/nf-core/samtools/stats/main.nf +++ b/modules/nf-core/samtools/stats/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_STATS { tag "$meta.id" label 'process_single' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input), path(input_index) diff --git a/modules/nf-core/samtools/view/main.nf b/modules/nf-core/samtools/view/main.nf index 729c85e54e7..d7b2a0d36e1 100644 --- a/modules/nf-core/samtools/view/main.nf +++ b/modules/nf-core/samtools/view/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_VIEW { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.16.1" + conda "bioconda::samtools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : - 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : + 'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }" input: tuple val(meta), path(input), path(index) diff --git a/tests/modules/nf-core/samtools/ampliconclip/test.yml b/tests/modules/nf-core/samtools/ampliconclip/test.yml index a215a58f347..dc484ea48e3 100644 --- a/tests/modules/nf-core/samtools/ampliconclip/test.yml +++ b/tests/modules/nf-core/samtools/ampliconclip/test.yml @@ -1,32 +1,35 @@ -- name: samtools ampliconclip no stats no rejects +- name: samtools ampliconclip test_samtools_ampliconclip_no_stats_no_rejects command: nextflow run ./tests/modules/nf-core/samtools/ampliconclip -entry test_samtools_ampliconclip_no_stats_no_rejects -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/ampliconclip/nextflow.config tags: - - samtools - samtools/ampliconclip + - samtools files: - path: output/samtools/test.bam - md5sum: ef926d581ad6d01570969a70889cafd5 + md5sum: 0011e37fa68fb57ce91a7bd205c99c71 + - path: output/samtools/versions.yml -- name: samtools ampliconclip no stats with rejects +- name: samtools ampliconclip test_samtools_ampliconclip_no_stats_with_rejects command: nextflow run ./tests/modules/nf-core/samtools/ampliconclip -entry test_samtools_ampliconclip_no_stats_with_rejects -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/ampliconclip/nextflow.config tags: - - samtools - samtools/ampliconclip + - samtools files: - path: output/samtools/test.bam - md5sum: 9b807852f31e2938eba6e103190782e9 + md5sum: 8495713f0bfc6af42a3085b01e94cfb6 - path: output/samtools/test.cliprejects.bam - md5sum: ae55117ec2786234373ffe2d2609a11e + md5sum: d2583bc1f07d93febe4d4f51aa940088 + - path: output/samtools/versions.yml -- name: samtools ampliconclip with stats with rejects +- name: samtools ampliconclip test_samtools_ampliconclip_with_stats_with_rejects command: nextflow run ./tests/modules/nf-core/samtools/ampliconclip -entry test_samtools_ampliconclip_with_stats_with_rejects -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/ampliconclip/nextflow.config tags: - - samtools - samtools/ampliconclip + - samtools files: - path: output/samtools/test.bam - md5sum: 6bf93cb4685ec3a8d11d00f48679e788 + md5sum: 9affca6bbaf52bb7b7aa03c5c249c00a - path: output/samtools/test.cliprejects.bam - md5sum: 643cc33efd22769c3ffe83691125ec54 + md5sum: 20409f2ebf0ceacdda60ed2f0f122c59 - path: output/samtools/test.clipstats.txt md5sum: 05ead360a98fab6a678056e326c4f1f3 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/bam2fq/test.yml b/tests/modules/nf-core/samtools/bam2fq/test.yml index 61b729b613e..afa260f6a88 100644 --- a/tests/modules/nf-core/samtools/bam2fq/test.yml +++ b/tests/modules/nf-core/samtools/bam2fq/test.yml @@ -1,14 +1,15 @@ - name: samtools bam2fq test_samtools_bam2fq_nosplit - command: nextflow run ./tests/modules/nf-core/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/bam2fq/nextflow.config tags: - samtools/bam2fq - samtools files: - path: output/samtools/test_interleaved.fq.gz + md5sum: 7a57a8ab53dd1d799cca67a85c47ccd9 - path: output/samtools/versions.yml - name: samtools bam2fq test_samtools_bam2fq_withsplit - command: nextflow run ./tests/modules/nf-core/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/bam2fq/nextflow.config tags: - samtools/bam2fq - samtools @@ -22,4 +23,3 @@ - path: output/samtools/test_singleton.fq.gz md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/versions.yml - md5sum: f8f18c60abd39c54afe90e2f4b76b36e diff --git a/tests/modules/nf-core/samtools/calmd/test.yml b/tests/modules/nf-core/samtools/calmd/test.yml index 2bce8f758f4..34e1bdd8e28 100644 --- a/tests/modules/nf-core/samtools/calmd/test.yml +++ b/tests/modules/nf-core/samtools/calmd/test.yml @@ -1,8 +1,9 @@ - name: samtools calmd test_samtools_calmd command: nextflow run ./tests/modules/nf-core/samtools/calmd -entry test_samtools_calmd -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/calmd/nextflow.config tags: - - samtools - samtools/calmd + - samtools files: - path: output/samtools/test.bam - md5sum: 2ba8c7adecca133d6c3f0654e3abd541 + md5sum: 20e12bb7f42ebd8d40c21fd881fcfda8 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/collate/test.yml b/tests/modules/nf-core/samtools/collate/test.yml index 9925a518977..8f99c47ffc6 100644 --- a/tests/modules/nf-core/samtools/collate/test.yml +++ b/tests/modules/nf-core/samtools/collate/test.yml @@ -1,17 +1,19 @@ - name: samtools collate test_samtools_collate - command: nextflow run ./tests/modules/nf-core/samtools/collate -entry test_samtools_collate -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/collate/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/collate -entry test_samtools_collate -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/collate/nextflow.config tags: - samtools/collate - samtools files: - path: output/samtools/test.bam - md5sum: 377f4176c9305850c5bbeddea8ad80c5 + md5sum: a391344352f99d04312a4f4fb48c9d58 + - path: output/samtools/versions.yml - name: samtools collate test_samtools_collate_cram - command: nextflow run ./tests/modules/nf-core/samtools/collate -entry test_samtools_collate_cram -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/collate/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/collate -entry test_samtools_collate_cram -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/collate/nextflow.config tags: - samtools/collate - samtools files: - path: output/samtools/test.bam - md5sum: 7dc62d3cccb266df8ae9f335f23cde20 + md5sum: 524dbd97cb9a5c03871e4814b98362f6 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/collatefastq/test.yml b/tests/modules/nf-core/samtools/collatefastq/test.yml index aa48c0dad1d..5771a5b2de9 100644 --- a/tests/modules/nf-core/samtools/collatefastq/test.yml +++ b/tests/modules/nf-core/samtools/collatefastq/test.yml @@ -1,46 +1,57 @@ - name: samtools collatefastq test_samtools_collatefastq_bam command: nextflow run ./tests/modules/nf-core/samtools/collatefastq -entry test_samtools_collatefastq_bam -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/collatefastq/nextflow.config tags: - - samtools/collatefastq - samtools + - samtools/collatefastq files: - path: output/samtools/test_1.fq.gz md5sum: 20c77f698e168bdcbfd3333d284ac032 - path: output/samtools/test_2.fq.gz md5sum: 943784b8d2be4aaf0dcbe257740bd0d1 - path: output/samtools/test_other.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/test_singleton.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/versions.yml - name: samtools collatefastq test_samtools_collatefastq_bam_single_end command: nextflow run ./tests/modules/nf-core/samtools/collatefastq -entry test_samtools_collatefastq_bam_single_end -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/collatefastq/nextflow.config tags: - - samtools/collatefastq - samtools + - samtools/collatefastq files: - path: output/samtools/test_1.fq.gz md5sum: 20c77f698e168bdcbfd3333d284ac032 - path: output/samtools/test_other.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/test_singleton.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/versions.yml - name: samtools collatefastq test_samtools_collatefastq_cram command: nextflow run ./tests/modules/nf-core/samtools/collatefastq -entry test_samtools_collatefastq_cram -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/collatefastq/nextflow.config tags: - - samtools/collatefastq - samtools + - samtools/collatefastq files: - path: output/samtools/test_1.fq.gz md5sum: 20c77f698e168bdcbfd3333d284ac032 - path: output/samtools/test_2.fq.gz md5sum: 943784b8d2be4aaf0dcbe257740bd0d1 - path: output/samtools/test_other.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/test_singleton.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/versions.yml - name: samtools collatefastq test_samtools_collatefastq_bam_interleaved command: nextflow run ./tests/modules/nf-core/samtools/collatefastq -entry test_samtools_collatefastq_bam_interleaved -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/collatefastq/nextflow.config tags: - - samtools/collatefastq - samtools + - samtools/collatefastq files: - path: output/samtools/test_interleaved.fq.gz md5sum: 4f2b93d492f0442fa89b02532c9b3530 - path: output/samtools/test_other.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/convert/test.yml b/tests/modules/nf-core/samtools/convert/test.yml index d9f8e053805..33c1a764eba 100644 --- a/tests/modules/nf-core/samtools/convert/test.yml +++ b/tests/modules/nf-core/samtools/convert/test.yml @@ -1,5 +1,5 @@ - name: samtools convert test_samtools_convert_bamtocram - command: nextflow run ./tests/modules/nf-core/samtools/convert -entry test_samtools_convert_bamtocram -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/convert -entry test_samtools_convert_bamtocram -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/convert/nextflow.config tags: - samtools - samtools/convert @@ -9,13 +9,13 @@ - path: output/samtools/versions.yml - name: samtools convert test_samtools_convert_cramtobam - command: nextflow run ./tests/modules/nf-core/samtools/convert -entry test_samtools_convert_cramtobam -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/convert -entry test_samtools_convert_cramtobam -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/convert/nextflow.config tags: - samtools - samtools/convert files: - path: output/samtools/test.bam - md5sum: 404c21b14c37e83aad04ba972bbffbe6 + md5sum: e5834b4874879ceaf71bacc955877f9a - path: output/samtools/test.bam.bai - md5sum: c55142e20838c3b56d93ff853a7b7189 + md5sum: 17b5f0f84bdfd3dbec90fa1a64924ec8 - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/coverage/test.yml b/tests/modules/nf-core/samtools/coverage/test.yml index 68e7fd74168..9e57de9fe00 100644 --- a/tests/modules/nf-core/samtools/coverage/test.yml +++ b/tests/modules/nf-core/samtools/coverage/test.yml @@ -1,8 +1,8 @@ - name: samtools coverage test_samtools_coverage command: nextflow run ./tests/modules/nf-core/samtools/coverage -entry test_samtools_coverage -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/coverage/nextflow.config tags: - - samtools - samtools/coverage + - samtools files: - path: output/samtools/test.txt md5sum: 99a521b3bf53b6acf8055a44a571ea84 diff --git a/tests/modules/nf-core/samtools/depth/test.yml b/tests/modules/nf-core/samtools/depth/test.yml index 419cf022a5d..72a89c8988e 100644 --- a/tests/modules/nf-core/samtools/depth/test.yml +++ b/tests/modules/nf-core/samtools/depth/test.yml @@ -1,4 +1,4 @@ -- name: samtools depth +- name: samtools depth test_samtools_depth command: nextflow run ./tests/modules/nf-core/samtools/depth -entry test_samtools_depth -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/depth/nextflow.config tags: - samtools/depth @@ -6,3 +6,4 @@ files: - path: output/samtools/test.tsv md5sum: aa27ebf69663ebded553b4d6538219d9 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/dict/test.yml b/tests/modules/nf-core/samtools/dict/test.yml index fb335dde526..a037744fc8a 100644 --- a/tests/modules/nf-core/samtools/dict/test.yml +++ b/tests/modules/nf-core/samtools/dict/test.yml @@ -1,8 +1,8 @@ - name: samtools dict test_samtools_dict command: nextflow run ./tests/modules/nf-core/samtools/dict -entry test_samtools_dict -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/dict/nextflow.config tags: - - samtools - samtools/dict + - samtools files: - path: output/samtools/genome.fasta.dict contains: diff --git a/tests/modules/nf-core/samtools/faidx/test.yml b/tests/modules/nf-core/samtools/faidx/test.yml index 7ad833de740..30690143446 100644 --- a/tests/modules/nf-core/samtools/faidx/test.yml +++ b/tests/modules/nf-core/samtools/faidx/test.yml @@ -1,17 +1,18 @@ - name: samtools faidx test_samtools_faidx - command: nextflow run ./tests/modules/nf-core/samtools/faidx -entry test_samtools_faidx -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/faidx -entry test_samtools_faidx -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/faidx/nextflow.config tags: - - samtools - samtools/faidx + - samtools files: - path: output/samtools/genome.fasta.fai md5sum: 9da2a56e2853dc8c0b86a9e7229c9fe5 - path: output/samtools/versions.yml + - name: samtools faidx test_samtools_faidx_bgzip - command: nextflow run ./tests/modules/nf-core/samtools/faidx -entry test_samtools_faidx_bgzip -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/faidx -entry test_samtools_faidx_bgzip -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/faidx/nextflow.config tags: - - samtools - samtools/faidx + - samtools files: - path: output/samtools/genome.fasta.gz.fai md5sum: 9da2a56e2853dc8c0b86a9e7229c9fe5 diff --git a/tests/modules/nf-core/samtools/fasta/test.yml b/tests/modules/nf-core/samtools/fasta/test.yml index 2707acdd173..0999ac2da66 100644 --- a/tests/modules/nf-core/samtools/fasta/test.yml +++ b/tests/modules/nf-core/samtools/fasta/test.yml @@ -9,7 +9,9 @@ - path: output/samtools/test_2.fasta.gz md5sum: 6ada09ce66f68b8732985e14aac1bf1f - path: output/samtools/test_other.fasta.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/test_singleton.fasta.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/versions.yml - name: samtools fasta test_samtools_fasta_interleave @@ -21,4 +23,5 @@ - path: output/samtools/test_interleaved.fasta.gz md5sum: 02d7f0389745d9d274d091cf8bf3b8a1 - path: output/samtools/test_other.fasta.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/fastq/test.yml b/tests/modules/nf-core/samtools/fastq/test.yml index e5af508d622..b09a56d0c39 100644 --- a/tests/modules/nf-core/samtools/fastq/test.yml +++ b/tests/modules/nf-core/samtools/fastq/test.yml @@ -9,7 +9,9 @@ - path: output/samtools/test_2.fastq.gz md5sum: 51e7a469b554de694799bec982fd722e - path: output/samtools/test_other.fastq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/test_singleton.fastq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/versions.yml - name: samtools fastq test_samtools_fastq_interleave @@ -21,4 +23,5 @@ - path: output/samtools/test_interleaved.fastq.gz md5sum: e591c48daad2c56638e5d6f21f1f71c5 - path: output/samtools/test_other.fastq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/fixmate/test.yml b/tests/modules/nf-core/samtools/fixmate/test.yml index 86c3f321dad..d8784319903 100644 --- a/tests/modules/nf-core/samtools/fixmate/test.yml +++ b/tests/modules/nf-core/samtools/fixmate/test.yml @@ -1,8 +1,9 @@ - name: samtools fixmate test_samtools_fixmate command: nextflow run ./tests/modules/nf-core/samtools/fixmate -entry test_samtools_fixmate -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/fixmate/nextflow.config tags: - - samtools - samtools/fixmate + - samtools files: - path: output/samtools/test.bam - md5sum: 37e679626580def1cce79acd38280aeb + md5sum: f0b0ab1c4c99ac05ce10eb4b8db36bb2 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/flagstat/test.yml b/tests/modules/nf-core/samtools/flagstat/test.yml index ad58ad5dc62..2386ba3a353 100644 --- a/tests/modules/nf-core/samtools/flagstat/test.yml +++ b/tests/modules/nf-core/samtools/flagstat/test.yml @@ -1,8 +1,9 @@ - name: samtools flagstat test_samtools_flagstat - command: nextflow run ./tests/modules/nf-core/samtools/flagstat -entry test_samtools_flagstat -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/flagstat/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/flagstat -entry test_samtools_flagstat -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/flagstat/nextflow.config tags: - - samtools/flagstat - samtools + - samtools/flagstat files: - path: output/samtools/test.flagstat md5sum: 4f7ffd1e6a5e85524d443209ac97d783 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/getrg/test.yml b/tests/modules/nf-core/samtools/getrg/test.yml index 272054a385b..ab329571664 100644 --- a/tests/modules/nf-core/samtools/getrg/test.yml +++ b/tests/modules/nf-core/samtools/getrg/test.yml @@ -1,8 +1,9 @@ - name: samtools getrg test_samtools_getrg - command: nextflow run ./tests/modules/nf-core/samtools/getrg -entry test_samtools_getrg -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/getrg/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/getrg -entry test_samtools_getrg -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/getrg/nextflow.config tags: - - samtools/getrg - samtools + - samtools/getrg files: - path: output/samtools/readgroups.txt md5sum: 7b1d2d10a82a0c4fa6b22673559e41f6 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/idxstats/test.yml b/tests/modules/nf-core/samtools/idxstats/test.yml index 8c596c21bb0..d2c6f94d2ab 100644 --- a/tests/modules/nf-core/samtools/idxstats/test.yml +++ b/tests/modules/nf-core/samtools/idxstats/test.yml @@ -1,8 +1,9 @@ - name: samtools idxstats test_samtools_idxstats - command: nextflow run ./tests/modules/nf-core/samtools/idxstats -entry test_samtools_idxstats -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/idxstats/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/idxstats -entry test_samtools_idxstats -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/idxstats/nextflow.config tags: - samtools/idxstats - samtools files: - path: output/samtools/test.idxstats md5sum: df60a8c8d6621100d05178c93fb053a2 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/index/test.yml b/tests/modules/nf-core/samtools/index/test.yml index 496a301c6cd..6adc3e4b9ce 100644 --- a/tests/modules/nf-core/samtools/index/test.yml +++ b/tests/modules/nf-core/samtools/index/test.yml @@ -1,26 +1,29 @@ - name: samtools index test_samtools_index_bai command: nextflow run ./tests/modules/nf-core/samtools/index -entry test_samtools_index_bai -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/index/nextflow.config tags: - - samtools - samtools/index + - samtools files: - path: output/samtools/test.paired_end.sorted.bam.bai md5sum: 704c10dd1326482448ca3073fdebc2f4 + - path: output/samtools/versions.yml - name: samtools index test_samtools_index_crai command: nextflow run ./tests/modules/nf-core/samtools/index -entry test_samtools_index_crai -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/index/nextflow.config tags: - - samtools - samtools/index + - samtools files: - path: output/samtools/test.paired_end.recalibrated.sorted.cram.crai md5sum: 14bc3bd5c89cacc8f4541f9062429029 + - path: output/samtools/versions.yml - name: samtools index test_samtools_index_csi command: nextflow run ./tests/modules/nf-core/samtools/index -entry test_samtools_index_csi -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/index/nextflow.config tags: - - samtools - samtools/index + - samtools files: - path: output/samtools/test.paired_end.sorted.bam.csi md5sum: 8d63373007553e74d823fc2b9cbcf84d + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/markdup/nextflow.config b/tests/modules/nf-core/samtools/markdup/nextflow.config index 35509b17fcb..0d7fb4f5597 100644 --- a/tests/modules/nf-core/samtools/markdup/nextflow.config +++ b/tests/modules/nf-core/samtools/markdup/nextflow.config @@ -4,18 +4,21 @@ process { withName: SAMTOOLS_COLLATE { ext.prefix = { "${meta.id}.collate" } + publishDir = [ enabled: false ] } withName: SAMTOOLS_FIXMATE { ext.prefix = { "${meta.id}.fixmate" } + publishDir = [ enabled: false ] } withName: SAMTOOLS_SORT { ext.prefix = { "${meta.id}.sorted" } + publishDir = [ enabled: false ] } withName: SAMTOOLS_MARKDUP { ext.prefix = { "${meta.id}.markdup" } - } - + } + } diff --git a/tests/modules/nf-core/samtools/markdup/test.yml b/tests/modules/nf-core/samtools/markdup/test.yml index ee5e48353f3..0a365fa78f5 100644 --- a/tests/modules/nf-core/samtools/markdup/test.yml +++ b/tests/modules/nf-core/samtools/markdup/test.yml @@ -1,8 +1,8 @@ - name: samtools markdup test_samtools_markdup - command: nextflow run ./tests/modules/nf-core/samtools/markdup -entry test_samtools_markdup -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/markdup/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/markdup -entry test_samtools_markdup -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/markdup/nextflow.config tags: - samtools/markdup - samtools files: - path: output/samtools/test.markdup.bam - md5sum: 2febc01b4b906c745bbe45645c0a82bc + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/merge/test.yml b/tests/modules/nf-core/samtools/merge/test.yml index 2b8109d1370..524065d3250 100644 --- a/tests/modules/nf-core/samtools/merge/test.yml +++ b/tests/modules/nf-core/samtools/merge/test.yml @@ -1,24 +1,27 @@ - name: samtools merge test_samtools_merge command: nextflow run ./tests/modules/nf-core/samtools/merge -entry test_samtools_merge -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/merge/nextflow.config tags: - - samtools - samtools/merge + - samtools files: - path: output/samtools/test.bam + - path: output/samtools/versions.yml - name: samtools merge test_samtools_merge_cram command: nextflow run ./tests/modules/nf-core/samtools/merge -entry test_samtools_merge_cram -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/merge/nextflow.config tags: - - samtools - samtools/merge + - samtools files: - path: output/samtools/test.cram + - path: output/samtools/versions.yml - name: samtools merge test_samtools_merge_single_file command: nextflow run ./tests/modules/nf-core/samtools/merge -entry test_samtools_merge_single_file -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/merge/nextflow.config tags: - - samtools - samtools/merge + - samtools files: - path: output/samtools/test.bam - md5sum: e1e1fd92045400970df9e0e0f59e8fbe + md5sum: 66cfd2aba69c521e228c5e9fca78c2a7 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/mpileup/test.yml b/tests/modules/nf-core/samtools/mpileup/test.yml index 7f36fa02c85..cb1954520c3 100644 --- a/tests/modules/nf-core/samtools/mpileup/test.yml +++ b/tests/modules/nf-core/samtools/mpileup/test.yml @@ -1,18 +1,18 @@ - name: samtools mpileup test_samtools_mpileup - command: nextflow run ./tests/modules/nf-core/samtools/mpileup -entry test_samtools_mpileup -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/mpileup -entry test_samtools_mpileup -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/mpileup/nextflow.config tags: - - samtools - samtools/mpileup + - samtools files: - path: output/samtools/test.mpileup.gz - md5sum: 5c0b82e3db1657d14160bf53aba15ffe + md5sum: 197b10560375717b7e0520065944b72b - path: output/samtools/versions.yml - name: samtools mpileup test_samtools_mpileup_intervals - command: nextflow run ./tests/modules/nf-core/samtools/mpileup -entry test_samtools_mpileup_intervals -c ./tests/config/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/mpileup -entry test_samtools_mpileup_intervals -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/mpileup/nextflow.config tags: - - samtools - samtools/mpileup + - samtools files: - path: output/samtools/test.mpileup.gz md5sum: d0538ec23b294245748ced92484b9a8d diff --git a/tests/modules/nf-core/samtools/sort/test.yml b/tests/modules/nf-core/samtools/sort/test.yml index e7197091e99..368b193ca4e 100644 --- a/tests/modules/nf-core/samtools/sort/test.yml +++ b/tests/modules/nf-core/samtools/sort/test.yml @@ -1,8 +1,9 @@ -- name: samtools sort +- name: samtools sort test_samtools_sort command: nextflow run ./tests/modules/nf-core/samtools/sort -entry test_samtools_sort -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/sort/nextflow.config tags: - - samtools - samtools/sort + - samtools files: - path: output/samtools/test.sorted.bam - md5sum: a179c8f8acabce6ff950745b0364ebc4 + md5sum: 552279cf91c31d6dba35e6adc243b182 + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/stats/test.yml b/tests/modules/nf-core/samtools/stats/test.yml index c319146d7b6..03a1664dcba 100644 --- a/tests/modules/nf-core/samtools/stats/test.yml +++ b/tests/modules/nf-core/samtools/stats/test.yml @@ -1,17 +1,19 @@ - name: samtools stats test_samtools_stats - command: nextflow run ./tests/modules/nf-core/samtools/stats -entry test_samtools_stats -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/stats/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/stats -entry test_samtools_stats -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/stats/nextflow.config tags: - samtools/stats - samtools files: - path: output/samtools/test.stats - md5sum: 37c42490484b79ac70034be80cee0e62 + md5sum: 6e768486d5df0257351c5419a79f9c9b + - path: output/samtools/versions.yml - name: samtools stats test_samtools_stats_cram - command: nextflow run ./tests/modules/nf-core/samtools/stats -entry test_samtools_stats_cram -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/stats/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/stats -entry test_samtools_stats_cram -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/stats/nextflow.config tags: - samtools/stats - samtools files: - path: output/samtools/test.stats - md5sum: 08cf71c4b4b095cdc50aabe2bfc52299 + md5sum: 7c9ee5747793cceb9d6f4d733345641a + - path: output/samtools/versions.yml diff --git a/tests/modules/nf-core/samtools/view/test.yml b/tests/modules/nf-core/samtools/view/test.yml index e8f1caa6fbe..9dce5371b45 100644 --- a/tests/modules/nf-core/samtools/view/test.yml +++ b/tests/modules/nf-core/samtools/view/test.yml @@ -1,56 +1,62 @@ - name: samtools view test_samtools_view - command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config tags: - - samtools/view - samtools + - samtools/view files: - path: output/samtools/test.bam - md5sum: 3d0ebcd0c08721d56088f23cf358b612 + md5sum: 0bc2866a80a4c3ccf7561148a6832d3e + - path: output/samtools/versions.yml - name: samtools view test_samtools_view_cram - command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view_cram -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view_cram -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config tags: - - samtools/view - samtools + - samtools/view files: - path: output/samtools/test.cram + - path: output/samtools/versions.yml - name: samtools view test_samtools_view_convert - command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view_convert -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view_convert -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config tags: - - samtools/view - samtools + - samtools/view files: - path: output/samtools/test.bam - md5sum: f8dfadd910aeb742c84703c7efb4af0e + md5sum: 252071e23db029612a1d474c75e9e4dc + - path: output/samtools/versions.yml - name: samtools view test_samtools_view_index - command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view_index -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view_index -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config tags: - - samtools/view - samtools + - samtools/view files: - path: output/samtools/test.bam - md5sum: e0cfe6a07ddd5b24458ff180db22ca51 + md5sum: 3fb661c12f744b7ccb1d30484eb12e61 - path: output/samtools/test.bam.csi - md5sum: 1b47ef166c280537d0dc14b94ccb966f + md5sum: 3d91b43b2db64d072c9e5e15de675479 + - path: output/samtools/versions.yml - name: samtools view test_samtools_view_filter - command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view_filter -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view_filter -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config tags: - - samtools/view - samtools + - samtools/view files: - path: output/samtools/test.bam - md5sum: 3a1563532853ccc1b46a086258b8efbb + md5sum: 7c5980f1990d6170850df0f66fbe14d0 - path: output/samtools/test.bam.csi - md5sum: b1d688576e59529271333aa50b3ad3ae + md5sum: 91bd78462b49c6f85ae7e6ce335683d0 + - path: output/samtools/versions.yml - name: samtools view test_samtools_view_stubs - command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view_stubs -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config + command: nextflow run ./tests/modules/nf-core/samtools/view -entry test_samtools_view_stubs -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/samtools/view/nextflow.config tags: - - samtools/view - samtools + - samtools/view files: - path: output/samtools/test.bam - md5sum: 3d0ebcd0c08721d56088f23cf358b612 + md5sum: 0bc2866a80a4c3ccf7561148a6832d3e + - path: output/samtools/versions.yml diff --git a/tests/subworkflows/nf-core/bam_markduplicates_picard/test.yml b/tests/subworkflows/nf-core/bam_markduplicates_picard/test.yml index 9268b6cb6a9..2417db22570 100644 --- a/tests/subworkflows/nf-core/bam_markduplicates_picard/test.yml +++ b/tests/subworkflows/nf-core/bam_markduplicates_picard/test.yml @@ -21,7 +21,7 @@ - path: output/samtools/test.idxstats md5sum: df60a8c8d6621100d05178c93fb053a2 - path: output/samtools/test.stats - md5sum: 3987df9de3925fa047d9ed895d40c594 + md5sum: f3f0e5aad236aae678ac5361b529a664 - name: bam_markduplicates_picard test_bam_markduplicates_picard_cram command: nextflow run ./tests/subworkflows/nf-core/bam_markduplicates_picard -entry test_bam_markduplicates_picard_cram -c ./tests/config/nextflow.config @@ -46,4 +46,4 @@ - path: output/samtools/test.idxstats md5sum: e179601fa7b8ebce81ac3765206f6c15 - path: output/samtools/test.stats - md5sum: a7a9bd450f984f4e13d6de7ee67101fe + md5sum: 1eb0987d2c8682c359977e7195527b4d diff --git a/tests/subworkflows/nf-core/bam_split_by_region/test.yml b/tests/subworkflows/nf-core/bam_split_by_region/test.yml index 18e9b705ec1..d0498742218 100644 --- a/tests/subworkflows/nf-core/bam_split_by_region/test.yml +++ b/tests/subworkflows/nf-core/bam_split_by_region/test.yml @@ -10,26 +10,26 @@ - path: output/samtools/test.paired_end.markduplicates.sorted.bam.bai md5sum: 15f1723181368484a9c783323b6699e5 - path: output/samtools/test2_chr21:1-23354000.bam - md5sum: 8a748b4c5f4de1fb608d11b5f8a0ab7a + md5sum: 1286f2e37ead72c89a6d46dd3550b5cf - path: output/samtools/test2_chr21:1-23354000.bam.bai - md5sum: f0a4b60f07dc18947315061a4f9f7290 + md5sum: b344287b0d56c56dacd819a388783af4 - path: output/samtools/test2_chr21:24132499-24910998.bam - md5sum: 109ae50864a96f1860590c4e3882bdaf + md5sum: d3f8e65b43b15f19813177206d5151df - path: output/samtools/test2_chr21:24132499-24910998.bam.bai md5sum: 0d76977b2e36046cc176112776c5fa4e - path: output/samtools/test2_chr21:25689497-46709983.bam - md5sum: 4ea99c517c4e1fc86ce3cb005494cf98 + md5sum: 3faa0c1d5219b9638af66bb89d27af6a - path: output/samtools/test2_chr21:25689497-46709983.bam.bai - md5sum: d927e6f018561909fdfd34d5baba059a + md5sum: d0dfe65baf9ebc857c95fe4bad1f5f9f - path: output/samtools/test_chr21:1-23354000.bam - md5sum: 2d9310c901a86ec271f4b60413318a85 + md5sum: c2392dc8e421b5a5bb6344a8aee3df01 - path: output/samtools/test_chr21:1-23354000.bam.bai - md5sum: f0a4b60f07dc18947315061a4f9f7290 + md5sum: adbf2a0b95a947c055c219f0d950add0 - path: output/samtools/test_chr21:24132499-24910998.bam - md5sum: d15c78526767d6ab1474582e4cb99fb5 + md5sum: 7e4f52bdc87c726369a962beb8153a4e - path: output/samtools/test_chr21:24132499-24910998.bam.bai md5sum: 0d76977b2e36046cc176112776c5fa4e - path: output/samtools/test_chr21:25689497-46709983.bam - md5sum: 148fbebebdacba0547993fe5d381baa7 + md5sum: c46656090a5a322ad68cc6b43cd6c84f - path: output/samtools/test_chr21:25689497-46709983.bam.bai - md5sum: 3644ebe54d28cd9ac3d5c9217e0dc45d + md5sum: 50c7f05de7e4ea77d8400d5890466480 diff --git a/tests/subworkflows/nf-core/bam_stats_samtools/test.yml b/tests/subworkflows/nf-core/bam_stats_samtools/test.yml index 2fdff42844b..c5f8cf2f250 100644 --- a/tests/subworkflows/nf-core/bam_stats_samtools/test.yml +++ b/tests/subworkflows/nf-core/bam_stats_samtools/test.yml @@ -13,7 +13,7 @@ - path: output/samtools/test.idxstats md5sum: 613e048487662c694aa4a2f73ca96a20 - path: output/samtools/test.stats - md5sum: 6cc38479958867fed59a3d49a75ba2e9 + md5sum: 51bed22fd8a090041d9fee548e796db4 - name: bam_stats_samtools test_bam_stats_samtools_paired_end command: nextflow run ./tests/subworkflows/nf-core/bam_stats_samtools -entry test_bam_stats_samtools_paired_end -c ./tests/config/nextflow.config @@ -30,7 +30,7 @@ - path: output/samtools/test.idxstats md5sum: df60a8c8d6621100d05178c93fb053a2 - path: output/samtools/test.stats - md5sum: 8f50436a619223346b57fa9507f3e768 + md5sum: 307e96e39c8034bf39b3dc272ac543a4 - name: bam_stats_samtools test_bam_stats_samtools_paired_end_cram command: nextflow run ./tests/subworkflows/nf-core/bam_stats_samtools -entry test_bam_stats_samtools_paired_end_cram -c ./tests/config/nextflow.config @@ -47,4 +47,4 @@ - path: output/samtools/test.idxstats md5sum: e179601fa7b8ebce81ac3765206f6c15 - path: output/samtools/test.stats - md5sum: c3f46e85ff91b20938d171d837a0d08f + md5sum: 33051d4e251dad3da1db2d4d0ed0b1d1 diff --git a/tests/subworkflows/nf-core/fastq_align_bwaaln/test.yml b/tests/subworkflows/nf-core/fastq_align_bwaaln/test.yml index ee5d6a8064d..516718bb068 100644 --- a/tests/subworkflows/nf-core/fastq_align_bwaaln/test.yml +++ b/tests/subworkflows/nf-core/fastq_align_bwaaln/test.yml @@ -34,7 +34,7 @@ - path: output/bwa/test.2.sai md5sum: b4f185d9b4cb256dd5c377070a536124 - path: output/bwa/test.bam - md5sum: 3d650b76c7a80b5e6ff672a01e2a6bfa + md5sum: a72985b0bf6a02c65d1ac415f1081c6e - path: output/samtools/test.bam.bai md5sum: ef100143d24336c57b66ac9a462e6373 @@ -55,7 +55,7 @@ - path: output/bwa/test.2.sai md5sum: b4f185d9b4cb256dd5c377070a536124 - path: output/bwa/test.bam - md5sum: 3d650b76c7a80b5e6ff672a01e2a6bfa + md5sum: a72985b0bf6a02c65d1ac415f1081c6e - path: output/bwa/test2.bam md5sum: 84bac6c61a24b671fce06b841ee8cdcf - path: output/bwa/test2.sai diff --git a/tests/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/test.yml b/tests/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/test.yml index 17a4eb56dab..deccb65fc93 100644 --- a/tests/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/test.yml +++ b/tests/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/test.yml @@ -55,7 +55,7 @@ - path: output/groupreadsbyumi/test_single_umi_histogram.txt md5sum: 01902e7151d17bc77e962421810178f3 - path: output/sortbam/test_single.bam - md5sum: a3abd1191c1c37ffdf86ff9d758cd00c + md5sum: f1671d59668e68917ef30bb217b14319 - path: output/zipperbams/test_single_zipped.bam md5sum: f9bf29d115af8ac425088656945bc8f9 @@ -92,7 +92,7 @@ - path: output/bam2fastq/test_duplex_singleton.fastq.gz md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/bamfilter/test_duplex.bam - md5sum: 6e6fe2b97a62e242a6540a24d1099f21 + md5sum: 87a8a7375261874540a55fc7a68579de - path: output/bwamem1/bwa/genome.amb md5sum: 1891c1de381b3a96d4e72f590fde20c1 - path: output/bwamem1/bwa/genome.ann @@ -114,10 +114,10 @@ - path: output/filterconsensus/test_duplex_consensus_filtered.bam md5sum: e8fda1dc380cd97d628e87df1e194a27 - path: output/groupreadsbyumi/test_duplex_umi-grouped.bam - md5sum: 359f4fbc13557dd004a0279c118d158b + md5sum: c0de6fb61688ae728635d9a1ba75ebed - path: output/groupreadsbyumi/test_duplex_umi_histogram.txt md5sum: 4b77710be404802b83011c5e44b20aca - path: output/sortbam/test_duplex.bam - md5sum: 2ea265b60643364c65c08e449991288b + md5sum: 1a607833a1e543982ed99ae9ee47df74 - path: output/zipperbams/test_duplex_zipped.bam md5sum: b2266d3fa9e1b751c3f2a8b666bad522 From 64350ee989d58a838c70ccd2e7c3266b0a7d04cf Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Tue, 25 Apr 2023 09:21:20 +0200 Subject: [PATCH 096/120] Kmcp compute (#3166) * Add kmcp/compute module * Prettier * Remove unnecessary input variables * Add tests for directory as input * Remove md5 * Apply review suggestions * Correct yml format * Update modules/nf-core/kmcp/compute/meta.yml Co-authored-by: James A. Fellows Yates * Update modules/nf-core/kmcp/compute/meta.yml Co-authored-by: James A. Fellows Yates * Update modules/nf-core/kmcp/compute/meta.yml Co-authored-by: James A. Fellows Yates * Update modules/nf-core/kmcp/compute/main.nf Co-authored-by: James A. Fellows Yates * Update modules/nf-core/kmcp/compute/meta.yml Co-authored-by: James A. Fellows Yates --------- Co-authored-by: James A. Fellows Yates --- modules/nf-core/kmcp/compute/main.nf | 38 ++++++++++++++ modules/nf-core/kmcp/compute/meta.yml | 52 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/nf-core/kmcp/compute/main.nf | 27 ++++++++++ .../nf-core/kmcp/compute/nextflow.config | 9 ++++ tests/modules/nf-core/kmcp/compute/test.yml | 25 +++++++++ 6 files changed, 155 insertions(+) create mode 100644 modules/nf-core/kmcp/compute/main.nf create mode 100644 modules/nf-core/kmcp/compute/meta.yml create mode 100644 tests/modules/nf-core/kmcp/compute/main.nf create mode 100644 tests/modules/nf-core/kmcp/compute/nextflow.config create mode 100644 tests/modules/nf-core/kmcp/compute/test.yml diff --git a/modules/nf-core/kmcp/compute/main.nf b/modules/nf-core/kmcp/compute/main.nf new file mode 100644 index 00000000000..404a71f2b02 --- /dev/null +++ b/modules/nf-core/kmcp/compute/main.nf @@ -0,0 +1,38 @@ +process KMCP_COMPUTE { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::kmcp=0.9.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/kmcp:0.9.1--h9ee0642_0': + 'quay.io/biocontainers/kmcp:0.9.1--h9ee0642_0' }" + + input: + tuple val(meta), path(sequences) + + output: + tuple val(meta), path("${prefix}/*") , emit: outdir + tuple val(meta), path("${prefix}/_info.txt") , emit: info + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def input = sequences.isDirectory()? "--in-dir ${sequences}" : "${sequences}" + """ + kmcp \\ + compute \\ + $args \\ + --threads $task.cpus \\ + --out-dir ${prefix}/ \\ + $input + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + kmcp: \$(echo \$(kmcp version 2>&1) | sed -n 1p | sed 's/^.*kmcp v//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/kmcp/compute/meta.yml b/modules/nf-core/kmcp/compute/meta.yml new file mode 100644 index 00000000000..972be872581 --- /dev/null +++ b/modules/nf-core/kmcp/compute/meta.yml @@ -0,0 +1,52 @@ +name: "kmcp_compute" +description: Generate k-mers (sketches) from FASTA/Q sequences +keywords: + - metagenomics + - classify + - taxonomic profiling + - fastq + - sequences + - kmers +tools: + - "kmcp": + description: "Accurate metagenomic profiling of both prokaryotic and viral populations by pseudo-mapping" + homepage: "https://github.com/shenwei356/kmcp" + documentation: "https://github.com/shenwei356/kmcp#documents" + tool_dev_url: "https://github.com/shenwei356/kmcp" + doi: "10.1093/bioinformatics/btac845" + licence: "['MIT']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - sequences: + type: + - file + - directory + description: fasta file, or a directory containing FASTA files + pattern: "**/*.{fa,fa.gz,fasta,fasta.gz,fna,fna.gz}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - outdir: + type: directory + description: Output directory containing all .unik files and a summary file in .txt format. Every .unik file contains the sequence/reference ID,chunk index, number of chunks, and genome size of reference. + pattern: "*/" + - info: + type: file + description: Summary file that is generated for later use + pattern: "*_info.txt" + +authors: + - "@sofstam" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 8e04884e88b..15fc8193c6b 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1913,6 +1913,10 @@ kleborate: - modules/nf-core/kleborate/** - tests/modules/nf-core/kleborate/** +kmcp/compute: + - modules/nf-core/kmcp/compute/** + - tests/modules/nf-core/kmcp/compute/** + kofamscan: - modules/nf-core/kofamscan/** - tests/modules/nf-core/kofamscan/** diff --git a/tests/modules/nf-core/kmcp/compute/main.nf b/tests/modules/nf-core/kmcp/compute/main.nf new file mode 100644 index 00000000000..73679ebae12 --- /dev/null +++ b/tests/modules/nf-core/kmcp/compute/main.nf @@ -0,0 +1,27 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR } from '../../../../../modules/nf-core/untar/main.nf' +include { KMCP_COMPUTE } from '../../../../../modules/nf-core/kmcp/compute/main.nf' + +workflow test_kmcp_compute { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + KMCP_COMPUTE ( input ) +} + +workflow test_kmcp_compute_directory { + +input = UNTAR ( [ + [ id:'test' ], + file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/kmcp.tar.gz", checkIfExists: true) + ]).untar + +KMCP_COMPUTE ( input ) + +} diff --git a/tests/modules/nf-core/kmcp/compute/nextflow.config b/tests/modules/nf-core/kmcp/compute/nextflow.config new file mode 100644 index 00000000000..63d0b9db9ca --- /dev/null +++ b/tests/modules/nf-core/kmcp/compute/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: KMCP_COMPUTE { + ext.prefix = { "${meta.id}_" } + ext.args = { "--out-dir ${task.ext.prefix}" } + } +} diff --git a/tests/modules/nf-core/kmcp/compute/test.yml b/tests/modules/nf-core/kmcp/compute/test.yml new file mode 100644 index 00000000000..b84da34ef19 --- /dev/null +++ b/tests/modules/nf-core/kmcp/compute/test.yml @@ -0,0 +1,25 @@ +- name: kmcp compute test_kmcp_compute + command: nextflow run ./tests/modules/nf-core/kmcp/compute -entry test_kmcp_compute -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/kmcp/compute/nextflow.config + tags: + - kmcp/compute + - kmcp + files: + - path: output/kmcp/test_/_info.txt + contains: ["#path name chunkIdx idxNum genomeSize kmers"] + - path: output/kmcp/test_/genome.fasta.unik + - path: output/kmcp/versions.yml + +- name: kmcp compute test_kmcp_compute_directory + command: nextflow run ./tests/modules/nf-core/kmcp/compute -entry test_kmcp_compute_directory -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/kmcp/compute/nextflow.config + tags: + - kmcp/compute + - kmcp + files: + - path: output/kmcp/test_/_info.txt + contains: ["#path name chunkIdx idxNum genomeSize kmers"] + - path: output/kmcp/test_/genome.fasta.unik + - path: output/kmcp/test_/transcriptome.fasta.unik + - path: output/kmcp/versions.yml + - path: output/untar/test/genome.fasta + - path: output/untar/test/transcriptome.fasta + - path: output/untar/versions.yml From 8bba1855626e81bddec25b2bdcb8b96fa9db0b97 Mon Sep 17 00:00:00 2001 From: Joan Gaztelu <64015341+LlaneroHiboreo@users.noreply.github.com> Date: Tue, 25 Apr 2023 12:27:42 +0200 Subject: [PATCH 097/120] SnpSift Annotation module: Issue #3321 (#3322) * local update * celan * upload * pretty * update prettier * update * review_1 --- modules/nf-core/snpsift/annotate/main.nf | 46 ++++++++++++++ modules/nf-core/snpsift/annotate/meta.yml | 60 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../modules/nf-core/snpsift/annotate/main.nf | 38 ++++++++++++ .../nf-core/snpsift/annotate/nextflow.config | 5 ++ .../modules/nf-core/snpsift/annotate/test.yml | 18 ++++++ 6 files changed, 171 insertions(+) create mode 100644 modules/nf-core/snpsift/annotate/main.nf create mode 100644 modules/nf-core/snpsift/annotate/meta.yml create mode 100644 tests/modules/nf-core/snpsift/annotate/main.nf create mode 100644 tests/modules/nf-core/snpsift/annotate/nextflow.config create mode 100644 tests/modules/nf-core/snpsift/annotate/test.yml diff --git a/modules/nf-core/snpsift/annotate/main.nf b/modules/nf-core/snpsift/annotate/main.nf new file mode 100644 index 00000000000..4737b92f79b --- /dev/null +++ b/modules/nf-core/snpsift/annotate/main.nf @@ -0,0 +1,46 @@ +process SNPSIFT_ANNOTATE { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::snpsift=5.1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/snpsift:5.1d--hdfd78af_0' : + 'quay.io/biocontainers/snpsift:5.1d--hdfd78af_0' }" + + input: + tuple val(meta), path(vcf), path(vcf_tbi) + tuple val(meta2), path(database), path(dbs_tbi)// TBI files are optional (use when compressed VCF file) + + output: + tuple val(meta), path("*.vcf"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + SnpSift \\ + annotate \\ + $args \\ + $database \\ + $vcf > ${prefix}.vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + snpsift: \$( echo \$(SnpSift split -h 2>&1) | sed 's/^.*version //' | sed 's/(.*//' | sed 's/t//g' ) + END_VERSIONS + """ + + stub: + """ + touch ${prefix}.vcf + cat <<-END_VERSIONS > versions.yml + "${task.process}": + snpsift: \$( echo \$(SnpSift split -h 2>&1) | sed 's/^.*version //' | sed 's/(.*//' | sed 's/t//g' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/snpsift/annotate/meta.yml b/modules/nf-core/snpsift/annotate/meta.yml new file mode 100644 index 00000000000..f6269bb75d1 --- /dev/null +++ b/modules/nf-core/snpsift/annotate/meta.yml @@ -0,0 +1,60 @@ +name: "snpsift_annotate" +description: +keywords: + - variant calling + - annotate + - snpsift + - cancer genomics +tools: + - snpsift: + description: SnpSift is a toolbox that allows you to filter and manipulate annotated files + homepage: https://pcingola.github.io/SnpEff/ss_introduction/ + documentation: https://pcingola.github.io/SnpEff/ss_introduction/ + tool_dev_url: https://github.com/pcingola/SnpEff + doi: "10.3389/fgene.2012.00035" + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information regarding vcf file provided + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file + pattern: "*.{vcf, vcf.gz}" + - vcf_tbi: + type: file + description: Tabix file for compressed vcf provided + pattern: "*.{tbi}" + - meta2: + type: map + description: | + Groovy map containing sample information regarding database provided + - database: + type: file + description: Database for use to annotate + pattern: "*.{vcf/vcf.gz}" + - dbs_tbi: + type: file + description: Tabix file for compressed database provided + pattern: "*.{tbi}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + # + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf: + type: file + description: Variant Calling File annotated + pattern: "*.{vcf}" + +authors: + - "@LlaneroHiboreo" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 15fc8193c6b..044b480a7a9 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3192,6 +3192,10 @@ snpeff/snpeff: - modules/nf-core/snpeff/snpeff/** - tests/modules/nf-core/snpeff/snpeff/** +snpsift/annotate: + - modules/nf-core/snpsift/annotate/** + - tests/modules/nf-core/snpsift/annotate/** + snpsift/split: - modules/nf-core/snpsift/split/** - tests/modules/nf-core/snpsift/split/** diff --git a/tests/modules/nf-core/snpsift/annotate/main.nf b/tests/modules/nf-core/snpsift/annotate/main.nf new file mode 100644 index 00000000000..edeaa77a3db --- /dev/null +++ b/tests/modules/nf-core/snpsift/annotate/main.nf @@ -0,0 +1,38 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SNPSIFT_ANNOTATE } from '../../../../../modules/nf-core/snpsift/annotate/main.nf' + +workflow test_snpsift_annotate { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true) + ] + + input_dbs = [ + [ id:'databases'], + file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) + ] + + SNPSIFT_ANNOTATE ( input, input_dbs ) +} + +workflow test_snpsift_annotate_uncompressed{ + input = [ + [ id:'tester', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + [] + ] + + input_dbs = [ + [id:'databases'], + file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) + ] + + SNPSIFT_ANNOTATE ( input, input_dbs ) +} \ No newline at end of file diff --git a/tests/modules/nf-core/snpsift/annotate/nextflow.config b/tests/modules/nf-core/snpsift/annotate/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/snpsift/annotate/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/snpsift/annotate/test.yml b/tests/modules/nf-core/snpsift/annotate/test.yml new file mode 100644 index 00000000000..7fe269bd5b2 --- /dev/null +++ b/tests/modules/nf-core/snpsift/annotate/test.yml @@ -0,0 +1,18 @@ +- name: snpsift annotate test_snpsift_annotate + command: nextflow run ./tests/modules/nf-core/snpsift/annotate -entry test_snpsift_annotate -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/snpsift/annotate/nextflow.config + tags: + - snpsift/annotate + files: + - path: output/snpsift/test.vcf + md5sum: cef984dd38a9a776cb1ec6ec13c8eba2 + - path: output/snpsift/versions.yml + md5sum: e3e47f79ee217195e2217355835b61e1 +- name: snpsift annotate test_snpsift_annotate_uncompressed + command: nextflow run ./tests/modules/nf-core/snpsift/annotate -entry test_snpsift_annotate_uncompressed -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/snpsift/annotate/nextflow.config + tags: + - snpsift/annotate + files: + - path: output/snpsift/tester.vcf + md5sum: 3361a7242c22a72866e4c876a96e8084 + - path: output/snpsift/versions.yml + md5sum: 481a03ca267ac2e4aefcce320af4a68c From 938bbea1901d2f27a15390c3b14c081ee1df2e41 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Tue, 25 Apr 2023 14:40:35 +0200 Subject: [PATCH 098/120] Fix when not creating index with CRAM (#3324) --- modules/nf-core/gatk4/markduplicates/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/gatk4/markduplicates/main.nf b/modules/nf-core/gatk4/markduplicates/main.nf index d08a1fb5576..2cd0b121bd3 100644 --- a/modules/nf-core/gatk4/markduplicates/main.nf +++ b/modules/nf-core/gatk4/markduplicates/main.nf @@ -45,7 +45,7 @@ process GATK4_MARKDUPLICATES { $args - if [[ ${prefix} == *.cram ]]; then + if [[ ${prefix} == *.cram ]]&&[[ -f ${prefix}.bai ]]; then mv ${prefix}.bai ${prefix}.crai fi From c3c156e83e228c6970e4ee36afc5f91485be4636 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Wed, 26 Apr 2023 09:19:00 +0200 Subject: [PATCH 099/120] Purecn/intervalfile (#3127) * Set up nf-core template for purecn/intervalfile module * Initial (draft) version of the purecn/intervalfile module * Fix type for the genome parameter * Fix duplicate entry * Use existing test data (WIP) * Adjustments: remove meta, remove hardcoded paths, mark optional outputs * Adjust test data (tested locally with a SIF image) * Final adjustment to the module It now runs and tests pass with a local Singularity image. It now needs the blocker issues (see TODO) to be solved. * Adjust output naming as per nf-core guidelines * Specify conda dependencies Note that it won't work properly until the bioconda-recipe PR is approved and merged. * Add missing package (for annotation) * Fix hg19 package name * Attempt to detect the R library path (for conda based installs) * Change syntax to see if Nextflow is happy * Fix syntax * Fix formatting This should (hopefully!) fix the conda tests. * Add the correct container * Removed TODOs * Fix typo * Address review questions - Add a meta2 map - Add stubs - Do not hardcode output files * Use a better name for meta2 * Whitespace --; * Fix unqualified value * Fix output test file * Address the second round of review suggestions * Address more review comments * Add meta to outputs * Move VERSION inside `script` and `stub` following best practices --------- Co-authored-by: aldosr Co-authored-by: Aldo Sergi <50989854+aldosr@users.noreply.github.com> --- modules/nf-core/purecn/intervalfile/main.nf | 60 +++++++++++++++++ modules/nf-core/purecn/intervalfile/meta.yml | 65 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../nf-core/purecn/intervalfile/main.nf | 17 +++++ .../purecn/intervalfile/nextflow.config | 5 ++ .../nf-core/purecn/intervalfile/test.yml | 10 +++ 6 files changed, 161 insertions(+) create mode 100644 modules/nf-core/purecn/intervalfile/main.nf create mode 100644 modules/nf-core/purecn/intervalfile/meta.yml create mode 100644 tests/modules/nf-core/purecn/intervalfile/main.nf create mode 100644 tests/modules/nf-core/purecn/intervalfile/nextflow.config create mode 100644 tests/modules/nf-core/purecn/intervalfile/test.yml diff --git a/modules/nf-core/purecn/intervalfile/main.nf b/modules/nf-core/purecn/intervalfile/main.nf new file mode 100644 index 00000000000..06ff37cbc64 --- /dev/null +++ b/modules/nf-core/purecn/intervalfile/main.nf @@ -0,0 +1,60 @@ +process PURECN_INTERVALFILE { + tag "${meta.id}" + label 'process_low' + + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + conda "bioconda::bioconductor-purecn=2.4.0 bioconda::bioconductor-txdb.hsapiens.ucsc.hg38.knowngene=3.16.0 bioconductor-txdb.hsapiens.ucsc.hg19.knowngene=3.2.2 bioconda::bioconductor-org.hs.eg.db=3.16.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-582ac26068889091d5e798347c637f8208d77a71:a29c64a63498b1ee8b192521fdf6ed3c65506994-0': + 'quay.io/biocontainers/mulled-v2-582ac26068889091d5e798347c637f8208d77a71:a29c64a63498b1ee8b192521fdf6ed3c65506994-0' }" + + input: + tuple val(meta), path(target_bed) + tuple val(meta2), path(fasta) + val genome + + output: + tuple val(meta), path("*.txt"), emit: txt + // Only produced if --export is used + tuple val(meta), path("*.bed"), emit: bed, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '2.4.0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + + """ + library_path=\$(Rscript -e 'cat(.libPaths(), sep = "\\n")') + Rscript "\$library_path"/PureCN/extdata/IntervalFile.R \\ + --in-file ${target_bed} \\ + --fasta ${fasta} \\ + --out-file ${prefix}.txt \\ + --genome ${genome} \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + purecn: ${VERSION} + END_VERSIONS + """ + + stub: + + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def bed = args.contains("--export") ? "touch ${prefix}.bed" : "" + def VERSION = '2.4.0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + + """ + touch ${prefix}.txt + ${bed} + cat <<-END_VERSIONS > versions.yml + "${task.process}": + purecn: ${VERSION} + END_VERSIONS + """ +} diff --git a/modules/nf-core/purecn/intervalfile/meta.yml b/modules/nf-core/purecn/intervalfile/meta.yml new file mode 100644 index 00000000000..a00efabe1bf --- /dev/null +++ b/modules/nf-core/purecn/intervalfile/meta.yml @@ -0,0 +1,65 @@ +name: "purecn_intervalfile" +description: Generate on and off-target intervals for PureCN from a list of targets +keywords: + - copy number alteration calling + - genomic intervals + - hybrid capture sequencing + - targeted sequencing + - DNA sequencing +tools: + - "purecn": + description: "Copy number calling and SNV classification using targeted short read sequencing" + homepage: "https://bioconductor.org/packages/release/bioc/html/PureCN.html" + documentation: "https://bioconductor.org/packages/release/bioc/html/PureCN.html" + tool_dev_url: "https://github.com/lima1/PureCN" + doi: "10.1186/s13029-016-0060-z." + licence: "Artistic-2.0" + args_id: "$args" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - target_bed: + type: file + description: BED file of target intervals + pattern: "*.bed" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'fasta' ] + - fasta: + type: file + description: FASTA reference sequence of the genome being used + pattern: "*.fasta" + - genome: + type: string + description: Genome used for the BED file (e.g., "hg38", "mm10"...) +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - txt: + type: file + pattern: "*.txt" + description: | + Annotated targets optimized for copy number calling + - bed: + type: file + pattern: "*.bed" + description: | + Modified and optimized targets exported as a BED file. + Generate the file using the --export command-line switch + IntervalFile.R. + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@aldosr" + - "@lbeltrame" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 044b480a7a9..48978559c5a 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2699,6 +2699,10 @@ prokka: - modules/nf-core/prokka/** - tests/modules/nf-core/prokka/** +purecn/intervalfile: + - modules/nf-core/purecn/intervalfile/** + - tests/modules/nf-core/purecn/intervalfile/** + purgedups/calcuts: - modules/nf-core/purgedups/calcuts/** - tests/modules/nf-core/purgedups/calcuts/** diff --git a/tests/modules/nf-core/purecn/intervalfile/main.nf b/tests/modules/nf-core/purecn/intervalfile/main.nf new file mode 100644 index 00000000000..5c36c613a9d --- /dev/null +++ b/tests/modules/nf-core/purecn/intervalfile/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PURECN_INTERVALFILE } from '../../../../../modules/nf-core/purecn/intervalfile/main.nf' + +workflow test_purecn_intervalfile { + + meta = [id: "test"] + bed_input = [meta, file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true)] + sequence = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + meta2 = [id: "fasta"] + sequence_input = [meta2, sequence] + genome = Channel.value("hg38") + + PURECN_INTERVALFILE ( bed_input, sequence_input, genome ) +} diff --git a/tests/modules/nf-core/purecn/intervalfile/nextflow.config b/tests/modules/nf-core/purecn/intervalfile/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/purecn/intervalfile/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/purecn/intervalfile/test.yml b/tests/modules/nf-core/purecn/intervalfile/test.yml new file mode 100644 index 00000000000..7bc0595a223 --- /dev/null +++ b/tests/modules/nf-core/purecn/intervalfile/test.yml @@ -0,0 +1,10 @@ +- name: "purecn intervalfile" + command: nextflow run ./tests/modules/nf-core/purecn/intervalfile -entry test_purecn_intervalfile -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/purecn/intervalfile/nextflow.config + tags: + - "purecn" + - "purecn/intervalfile" + files: + - path: "output/purecn/test.txt" + md5sum: 198d037d5f423d995f3da98d6cf92867 + - path: "output/purecn/versions.yml" + md5sum: 01226f36faf8d39f23d655b6837eba08 From 76457b6e4f9983f40f5d6d2d19b3aa1b53f28ac0 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Wed, 26 Apr 2023 09:38:21 +0200 Subject: [PATCH 100/120] feat added option of outputing wiggle and bedgraph (#3325) * feat added option of outputing wiggle and bedgraph * fix removed some md5sums --- modules/nf-core/star/align/main.nf | 4 ++++ modules/nf-core/star/align/meta.yml | 8 ++++++++ tests/modules/nf-core/star/align/test.yml | 5 ----- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/nf-core/star/align/main.nf b/modules/nf-core/star/align/main.nf index 0e3bd71332c..2bccf3566a5 100644 --- a/modules/nf-core/star/align/main.nf +++ b/modules/nf-core/star/align/main.nf @@ -29,6 +29,8 @@ process STAR_ALIGN { tuple val(meta), path('*.tab') , optional:true, emit: tab tuple val(meta), path('*.out.junction') , optional:true, emit: junction tuple val(meta), path('*.out.sam') , optional:true, emit: sam + tuple val(meta), path('*.wig') , optional:true, emit: wig + tuple val(meta), path('*.bedGraph') , optional:true, emit: bedgraph when: task.ext.when == null || task.ext.when @@ -86,6 +88,8 @@ process STAR_ALIGN { touch ${prefix}.tab touch ${prefix}.Chimeric.out.junction touch ${prefix}.out.sam + touch ${prefix}.wig + touch ${prefix}.bedGraph cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/star/align/meta.yml b/modules/nf-core/star/align/meta.yml index 7ee10f1cc5d..5dbf8ac5837 100644 --- a/modules/nf-core/star/align/meta.yml +++ b/modules/nf-core/star/align/meta.yml @@ -74,6 +74,14 @@ output: type: file description: STAR chimeric junction output file (optional) pattern: "*.out.junction" + - wig: + type: file + description: STAR output wiggle format file(s) (optional) + pattern: "*.wig" + - bedgraph: + type: file + description: STAR output bedGraph format file(s) (optional) + pattern: "*.bedGraph" authors: - "@kevinmenden" diff --git a/tests/modules/nf-core/star/align/test.yml b/tests/modules/nf-core/star/align/test.yml index 15f44d4f895..08fc762ed52 100644 --- a/tests/modules/nf-core/star/align/test.yml +++ b/tests/modules/nf-core/star/align/test.yml @@ -36,7 +36,6 @@ - path: output/star/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam - md5sum: 323a87955bd440647c772e4b4b730319 - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out @@ -80,7 +79,6 @@ - path: output/star/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam - md5sum: 6563f632eac2b6efc4cf61eda5ac42c4 - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out @@ -124,7 +122,6 @@ - path: output/star/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam - md5sum: 05b91996707202d7225c29dac3a7c87f - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out @@ -168,9 +165,7 @@ - path: output/star/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam - md5sum: 856cc7fbdffbbb7b3f39a8b1945f042d - path: output/star/test.Chimeric.out.junction - md5sum: 08f9d705e995d06bedaaf7a6afab883a - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out From c34a6e4f8c4e00eaceebd5e9af1286f3e74c237f Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Wed, 26 Apr 2023 09:00:31 +0100 Subject: [PATCH 101/120] Bump shinyngs modules (#3323) --- modules/nf-core/shinyngs/app/main.nf | 6 +++--- modules/nf-core/shinyngs/staticdifferential/main.nf | 6 +++--- modules/nf-core/shinyngs/staticexploratory/main.nf | 6 +++--- modules/nf-core/shinyngs/validatefomcomponents/main.nf | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/nf-core/shinyngs/app/main.nf b/modules/nf-core/shinyngs/app/main.nf index f7fcbd66b03..9c8dafd93c4 100644 --- a/modules/nf-core/shinyngs/app/main.nf +++ b/modules/nf-core/shinyngs/app/main.nf @@ -13,10 +13,10 @@ process SHINYNGS_APP { // // Those values must then be set in your Nextflow secrets. - conda "bioconda::r-shinyngs=1.7.1" + conda "bioconda::r-shinyngs=1.7.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.1--r42hdfd78af_1': - 'quay.io/biocontainers/r-shinyngs:1.7.1--r42hdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0': + 'quay.io/biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }" input: tuple val(meta), path(sample), path(feature_meta), path(assay_files) // Experiment-level info diff --git a/modules/nf-core/shinyngs/staticdifferential/main.nf b/modules/nf-core/shinyngs/staticdifferential/main.nf index bef46399677..1225467e1b4 100644 --- a/modules/nf-core/shinyngs/staticdifferential/main.nf +++ b/modules/nf-core/shinyngs/staticdifferential/main.nf @@ -2,10 +2,10 @@ process SHINYNGS_STATICDIFFERENTIAL { tag "$meta.id" label 'process_single' - conda "bioconda::r-shinyngs=1.7.1" + conda "bioconda::r-shinyngs=1.7.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.1--r42hdfd78af_1': - 'quay.io/biocontainers/r-shinyngs:1.7.1--r42hdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0': + 'quay.io/biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }" input: tuple val(meta), path(differential_result) // Differential info: contrast and differential stats diff --git a/modules/nf-core/shinyngs/staticexploratory/main.nf b/modules/nf-core/shinyngs/staticexploratory/main.nf index c15720873a5..9b40a3380ae 100644 --- a/modules/nf-core/shinyngs/staticexploratory/main.nf +++ b/modules/nf-core/shinyngs/staticexploratory/main.nf @@ -2,10 +2,10 @@ process SHINYNGS_STATICEXPLORATORY { tag "$meta.id" label 'process_single' - conda "bioconda::r-shinyngs=1.7.1" + conda "bioconda::r-shinyngs=1.7.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.1--r42hdfd78af_1': - 'quay.io/biocontainers/r-shinyngs:1.7.1--r42hdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0': + 'quay.io/biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }" input: tuple val(meta), path(sample), path(feature_meta), path(assay_files) diff --git a/modules/nf-core/shinyngs/validatefomcomponents/main.nf b/modules/nf-core/shinyngs/validatefomcomponents/main.nf index 7a488b2eadf..524689ff9f7 100644 --- a/modules/nf-core/shinyngs/validatefomcomponents/main.nf +++ b/modules/nf-core/shinyngs/validatefomcomponents/main.nf @@ -2,10 +2,10 @@ process SHINYNGS_VALIDATEFOMCOMPONENTS { tag "$sample" label 'process_single' - conda "bioconda::r-shinyngs=1.7.1" + conda "bioconda::r-shinyngs=1.7.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.1--r42hdfd78af_1': - 'quay.io/biocontainers/r-shinyngs:1.7.1--r42hdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0': + 'quay.io/biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }" input: tuple val(meta), path(sample), path(assay_files) From 9fc26b5d4f996c9c9bf0282686c95684f1698aaa Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> Date: Wed, 26 Apr 2023 11:06:00 +0200 Subject: [PATCH 102/120] new module wisecondorx/gender (#3333) * new module wisecondorx/gender * fix linting --- modules/nf-core/wisecondorx/gender/main.nf | 47 +++++++++++++++++++ modules/nf-core/wisecondorx/gender/meta.yml | 47 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../nf-core/wisecondorx/gender/main.nf | 31 ++++++++++++ .../wisecondorx/gender/nextflow.config | 5 ++ .../nf-core/wisecondorx/gender/test.yml | 7 +++ 6 files changed, 141 insertions(+) create mode 100644 modules/nf-core/wisecondorx/gender/main.nf create mode 100644 modules/nf-core/wisecondorx/gender/meta.yml create mode 100644 tests/modules/nf-core/wisecondorx/gender/main.nf create mode 100644 tests/modules/nf-core/wisecondorx/gender/nextflow.config create mode 100644 tests/modules/nf-core/wisecondorx/gender/test.yml diff --git a/modules/nf-core/wisecondorx/gender/main.nf b/modules/nf-core/wisecondorx/gender/main.nf new file mode 100644 index 00000000000..97b14211c6b --- /dev/null +++ b/modules/nf-core/wisecondorx/gender/main.nf @@ -0,0 +1,47 @@ +process WISECONDORX_GENDER { + tag "$meta.id" + label 'process_low' + + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + conda "bioconda::wisecondorx=1.2.5" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/wisecondorx:1.2.5--pyh5e36f6f_0': + 'quay.io/biocontainers/wisecondorx:1.2.5--pyh5e36f6f_0' }" + + input: + tuple val(meta), path(npz) + tuple val(meta2), path(reference) + + output: + tuple val(meta), stdout , emit: gender + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def VERSION = '1.2.5' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + + """ + WisecondorX gender \\ + ${npz} \\ + ${reference} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wisecondorx: ${VERSION} + END_VERSIONS + """ + + stub: + def VERSION = '1.2.5' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + + """ + echo male + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + wisecondorx: ${VERSION} + END_VERSIONS + """ +} diff --git a/modules/nf-core/wisecondorx/gender/meta.yml b/modules/nf-core/wisecondorx/gender/meta.yml new file mode 100644 index 00000000000..0c66eb931e9 --- /dev/null +++ b/modules/nf-core/wisecondorx/gender/meta.yml @@ -0,0 +1,47 @@ +name: "wisecondorx_gender" +description: Returns the gender of a .npz resulting from convert, based on a Gaussian mixture model trained during the newref phase +keywords: + - copy number analysis + - gender determination + - npz +tools: + - "wisecondorx": + description: "WIthin-SamplE COpy Number aberration DetectOR, including sex chromosomes" + homepage: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" + documentation: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" + tool_dev_url: "https://github.com/CenterForMedicalGeneticsGhent/WisecondorX" + doi: "10.1093/nar/gky1263" + licence: "['Attribution-NonCommercial-ShareAlike CC BY-NC-SA']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - npz: + type: file + description: Single sample NPZ file (from which to determine the gender) + pattern: "*.npz" + - reference: + type: file + description: Reference NPZ file + pattern: "*.npz" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - gender: + type: string + description: The gender of the input NPZ file + pattern: "(fe)?male" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 48978559c5a..8b04a4d88ae 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3765,6 +3765,10 @@ wisecondorx/convert: - modules/nf-core/wisecondorx/convert/** - tests/modules/nf-core/wisecondorx/convert/** +wisecondorx/gender: + - modules/nf-core/wisecondorx/gender/** + - tests/modules/nf-core/wisecondorx/gender/** + wisecondorx/newref: - modules/nf-core/wisecondorx/newref/** - tests/modules/nf-core/wisecondorx/newref/** diff --git a/tests/modules/nf-core/wisecondorx/gender/main.nf b/tests/modules/nf-core/wisecondorx/gender/main.nf new file mode 100644 index 00000000000..7a690fc5023 --- /dev/null +++ b/tests/modules/nf-core/wisecondorx/gender/main.nf @@ -0,0 +1,31 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { WISECONDORX_GENDER } from '../../../../../modules/nf-core/wisecondorx/gender/main.nf' +include { WISECONDORX_CONVERT } from '../../../../../modules/nf-core/wisecondorx/convert/main.nf' + +workflow test_wisecondorx_gender { + + input = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam_bai'], checkIfExists: true) + ]) + + WISECONDORX_CONVERT( + input, + [[], []], + [[], []] + ) + + reference = [ + [ id: "reference" ], + file("reference.npz") + ] + + WISECONDORX_GENDER( + WISECONDORX_CONVERT.out.npz, + reference + ) +} diff --git a/tests/modules/nf-core/wisecondorx/gender/nextflow.config b/tests/modules/nf-core/wisecondorx/gender/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/wisecondorx/gender/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/wisecondorx/gender/test.yml b/tests/modules/nf-core/wisecondorx/gender/test.yml new file mode 100644 index 00000000000..74a7765f430 --- /dev/null +++ b/tests/modules/nf-core/wisecondorx/gender/test.yml @@ -0,0 +1,7 @@ +- name: "wisecondorx gender" + command: nextflow run ./tests/modules/nf-core/wisecondorx/gender -entry test_wisecondorx_gender -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/wisecondorx/gender/nextflow.config -stub + tags: + - "wisecondorx" + - "wisecondorx/gender" + files: + - path: "output/wisecondorx/versions.yml" From cef0bbaf97becc25feaa9a6d900c53cdb66bf6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20H=C3=B6rtenhuber?= Date: Wed, 26 Apr 2023 12:26:48 +0200 Subject: [PATCH 103/120] reset tools in CI to released version (#3335) --- .github/workflows/nf-core-linting.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nf-core-linting.yml b/.github/workflows/nf-core-linting.yml index 5144dc480a5..47a6d2aa388 100644 --- a/.github/workflows/nf-core-linting.yml +++ b/.github/workflows/nf-core-linting.yml @@ -59,9 +59,8 @@ jobs: - name: Install pip run: python -m pip install --upgrade pip - # FIXME: Remove this when nf-core modules lint stabilizes and install stable release - - name: Install nf-core tools development version - run: python -m pip install --upgrade --force-reinstall git+https://github.com/nf-core/tools.git@dev + - name: Install nf-core tools + run: python -m pip install nf-core - name: Install Nextflow env: From 443d681b050358f4dbc70ddd3700b60565311c48 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Wed, 26 Apr 2023 11:45:30 +0100 Subject: [PATCH 104/120] Make MAD plots optional in shinyngs (#3334) * Make MAD plots optional in shinyngs * Fix types for linting * fix other meta.ymls * Add keywords * file to tuple * Hopefully final meta corrections --- modules/nf-core/shinyngs/app/meta.yml | 4 +- .../shinyngs/staticdifferential/meta.yml | 17 +++-- .../shinyngs/staticexploratory/main.nf | 2 +- .../shinyngs/staticexploratory/meta.yml | 64 +++++++++++++------ .../shinyngs/validatefomcomponents/meta.yml | 5 +- 5 files changed, 62 insertions(+), 30 deletions(-) diff --git a/modules/nf-core/shinyngs/app/meta.yml b/modules/nf-core/shinyngs/app/meta.yml index a695351de6a..1c5cb8311ba 100644 --- a/modules/nf-core/shinyngs/app/meta.yml +++ b/modules/nf-core/shinyngs/app/meta.yml @@ -34,7 +34,7 @@ input: description: | TSV-format feature (e.g. gene) metadata - assay_files: - type: list + type: file description: | List of TSV-format matrix files representing different measures for the same samples (e.g. raw and normalised). - contrasts: @@ -42,7 +42,7 @@ input: description: | CSV-format file with four columns identifying the sample sheet variable, reference level, treatment level, and optionally a comma-separated list of covariates used as blocking factors. - differential_results: - type: list + type: file description: | List of TSV-format differential analysis outputs, one per row of the contrasts file diff --git a/modules/nf-core/shinyngs/staticdifferential/meta.yml b/modules/nf-core/shinyngs/staticdifferential/meta.yml index 22ec8a77b0a..84fe31de385 100644 --- a/modules/nf-core/shinyngs/staticdifferential/meta.yml +++ b/modules/nf-core/shinyngs/staticdifferential/meta.yml @@ -27,7 +27,7 @@ input: features and samples, at a minimum an id. e.g. [ id:'test' ] - differential_results: - type: list + type: file description: | CSV or TSV-format tabular file with differential analysis outputs - sample: @@ -39,7 +39,7 @@ input: description: | CSV or TSV-format feature (e.g. gene) metadata - assay_file: - type: list + type: file description: | CSV or TSV matrix file to use alongside differential statistics in interpretation. Usually a normalised form. @@ -50,11 +50,16 @@ output: description: | Groovy Map containing contrast information e.g. [ variable:'treatment', reference:'treated', control:'saline', blocking:'' ] - - volcanos: - type: tuple + - volcanos_png: + type: file + description: | + Meta-keyed tuple containing a PNG output for a volcano plot built from + the differential result table. + - volcanos_html: + type: file description: | - Meta-keyed tuple containing a PNG and HTML plot for a volcano plot - built from the differential result table. + Meta-keyed tuple containing an HTML output for a volcano plot built + from the differential result table. - versions: type: file description: File containing software versions diff --git a/modules/nf-core/shinyngs/staticexploratory/main.nf b/modules/nf-core/shinyngs/staticexploratory/main.nf index 9b40a3380ae..4c33b3cba1c 100644 --- a/modules/nf-core/shinyngs/staticexploratory/main.nf +++ b/modules/nf-core/shinyngs/staticexploratory/main.nf @@ -19,7 +19,7 @@ process SHINYNGS_STATICEXPLORATORY { tuple val(meta), path("*/html/pca2d.html") , emit: pca2d_html, optional: true tuple val(meta), path("*/png/pca3d.png") , emit: pca3d_png tuple val(meta), path("*/html/pca3d.html") , emit: pca3d_html, optional: true - tuple val(meta), path("*/png/mad_correlation.png") , emit: mad_png + tuple val(meta), path("*/png/mad_correlation.png") , emit: mad_png, optional: true tuple val(meta), path("*/html/mad_correlation.html") , emit: mad_html, optional: true tuple val(meta), path("*/png/sample_dendrogram.png") , emit: dendro path "versions.yml" , emit: versions diff --git a/modules/nf-core/shinyngs/staticexploratory/meta.yml b/modules/nf-core/shinyngs/staticexploratory/meta.yml index 008214f90a6..6f745da5cef 100644 --- a/modules/nf-core/shinyngs/staticexploratory/meta.yml +++ b/modules/nf-core/shinyngs/staticexploratory/meta.yml @@ -30,40 +30,64 @@ input: description: | TSV-format feature (e.g. gene) metadata - assay_files: - type: list + type: file description: | List of TSV-format matrix files representing different measures for the same samples (e.g. raw and normalised). output: - - boxplots: - type: tuple + - boxplots_png: + type: file + description: | + Meta-keyed tuple containing PNG output for box plots covering input + matrices. + - boxplots_html: + type: file + description: | + Meta-keyed tuple containing HTML output for box plots covering input + matrices. + - densities_png: + type: file description: | - Meta-keyed tuple containing a PNG and HTML output for box plots + Meta-keyed tuple containing PNG output for density plots covering input matrices. - - densities: - type: tuple + - densities_html: + type: file description: | - Meta-keyed tuple containing a PNG and HTML output for density plots + Meta-keyed tuple containing HTML output for density plots covering input matrices. - - pca2d: - type: tuple + - pca2d_png: + type: file + description: | + Meta-keyed tuple containing a PNG output for 2D PCA plots covering + specified input matrix (by default the last one in the input list. + - pca2d_html: + type: file description: | - Meta-keyed tuple containing a PNG and HTML plot for 2D PCA plots + Meta-keyed tuple containing an HTML output for 2D PCA plots covering + specified input matrix (by default the last one in the input list. + - pca3d_png: + type: file + description: | + Meta-keyed tuple containing a PNG output for 3D PCA plots covering + specified input matrix (by default the last one in the input list. + - pca3d_html: + type: file + description: | + Meta-keyed tuple containing an HTML output for 3D PCA plots covering + specified input matrix (by default the last one in the input list. + - mad_png: + type: file + description: | + Meta-keyed tuple containing a PNG output for MAD correlation plots covering specified input matrix (by default the last one in the input list. - - pca3d: - type: tuple + - mad_dendro: + type: file description: | - Meta-keyed tuple containing a PNG and HTML plot for 3D PCA plots + Meta-keyed tuple containing an HTML output for MAD correlation plots covering specified input matrix (by default the last one in the input list. - - mad: - type: tuple - description: | - Meta-keyed tuple containing a PNG and HTML plot for MAD correlation - plots covering specified input matrix (by default the last one in the - input list. - dendro: - type: tuple + type: file description: | Meta-keyed tuple containing a PNG, for a sample clustering dendrogramcovering specified input matrix (by default the last one in diff --git a/modules/nf-core/shinyngs/validatefomcomponents/meta.yml b/modules/nf-core/shinyngs/validatefomcomponents/meta.yml index 0cf380da2f9..7ad75968ff0 100644 --- a/modules/nf-core/shinyngs/validatefomcomponents/meta.yml +++ b/modules/nf-core/shinyngs/validatefomcomponents/meta.yml @@ -3,6 +3,9 @@ description: validate consistency of feature and sample annotations with matrice keywords: - expression + - features + - observations + - validation tools: - "shinyngs": @@ -42,7 +45,7 @@ input: description: | TSV-format feature (e.g. gene) metadata - assay_files: - type: list + type: file description: | List of TSV-format matrix files representing different measures for the same samples (e.g. raw and normalised). - contrasts: From 10cb20f6a130d104fef335a8290f3ffce650f28d Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Wed, 26 Apr 2023 13:43:29 +0200 Subject: [PATCH 105/120] update sratools/fasterqdump to handle 10X data (#3336) CHORES: update sratools/fasterqdump Co-authored-by: Harshil Patel --- modules/nf-core/sratools/fasterqdump/main.nf | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/nf-core/sratools/fasterqdump/main.nf b/modules/nf-core/sratools/fasterqdump/main.nf index ca5ee7636d3..2336c318310 100644 --- a/modules/nf-core/sratools/fasterqdump/main.nf +++ b/modules/nf-core/sratools/fasterqdump/main.nf @@ -12,8 +12,8 @@ process SRATOOLS_FASTERQDUMP { path ncbi_settings output: - tuple val(meta), path(fastq), emit: reads - path "versions.yml" , emit: versions + tuple val(meta), path('*.fastq.gz'), emit: reads + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -22,11 +22,6 @@ process SRATOOLS_FASTERQDUMP { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - - // WARNING: Paired-end data extracted by fasterq-dump (--split-3 the default) - // always creates *_1.fastq *_2.fastq files but sometimes also - // an additional *.fastq file for unpaired reads which we ignore here. - fastq = meta.single_end ? '*.fastq.gz' : '*_{1,2}.fastq.gz' def outfile = meta.single_end ? "${prefix}.fastq" : prefix """ export NCBI_SETTINGS="\$PWD/${ncbi_settings}" From 3b98293f1b7c77a594137e737ce80c8de05e7c10 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Wed, 26 Apr 2023 19:45:32 +0200 Subject: [PATCH 106/120] update docker and singularity version of p7zip (#3338) --- modules/nf-core/unzip/main.nf | 4 ++-- modules/nf-core/unzipfiles/main.nf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/unzip/main.nf b/modules/nf-core/unzip/main.nf index 4524b6cdd2d..83d3addab14 100644 --- a/modules/nf-core/unzip/main.nf +++ b/modules/nf-core/unzip/main.nf @@ -4,8 +4,8 @@ process UNZIP { conda "conda-forge::p7zip=16.02" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/p7zip:15.09--h2d50403_4' : - 'quay.io/biocontainers/p7zip:15.09--h2d50403_4' }" + 'https://depot.galaxyproject.org/singularity/p7zip:16.02' : + 'quay.io/biocontainers/p7zip:16.02' }" input: tuple val(meta), path(archive) diff --git a/modules/nf-core/unzipfiles/main.nf b/modules/nf-core/unzipfiles/main.nf index bfafbab5810..6916d07ed94 100644 --- a/modules/nf-core/unzipfiles/main.nf +++ b/modules/nf-core/unzipfiles/main.nf @@ -4,8 +4,8 @@ process UNZIPFILES { conda "conda-forge::p7zip=16.02" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/p7zip:15.09--h2d50403_4' : - 'quay.io/biocontainers/p7zip:15.09--h2d50403_4' }" + 'https://depot.galaxyproject.org/singularity/p7zip:16.02' : + 'quay.io/biocontainers/p7zip:16.02' }" input: tuple val(meta), path(archive) From fa12afdf5874c1d11e4a20efe81c97935e8eea24 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Wed, 26 Apr 2023 23:20:01 +0200 Subject: [PATCH 107/120] Update ALL bcftools modules (#3339) * CHORES: update ALL bcftools modules * update md5sum --- modules/nf-core/bcftools/call/main.nf | 6 +++--- modules/nf-core/bcftools/concat/main.nf | 6 +++--- modules/nf-core/bcftools/consensus/main.nf | 6 +++--- modules/nf-core/bcftools/convert/main.nf | 6 +++--- modules/nf-core/bcftools/filter/main.nf | 6 +++--- modules/nf-core/bcftools/index/main.nf | 6 +++--- modules/nf-core/bcftools/isec/main.nf | 6 +++--- modules/nf-core/bcftools/merge/main.nf | 6 +++--- modules/nf-core/bcftools/mpileup/main.nf | 6 +++--- modules/nf-core/bcftools/norm/main.nf | 6 +++--- modules/nf-core/bcftools/query/main.nf | 6 +++--- modules/nf-core/bcftools/reheader/main.nf | 6 +++--- modules/nf-core/bcftools/roh/main.nf | 6 +++--- modules/nf-core/bcftools/sort/main.nf | 6 +++--- modules/nf-core/bcftools/split/main.nf | 6 +++--- modules/nf-core/bcftools/stats/main.nf | 6 +++--- modules/nf-core/bcftools/view/main.nf | 6 +++--- .../modules/nf-core/bcftools/mpileup/test.yml | 20 +++++++++---------- .../test.yml | 1 - 19 files changed, 61 insertions(+), 62 deletions(-) diff --git a/modules/nf-core/bcftools/call/main.nf b/modules/nf-core/bcftools/call/main.nf index 3506b824f3a..ebb69088c15 100644 --- a/modules/nf-core/bcftools/call/main.nf +++ b/modules/nf-core/bcftools/call/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_CALL { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf), path(index) diff --git a/modules/nf-core/bcftools/concat/main.nf b/modules/nf-core/bcftools/concat/main.nf index c7c39d9fa0d..de9ba6727cd 100644 --- a/modules/nf-core/bcftools/concat/main.nf +++ b/modules/nf-core/bcftools/concat/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_CONCAT { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcfs), path(tbi) diff --git a/modules/nf-core/bcftools/consensus/main.nf b/modules/nf-core/bcftools/consensus/main.nf index a32d94b17c9..db2c758a58d 100644 --- a/modules/nf-core/bcftools/consensus/main.nf +++ b/modules/nf-core/bcftools/consensus/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_CONSENSUS { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf), path(tbi), path(fasta) diff --git a/modules/nf-core/bcftools/convert/main.nf b/modules/nf-core/bcftools/convert/main.nf index d748c75fbb5..fea4df1911b 100644 --- a/modules/nf-core/bcftools/convert/main.nf +++ b/modules/nf-core/bcftools/convert/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_CONVERT { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(input), path(input_index) diff --git a/modules/nf-core/bcftools/filter/main.nf b/modules/nf-core/bcftools/filter/main.nf index 4e02009d292..4ee7684cb56 100644 --- a/modules/nf-core/bcftools/filter/main.nf +++ b/modules/nf-core/bcftools/filter/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_FILTER { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/nf-core/bcftools/index/main.nf b/modules/nf-core/bcftools/index/main.nf index f1c897cde68..c99b981c1f9 100644 --- a/modules/nf-core/bcftools/index/main.nf +++ b/modules/nf-core/bcftools/index/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/nf-core/bcftools/isec/main.nf b/modules/nf-core/bcftools/isec/main.nf index 67a19e71ccb..95234d654d6 100644 --- a/modules/nf-core/bcftools/isec/main.nf +++ b/modules/nf-core/bcftools/isec/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_ISEC { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcfs), path(tbis) diff --git a/modules/nf-core/bcftools/merge/main.nf b/modules/nf-core/bcftools/merge/main.nf index e664f0eb843..972b2a747b3 100644 --- a/modules/nf-core/bcftools/merge/main.nf +++ b/modules/nf-core/bcftools/merge/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_MERGE { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcfs), path(tbis) diff --git a/modules/nf-core/bcftools/mpileup/main.nf b/modules/nf-core/bcftools/mpileup/main.nf index c9e42c4dd5a..319ce883122 100644 --- a/modules/nf-core/bcftools/mpileup/main.nf +++ b/modules/nf-core/bcftools/mpileup/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_MPILEUP { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(bam), path(intervals) diff --git a/modules/nf-core/bcftools/norm/main.nf b/modules/nf-core/bcftools/norm/main.nf index 90387d6cef0..efd5bb91da5 100644 --- a/modules/nf-core/bcftools/norm/main.nf +++ b/modules/nf-core/bcftools/norm/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_NORM { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf), path(tbi) diff --git a/modules/nf-core/bcftools/query/main.nf b/modules/nf-core/bcftools/query/main.nf index 5a917b3e86b..8e1c10b1657 100644 --- a/modules/nf-core/bcftools/query/main.nf +++ b/modules/nf-core/bcftools/query/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_QUERY { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf), path(tbi) diff --git a/modules/nf-core/bcftools/reheader/main.nf b/modules/nf-core/bcftools/reheader/main.nf index 57634c073a6..d817af23132 100644 --- a/modules/nf-core/bcftools/reheader/main.nf +++ b/modules/nf-core/bcftools/reheader/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_REHEADER { tag "$meta.id" label 'process_low' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf), path(header) diff --git a/modules/nf-core/bcftools/roh/main.nf b/modules/nf-core/bcftools/roh/main.nf index dc516b029de..4624341199c 100644 --- a/modules/nf-core/bcftools/roh/main.nf +++ b/modules/nf-core/bcftools/roh/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_ROH { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf), path(tbi) diff --git a/modules/nf-core/bcftools/sort/main.nf b/modules/nf-core/bcftools/sort/main.nf index 9ae3253b69e..69d933412e4 100644 --- a/modules/nf-core/bcftools/sort/main.nf +++ b/modules/nf-core/bcftools/sort/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/nf-core/bcftools/split/main.nf b/modules/nf-core/bcftools/split/main.nf index 42bfc23f453..ccb3e2f248e 100644 --- a/modules/nf-core/bcftools/split/main.nf +++ b/modules/nf-core/bcftools/split/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_SPLIT { tag "$meta.id" label 'process_single' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf), path(tbi) diff --git a/modules/nf-core/bcftools/stats/main.nf b/modules/nf-core/bcftools/stats/main.nf index 51e9c91c708..49685f0aa83 100644 --- a/modules/nf-core/bcftools/stats/main.nf +++ b/modules/nf-core/bcftools/stats/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_STATS { tag "$meta.id" label 'process_single' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf), path(tbi) diff --git a/modules/nf-core/bcftools/view/main.nf b/modules/nf-core/bcftools/view/main.nf index 04ced9c9adb..01a58823f27 100644 --- a/modules/nf-core/bcftools/view/main.nf +++ b/modules/nf-core/bcftools/view/main.nf @@ -2,10 +2,10 @@ process BCFTOOLS_VIEW { tag "$meta.id" label 'process_medium' - conda "bioconda::bcftools=1.16" + conda "bioconda::bcftools=1.17" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bcftools:1.16--hfe4b78e_1': - 'quay.io/biocontainers/bcftools:1.16--hfe4b78e_1' }" + 'https://depot.galaxyproject.org/singularity/bcftools:1.17--haef29d1_0': + 'quay.io/biocontainers/bcftools:1.17--haef29d1_0' }" input: tuple val(meta), path(vcf), path(index) diff --git a/tests/modules/nf-core/bcftools/mpileup/test.yml b/tests/modules/nf-core/bcftools/mpileup/test.yml index 05eedc25887..0ee9121fc69 100644 --- a/tests/modules/nf-core/bcftools/mpileup/test.yml +++ b/tests/modules/nf-core/bcftools/mpileup/test.yml @@ -5,11 +5,11 @@ - bcftools files: - path: output/bcftools/test.bcftools_stats.txt - md5sum: 0a6fb5b79930bb2c3c179619380e8ebf + md5sum: 652ead9184c18167613a3bfc75b99111 - path: output/bcftools/test.vcf.gz.tbi - md5sum: 2198b362ec46027623f2cc5da5881777 + md5sum: 23e5a910227891c53bb34196be7c00b4 - path: output/bcftools/test.vcf.gz - md5sum: f0e3b1b665205909b52226473b5bf8fb + md5sum: 960b84036dd0a532b338b1a95813fc25 - name: bcftools mpileup test_bcftools_save_mpileup command: nextflow run ./tests/modules/nf-core/bcftools/mpileup -entry test_bcftools_save_mpileup -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bcftools/mpileup/nextflow.config @@ -18,13 +18,13 @@ - bcftools files: - path: output/bcftools/test.bcftools_stats.txt - md5sum: 0a6fb5b79930bb2c3c179619380e8ebf + md5sum: 652ead9184c18167613a3bfc75b99111 - path: output/bcftools/test.vcf.gz.tbi - md5sum: 2198b362ec46027623f2cc5da5881777 + md5sum: 23e5a910227891c53bb34196be7c00b4 - path: output/bcftools/test.vcf.gz - md5sum: f0e3b1b665205909b52226473b5bf8fb + md5sum: 960b84036dd0a532b338b1a95813fc25 - path: output/bcftools/test.mpileup.gz - md5sum: 175e7e6edf0ca24bf6cfffe5a3bf7061 + md5sum: dd424be36720bb09007233bd367796f1 - name: bcftools mpileup test_bcftools_mpileup_intervals command: nextflow run ./tests/modules/nf-core/bcftools/mpileup -entry test_bcftools_mpileup_intervals -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bcftools/mpileup/nextflow.config @@ -33,8 +33,8 @@ - bcftools files: - path: output/bcftools/test.bcftools_stats.txt - md5sum: d91d947ec3822ecabf28d474babc303c + md5sum: 405eee1f452446e34f3dcfc2b00e5fab - path: output/bcftools/test.vcf.gz.tbi - md5sum: d655c592ab8ef5c834cdd19dc1022fec + md5sum: 3a50baca0fb70eaab68c44cb9bd4d4a3 - path: output/bcftools/test.vcf.gz - md5sum: d0e1b95b45610fe37bee5712a9bb0124 + md5sum: 1feaf4810f6b57f32ea7fd2dbc4da9a0 diff --git a/tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/test.yml b/tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/test.yml index 97227984095..3a9df7ca582 100644 --- a/tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/test.yml +++ b/tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/test.yml @@ -12,7 +12,6 @@ contains: - "chr22\t1982\t.\tA\tG\t459.724" - path: output/bcftools/aligned.sorted.vcf.gz.csi - md5sum: 93ecb3ee8fb165cbd754e1a1676e41fe - path: output/freebayes/aligned.vcf.gz contains: - "chr22\t1982\t.\tA\tG\t459.724" From d496e71b369e51f9d42261d591a4cb9d3ada354b Mon Sep 17 00:00:00 2001 From: Lili Andersson-Li <64467552+LilyAnderssonLee@users.noreply.github.com> Date: Thu, 27 Apr 2023 09:25:39 +0200 Subject: [PATCH 108/120] New module MetaPhlAn4 (#3298) * new module MetaPhlAn4 * fix left-padding spaces * Removed md5sum from test.yml * Clean processes * Remove space within include UNTAR process * Correct the doi number of MetaPhlAn4 --- modules/nf-core/metaphlan/metaphlan/main.nf | 48 ++++++++++ modules/nf-core/metaphlan/metaphlan/meta.yml | 59 +++++++++++++ tests/config/pytest_modules.yml | 4 + .../nf-core/metaphlan/metaphlan/main.nf | 59 +++++++++++++ .../metaphlan/metaphlan/nextflow.config | 13 +++ .../nf-core/metaphlan/metaphlan/test.yml | 88 +++++++++++++++++++ 6 files changed, 271 insertions(+) create mode 100644 modules/nf-core/metaphlan/metaphlan/main.nf create mode 100644 modules/nf-core/metaphlan/metaphlan/meta.yml create mode 100644 tests/modules/nf-core/metaphlan/metaphlan/main.nf create mode 100644 tests/modules/nf-core/metaphlan/metaphlan/nextflow.config create mode 100644 tests/modules/nf-core/metaphlan/metaphlan/test.yml diff --git a/modules/nf-core/metaphlan/metaphlan/main.nf b/modules/nf-core/metaphlan/metaphlan/main.nf new file mode 100644 index 00000000000..3153d485bbc --- /dev/null +++ b/modules/nf-core/metaphlan/metaphlan/main.nf @@ -0,0 +1,48 @@ +process METAPHLAN_METAPHLAN { + tag "$meta.id" + label 'process_medium' + + conda "bioconda::metaphlan=4.0.6" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/metaphlan:4.0.6--pyhca03a8a_0' : + 'quay.io/biocontainers/metaphlan:4.0.6--pyhca03a8a_0' }" + + input: + tuple val(meta), path(input) + path metaphlan_db_latest + + output: + tuple val(meta), path("*_profile.txt") , emit: profile + tuple val(meta), path("*.biom") , emit: biom + tuple val(meta), path('*.bowtie2out.txt'), optional:true, emit: bt2out + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def input_type = ("$input".endsWith(".fastq.gz") || "$input".endsWith(".fq.gz")) ? "--input_type fastq" : ("$input".contains(".fasta")) ? "--input_type fasta" : ("$input".endsWith(".bowtie2out.txt")) ? "--input_type bowtie2out" : "--input_type sam" + def input_data = ("$input_type".contains("fastq")) && !meta.single_end ? "${input[0]},${input[1]}" : "$input" + def bowtie2_out = "$input_type" == "--input_type bowtie2out" || "$input_type" == "--input_type sam" ? '' : "--bowtie2out ${prefix}.bowtie2out.txt" + + """ + BT2_DB=`find -L "${metaphlan_db_latest}" -name "*rev.1.bt2l" -exec dirname {} \\;` + + metaphlan \\ + --nproc $task.cpus \\ + $input_type \\ + $input_data \\ + $args \\ + $bowtie2_out \\ + --bowtie2db \$BT2_DB \\ + --biom ${prefix}.biom \\ + --output_file ${prefix}_profile.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + metaphlan: \$(metaphlan --version 2>&1 | awk '{print \$3}') + END_VERSIONS + """ +} diff --git a/modules/nf-core/metaphlan/metaphlan/meta.yml b/modules/nf-core/metaphlan/metaphlan/meta.yml new file mode 100644 index 00000000000..cb74bd594aa --- /dev/null +++ b/modules/nf-core/metaphlan/metaphlan/meta.yml @@ -0,0 +1,59 @@ +name: metaphlan_metaphlan +description: MetaPhlAn is a tool for profiling the composition of microbial communities from metagenomic shotgun sequencing data. +keywords: + - metagenomics + - classification + - fastq + - fasta + - sam +tools: + - metaphlan: + description: Identify clades (phyla to species) present in the metagenome obtained from a microbiome sample and their relative abundance + homepage: https://huttenhower.sph.harvard.edu/metaphlan/ + documentation: https://github.com/biobakery/MetaPhlAn + doi: "10.1038/s41587-023-01688-w" + licence: ["MIT License"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: Metaphlan can classify the metagenome from a variety of input data types, including FASTQ files (single-end and paired-end), FASTA, bowtie2-produced SAM files (produced from alignments to the MetaPHlAn marker database) and intermediate bowtie2 alignment files (bowtie2out) + pattern: "*.{fastq.gz, fasta, fasta.gz, sam, bowtie2out.txt}" + - metaphlan_db: + type: file + description: | + Directory containing pre-downloaded and uncompressed MetaPhlAn database downloaded from: http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/. + Note that you will also need to specify `--index` and the database version name (e.g. 'mpa_vJan21_TOY_CHOCOPhlAnSGB_202103') in your module.conf ext.args for METAPHLAN_METAPHLAN! + pattern: "*/" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - profile: + type: file + description: Tab-separated output file of the predicted taxon relative abundances + pattern: "*.{txt}" + - biom: + type: file + description: General-use format for representing biological sample by observation contingency tables + pattern: "*.{biom}" + - bowtie2out: + type: file + description: Intermediate Bowtie2 output produced from mapping the metagenome against the MetaPHlAn marker database ( not compatible with `bowtie2out` files generated with MetaPhlAn versions below 3 ) + pattern: "*.{bowtie2out.txt}" + +authors: + - "@MGordon09" + - "@LilyAnderssonLee" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 8b04a4d88ae..5e54dc52b43 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2198,6 +2198,10 @@ metaphlan/makedb: - modules/nf-core/metaphlan/makedb/** - tests/modules/nf-core/metaphlan/makedb/** +metaphlan/metaphlan: + - modules/nf-core/metaphlan/metaphlan/** + - tests/modules/nf-core/metaphlan/metaphlan/** + metaphlan3/mergemetaphlantables: - modules/nf-core/metaphlan3/mergemetaphlantables/** - tests/modules/nf-core/metaphlan3/mergemetaphlantables/** diff --git a/tests/modules/nf-core/metaphlan/metaphlan/main.nf b/tests/modules/nf-core/metaphlan/metaphlan/main.nf new file mode 100644 index 00000000000..6e48a94a065 --- /dev/null +++ b/tests/modules/nf-core/metaphlan/metaphlan/main.nf @@ -0,0 +1,59 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR } from '../../../../../modules/nf-core/untar/main.nf' +include { METAPHLAN_METAPHLAN } from '../../../../../modules/nf-core/metaphlan/metaphlan/main.nf' +include { SAMTOOLS_VIEW } from '../../../../../modules/nf-core/samtools/view/main.nf' + +workflow test_metaphlan_single_end { + + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan4_database.tar.gz', checkIfExists: true) ] + + UNTAR ( db ) + METAPHLAN_METAPHLAN ( input, UNTAR.out.untar.map{ it[1] } ) +} + +workflow test_metaphlan_paired_end { + + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan4_database.tar.gz', checkIfExists: true) ] + + UNTAR ( db ) + METAPHLAN_METAPHLAN ( input, UNTAR.out.untar.map{ it[1] } ) +} + +workflow test_metaphlan_fasta { + + input = [ [ id:'test', single_end:true], // meta map + [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + ] + + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan4_database.tar.gz', checkIfExists: true) ] + + UNTAR ( db ) + METAPHLAN_METAPHLAN ( input, UNTAR.out.untar.map{ it[1] } ) +} + +workflow test_metaphlan_sam { + + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [] + ] + + db = [ [], file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/metaphlan4_database.tar.gz', checkIfExists: true) ] + + UNTAR ( db ) + SAMTOOLS_VIEW ( input, [] ,[]) + METAPHLAN_METAPHLAN ( SAMTOOLS_VIEW.out.sam, UNTAR.out.untar.map{ it[1] } ) +} + diff --git a/tests/modules/nf-core/metaphlan/metaphlan/nextflow.config b/tests/modules/nf-core/metaphlan/metaphlan/nextflow.config new file mode 100644 index 00000000000..048cee675cd --- /dev/null +++ b/tests/modules/nf-core/metaphlan/metaphlan/nextflow.config @@ -0,0 +1,13 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: METAPHLAN_METAPHLAN { + ext.args = '--index mpa_vJan21_TOY_CHOCOPhlAnSGB_202103 --bt2_ps very-sensitive-local --min_alignment_len 20 --nreads 200' + } + + withName:SAMTOOLS_VIEW { + ext.args = '-h --output-fmt sam' + } + +} diff --git a/tests/modules/nf-core/metaphlan/metaphlan/test.yml b/tests/modules/nf-core/metaphlan/metaphlan/test.yml new file mode 100644 index 00000000000..af3432eeda9 --- /dev/null +++ b/tests/modules/nf-core/metaphlan/metaphlan/test.yml @@ -0,0 +1,88 @@ +- name: metaphlan metaphlan test_metaphlan_single_end + command: nextflow run ./tests/modules/nf-core/metaphlan/metaphlan -entry test_metaphlan_single_end -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/metaphlan/metaphlan/nextflow.config + tags: + - metaphlan + - metaphlan/metaphlan + files: + - path: output/metaphlan/test.biom + contains: + - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' + - path: output/metaphlan/test.bowtie2out.txt + - path: output/metaphlan/test_profile.txt + - path: output/metaphlan/versions.yml + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.1.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.2.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.3.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.4.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.fna.bz2 + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.pkl + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.rev.1.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.rev.2.bt2l + - path: output/untar/versions.yml + +- name: metaphlan metaphlan test_metaphlan_paired_end + command: nextflow run ./tests/modules/nf-core/metaphlan/metaphlan -entry test_metaphlan_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/metaphlan/metaphlan/nextflow.config + tags: + - metaphlan + - metaphlan/metaphlan + files: + - path: output/metaphlan/test.biom + contains: + - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' + - path: output/metaphlan/test.bowtie2out.txt + - path: output/metaphlan/test_profile.txt + - path: output/metaphlan/versions.yml + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.1.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.2.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.3.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.4.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.fna.bz2 + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.pkl + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.rev.1.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.rev.2.bt2l + - path: output/untar/versions.yml + +- name: metaphlan metaphlan test_metaphlan_fasta + command: nextflow run ./tests/modules/nf-core/metaphlan/metaphlan -entry test_metaphlan_fasta -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/metaphlan/metaphlan/nextflow.config + tags: + - metaphlan + - metaphlan/metaphlan + files: + - path: output/metaphlan/test.biom + contains: + - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' + - path: output/metaphlan/test.bowtie2out.txt + - path: output/metaphlan/test_profile.txt + - path: output/metaphlan/versions.yml + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.1.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.2.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.3.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.4.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.fna.bz2 + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.pkl + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.rev.1.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.rev.2.bt2l + - path: output/untar/versions.yml + +- name: metaphlan metaphlan test_metaphlan_sam + command: nextflow run ./tests/modules/nf-core/metaphlan/metaphlan -entry test_metaphlan_sam -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/metaphlan/metaphlan/nextflow.config + tags: + - metaphlan + - metaphlan/metaphlan + files: + - path: output/metaphlan/test.biom + contains: + - '"format": "Biological Observation Matrix 1.0.0","format_url": "http://biom-format.org","generated_by"' + - path: output/metaphlan/test_profile.txt + - path: output/metaphlan/versions.yml + - path: output/samtools/test.sam + - path: output/samtools/versions.yml + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.1.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.2.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.3.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.4.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.fna.bz2 + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.pkl + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.rev.1.bt2l + - path: output/untar/metaphlan4_database/mpa_vJan21_TOY_CHOCOPhlAnSGB_202103.rev.2.bt2l + - path: output/untar/versions.yml From a9784afdd5dcda23b84e64db75dc591065d64653 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Thu, 27 Apr 2023 10:58:39 +0200 Subject: [PATCH 109/120] Update path for yaml-schema json (#3340) FIX: use the right path --- subworkflows/nf-core/bam_create_som_pon_gatk/meta.yml | 2 +- subworkflows/nf-core/bam_dedup_stats_samtools_umitools/meta.yml | 2 +- subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml | 2 +- subworkflows/nf-core/bam_markduplicates_picard/meta.yml | 2 +- subworkflows/nf-core/bam_ngscheckmate/meta.yml | 2 +- subworkflows/nf-core/bam_qc_picard/meta.yml | 2 +- subworkflows/nf-core/bam_rseqc/meta.yml | 2 +- subworkflows/nf-core/bam_sort_stats_samtools/meta.yml | 2 +- subworkflows/nf-core/bam_split_by_region/meta.yml | 2 +- subworkflows/nf-core/bam_stats_samtools/meta.yml | 2 +- .../bam_tumor_normal_somatic_variant_calling_gatk/meta.yml | 2 +- .../bam_variant_calling_sort_freebayes_bcftools/meta.yml | 2 +- subworkflows/nf-core/bam_variant_demix_boot_freyja/meta.yml | 2 +- subworkflows/nf-core/bcl_demultiplex/meta.yml | 2 +- subworkflows/nf-core/bed_scatter_bedtools/meta.yml | 2 +- subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/meta.yml | 2 +- subworkflows/nf-core/fasta_binning_concoct/meta.yml | 2 +- subworkflows/nf-core/fasta_index_dna/meta.yml | 2 +- subworkflows/nf-core/fasta_newick_epang_gappa/meta.yml | 2 +- subworkflows/nf-core/fastq_align_bowtie2/meta.yml | 2 +- subworkflows/nf-core/fastq_align_bwa/meta.yml | 2 +- subworkflows/nf-core/fastq_align_bwaaln/meta.yml | 2 +- subworkflows/nf-core/fastq_align_chromap/meta.yml | 2 +- subworkflows/nf-core/fastq_align_dna/meta.yml | 2 +- subworkflows/nf-core/fastq_align_hisat2/meta.yml | 2 +- subworkflows/nf-core/fastq_align_star/meta.yml | 2 +- subworkflows/nf-core/fastq_contam_seqtk_kraken/meta.yml | 2 +- subworkflows/nf-core/fastq_create_umi_consensus_fgbio/meta.yml | 2 +- .../fastq_download_prefetch_fasterqdump_sratools/meta.yml | 2 +- subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml | 2 +- subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/meta.yml | 2 +- subworkflows/nf-core/fastq_subsample_fq_salmon/meta.yml | 2 +- subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml | 2 +- .../nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml | 2 +- subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml | 2 +- subworkflows/nf-core/vcf_annotate_snpeff/meta.yml | 2 +- subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml | 2 +- subworkflows/nf-core/vcf_gather_bcftools/meta.yml | 2 +- subworkflows/nf-core/vcf_impute_glimpse/meta.yml | 2 +- subworkflows/nf-core/vcf_phase_shapeit5/meta.yml | 2 +- 40 files changed, 40 insertions(+), 40 deletions(-) diff --git a/subworkflows/nf-core/bam_create_som_pon_gatk/meta.yml b/subworkflows/nf-core/bam_create_som_pon_gatk/meta.yml index aa50f2abe53..e682f7efb86 100644 --- a/subworkflows/nf-core/bam_create_som_pon_gatk/meta.yml +++ b/subworkflows/nf-core/bam_create_som_pon_gatk/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: bam_create_som_pon_gatk description: Perform variant calling on a set of normal samples using mutect2 panel of normals mode. Group them into a genomicsdbworkspace using genomicsdbimport, then use this to create a panel of normals using createsomaticpanelofnormals. keywords: diff --git a/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/meta.yml b/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/meta.yml index 467ade2a18c..3af412fab3c 100644 --- a/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/meta.yml +++ b/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "bam_dedup_stats_samtools_umitools" description: UMI-tools dedup, index BAM file and run samtools stats, flagstat and idxstats keywords: diff --git a/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml b/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml index 7d49ead95fb..360372b3f1f 100644 --- a/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml +++ b/subworkflows/nf-core/bam_docounts_contamination_angsd/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "bam_docounts_contamination_angsd" description: Calculate contamination of the X-chromosome with ANGSD keywords: diff --git a/subworkflows/nf-core/bam_markduplicates_picard/meta.yml b/subworkflows/nf-core/bam_markduplicates_picard/meta.yml index a324359e679..d5e7160923c 100644 --- a/subworkflows/nf-core/bam_markduplicates_picard/meta.yml +++ b/subworkflows/nf-core/bam_markduplicates_picard/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "bam_markduplicates_picard" description: Picard MarkDuplicates, index BAM file and run samtools stats, flagstat and idxstats keywords: diff --git a/subworkflows/nf-core/bam_ngscheckmate/meta.yml b/subworkflows/nf-core/bam_ngscheckmate/meta.yml index 4f1081fb200..f46974a16a1 100644 --- a/subworkflows/nf-core/bam_ngscheckmate/meta.yml +++ b/subworkflows/nf-core/bam_ngscheckmate/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "bam_ngscheckmate" description: Take a set of bam files and run NGSCheckMate to determine whether samples match with each other, using a set of SNPs. keywords: diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml index 90d1c68f788..16277c12b06 100644 --- a/subworkflows/nf-core/bam_qc_picard/meta.yml +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: bam_qc description: Produces comprehensive statistics from BAM file keywords: diff --git a/subworkflows/nf-core/bam_rseqc/meta.yml b/subworkflows/nf-core/bam_rseqc/meta.yml index 2bc970aed64..428b83e6d74 100644 --- a/subworkflows/nf-core/bam_rseqc/meta.yml +++ b/subworkflows/nf-core/bam_rseqc/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: bam_rseqc description: Subworkflow to run multiple commands in the RSeqC package keywords: diff --git a/subworkflows/nf-core/bam_sort_stats_samtools/meta.yml b/subworkflows/nf-core/bam_sort_stats_samtools/meta.yml index 675378d15ba..8dfbd58df41 100644 --- a/subworkflows/nf-core/bam_sort_stats_samtools/meta.yml +++ b/subworkflows/nf-core/bam_sort_stats_samtools/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: bam_sort_stats_samtools description: Sort SAM/BAM/CRAM file keywords: diff --git a/subworkflows/nf-core/bam_split_by_region/meta.yml b/subworkflows/nf-core/bam_split_by_region/meta.yml index f0d5a7e29a9..dcbdfecc943 100644 --- a/subworkflows/nf-core/bam_split_by_region/meta.yml +++ b/subworkflows/nf-core/bam_split_by_region/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "bam_split_by_region" description: Split the reads in the input bam by specified genomic region. keywords: diff --git a/subworkflows/nf-core/bam_stats_samtools/meta.yml b/subworkflows/nf-core/bam_stats_samtools/meta.yml index a97d9f37c6b..b05086bc2e3 100644 --- a/subworkflows/nf-core/bam_stats_samtools/meta.yml +++ b/subworkflows/nf-core/bam_stats_samtools/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: bam_stats_samtools description: Produces comprehensive statistics from SAM/BAM/CRAM file keywords: diff --git a/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/meta.yml b/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/meta.yml index 2164c0fe7d5..c6fea78a62b 100644 --- a/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/meta.yml +++ b/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: bam_tumor_normal_somatic_variant_calling_gatk description: | Perform variant calling on a paired tumor normal set of samples using mutect2 tumor normal mode. diff --git a/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/meta.yml b/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/meta.yml index 3c8de85fc6e..13851962b86 100644 --- a/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/meta.yml +++ b/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "bam_variant_calling_sort_freebayes_bcftools" description: Call variants using freebayes, then sort and index keywords: diff --git a/subworkflows/nf-core/bam_variant_demix_boot_freyja/meta.yml b/subworkflows/nf-core/bam_variant_demix_boot_freyja/meta.yml index 53ba6ce5a34..df5d0699cf9 100644 --- a/subworkflows/nf-core/bam_variant_demix_boot_freyja/meta.yml +++ b/subworkflows/nf-core/bam_variant_demix_boot_freyja/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "bam_variant_demix_boot_freyja" description: Recover relative lineage abundances from mixed SARS-CoV-2 samples from a sequencing dataset (BAM aligned to the Hu-1 reference) keywords: diff --git a/subworkflows/nf-core/bcl_demultiplex/meta.yml b/subworkflows/nf-core/bcl_demultiplex/meta.yml index b358f2867ab..2274cbe8fb6 100644 --- a/subworkflows/nf-core/bcl_demultiplex/meta.yml +++ b/subworkflows/nf-core/bcl_demultiplex/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "bcl_demultiplex" description: Demultiplex Illumina BCL data using bcl-convert or bcl2fastq keywords: diff --git a/subworkflows/nf-core/bed_scatter_bedtools/meta.yml b/subworkflows/nf-core/bed_scatter_bedtools/meta.yml index c3e8c26de51..d8d36f8bd27 100644 --- a/subworkflows/nf-core/bed_scatter_bedtools/meta.yml +++ b/subworkflows/nf-core/bed_scatter_bedtools/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "bed_scatter_bedtools" description: | Scatters inputted BED files by the amount specified. diff --git a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/meta.yml b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/meta.yml index b33fdf35c15..8d3257773ef 100644 --- a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/meta.yml +++ b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "bedgraph_bedclip_bedgraphtobigwig" description: Convert bedgraph to bigwig with clip keywords: diff --git a/subworkflows/nf-core/fasta_binning_concoct/meta.yml b/subworkflows/nf-core/fasta_binning_concoct/meta.yml index 6b7416e1d1b..70f2131c21a 100644 --- a/subworkflows/nf-core/fasta_binning_concoct/meta.yml +++ b/subworkflows/nf-core/fasta_binning_concoct/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fasta_binning_concoct" description: Runs the CONCOCT workflow of contig binning keywords: diff --git a/subworkflows/nf-core/fasta_index_dna/meta.yml b/subworkflows/nf-core/fasta_index_dna/meta.yml index 9a2aed74bd0..8c6abbbf334 100644 --- a/subworkflows/nf-core/fasta_index_dna/meta.yml +++ b/subworkflows/nf-core/fasta_index_dna/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fasta_index_dna" description: | Generate aligner index for a reference genome. diff --git a/subworkflows/nf-core/fasta_newick_epang_gappa/meta.yml b/subworkflows/nf-core/fasta_newick_epang_gappa/meta.yml index 49e91ed7c02..2337aa582b1 100644 --- a/subworkflows/nf-core/fasta_newick_epang_gappa/meta.yml +++ b/subworkflows/nf-core/fasta_newick_epang_gappa/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fasta_newick_epang_gappa" description: Run phylogenetic placement with a number of query sequences plus a reference alignment and phylogeny. Used in nf-core/phyloplace. keywords: diff --git a/subworkflows/nf-core/fastq_align_bowtie2/meta.yml b/subworkflows/nf-core/fastq_align_bowtie2/meta.yml index a8cd49e6f11..4900670f7f7 100644 --- a/subworkflows/nf-core/fastq_align_bowtie2/meta.yml +++ b/subworkflows/nf-core/fastq_align_bowtie2/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: fastq_align_bowtie2 description: Align reads to a reference genome using bowtie2 then sort with samtools keywords: diff --git a/subworkflows/nf-core/fastq_align_bwa/meta.yml b/subworkflows/nf-core/fastq_align_bwa/meta.yml index 39d367b2485..548fec3f41b 100644 --- a/subworkflows/nf-core/fastq_align_bwa/meta.yml +++ b/subworkflows/nf-core/fastq_align_bwa/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: fastq_align_bwa description: Align reads to a reference genome using bwa then sort with samtools keywords: diff --git a/subworkflows/nf-core/fastq_align_bwaaln/meta.yml b/subworkflows/nf-core/fastq_align_bwaaln/meta.yml index bad3b07f819..75555028685 100644 --- a/subworkflows/nf-core/fastq_align_bwaaln/meta.yml +++ b/subworkflows/nf-core/fastq_align_bwaaln/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fastq_align_bwaaln_samtools" description: Align FASTQ files against reference genome with the bwa aln short-read aligner producing a sorted and indexed BAM files keywords: diff --git a/subworkflows/nf-core/fastq_align_chromap/meta.yml b/subworkflows/nf-core/fastq_align_chromap/meta.yml index 41c46e8230d..d5f59cacad7 100644 --- a/subworkflows/nf-core/fastq_align_chromap/meta.yml +++ b/subworkflows/nf-core/fastq_align_chromap/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fastq_align_chromap" description: Align high throughput chromatin profiles using Chromap then sort with samtools keywords: diff --git a/subworkflows/nf-core/fastq_align_dna/meta.yml b/subworkflows/nf-core/fastq_align_dna/meta.yml index 3b7b8007c89..68748f67dc1 100644 --- a/subworkflows/nf-core/fastq_align_dna/meta.yml +++ b/subworkflows/nf-core/fastq_align_dna/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fastq_align_dna" description: Align fastq files to a reference genome keywords: diff --git a/subworkflows/nf-core/fastq_align_hisat2/meta.yml b/subworkflows/nf-core/fastq_align_hisat2/meta.yml index 55063d19a52..36c7c78ec62 100644 --- a/subworkflows/nf-core/fastq_align_hisat2/meta.yml +++ b/subworkflows/nf-core/fastq_align_hisat2/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fastq_align_hisat2" description: Align reads to a reference genome using hisat2 then sort with samtools keywords: diff --git a/subworkflows/nf-core/fastq_align_star/meta.yml b/subworkflows/nf-core/fastq_align_star/meta.yml index 3c41e90b132..ea3559b7d7d 100644 --- a/subworkflows/nf-core/fastq_align_star/meta.yml +++ b/subworkflows/nf-core/fastq_align_star/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fastq_align_star" description: Align reads to a reference genome using bowtie2 then sort with samtools keywords: diff --git a/subworkflows/nf-core/fastq_contam_seqtk_kraken/meta.yml b/subworkflows/nf-core/fastq_contam_seqtk_kraken/meta.yml index d62f2d038bc..9d049ac84b9 100644 --- a/subworkflows/nf-core/fastq_contam_seqtk_kraken/meta.yml +++ b/subworkflows/nf-core/fastq_contam_seqtk_kraken/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "FASTQ_CONTAM_SEQTK_KRAKEN" description: Produces a contamination report from FastQ input after subsampling keywords: diff --git a/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/meta.yml b/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/meta.yml index c6ff2f343ed..198bfe7d1e7 100644 --- a/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/meta.yml +++ b/subworkflows/nf-core/fastq_create_umi_consensus_fgbio/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: fgbio_create_umi_consensus description: | This workflow uses the suite FGBIO to identify and remove UMI tags from FASTQ reads diff --git a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/meta.yml b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/meta.yml index ed93a54ac47..4599bbd213c 100644 --- a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/meta.yml +++ b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: fastq_download_prefetch_fasterqdump_sratools description: Download FASTQ sequencing reads from the NCBI's Sequence Read Archive (SRA). keywords: diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml index 857f1385548..8f162009316 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json # yaml-language-server: $schema=yaml-schema.json name: "fastq_fastqc_umitools_fastp" description: Read QC, UMI extraction and trimming diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/meta.yml b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/meta.yml index 35f0e272ecb..3b1a675c3f1 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/meta.yml +++ b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fastq_fastqc_umitools_trimgalore" description: Read QC, UMI extraction and trimming keywords: diff --git a/subworkflows/nf-core/fastq_subsample_fq_salmon/meta.yml b/subworkflows/nf-core/fastq_subsample_fq_salmon/meta.yml index 4c196da7240..db96312aa60 100644 --- a/subworkflows/nf-core/fastq_subsample_fq_salmon/meta.yml +++ b/subworkflows/nf-core/fastq_subsample_fq_salmon/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fastq_subsample_fq_salmon" description: Subsample fastq keywords: diff --git a/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml b/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml index cc6a45a2cf9..635896ea802 100644 --- a/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml +++ b/subworkflows/nf-core/fastq_trim_fastp_fastqc/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fastq_trim_fastp_fastqc" description: Read QC, fastp trimming and read qc keywords: diff --git a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml b/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml index 7e346011f57..af0a6fbe2ac 100644 --- a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml +++ b/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: gatk_tumor_only_somatic_variant_calling description: | Perform variant calling on a single tumor sample using mutect2 tumor only mode. diff --git a/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml b/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml index 9e2d61faa62..2f7d2191fb8 100644 --- a/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml +++ b/subworkflows/nf-core/vcf_annotate_ensemblvep/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: vcf_annotate_ensemblvep description: Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file keywords: diff --git a/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml b/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml index 6bdababdf2d..0c0c94b535f 100644 --- a/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml +++ b/subworkflows/nf-core/vcf_annotate_snpeff/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: vcf_annotate_snpeff description: Perform annotation with snpEff and bgzip + tabix index the resulting VCF file keywords: diff --git a/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml b/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml index b37b1fd8c5b..ed20f77fa73 100644 --- a/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml +++ b/subworkflows/nf-core/vcf_extract_relate_somalier/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "vcf_extract_relate_somalier" description: Perform somalier extraction and relate stats on input VCFs keywords: diff --git a/subworkflows/nf-core/vcf_gather_bcftools/meta.yml b/subworkflows/nf-core/vcf_gather_bcftools/meta.yml index 035d131c67d..c4b0fe80fab 100644 --- a/subworkflows/nf-core/vcf_gather_bcftools/meta.yml +++ b/subworkflows/nf-core/vcf_gather_bcftools/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "vcf_gather_bcftools" description: | Concatenate several VCF files using bcftools concat. diff --git a/subworkflows/nf-core/vcf_impute_glimpse/meta.yml b/subworkflows/nf-core/vcf_impute_glimpse/meta.yml index 6ea00496945..9e0ea49ecfd 100644 --- a/subworkflows/nf-core/vcf_impute_glimpse/meta.yml +++ b/subworkflows/nf-core/vcf_impute_glimpse/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "vcf_imputation_glimpse" description: Impute VCF/BCF files with Glimpse keywords: diff --git a/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml b/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml index 5886a01f1c7..cc2b9966733 100644 --- a/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml +++ b/subworkflows/nf-core/vcf_phase_shapeit5/meta.yml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://github.com/nf-core/modules/tree/master/subworkflows/yaml-schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "vcf_phase_shapeit5" description: Phase vcf panel with Shapeit5 tools keywords: From 8f40d337e46377d2c351b36963ec6a67fb5ec37e Mon Sep 17 00:00:00 2001 From: "Kevin L. Keys" Date: Thu, 27 Apr 2023 02:04:01 -0700 Subject: [PATCH 110/120] remove imputeme module since it is evidently no longer supported (#3223) --- modules/nf-core/imputeme/vcftoprs/main.nf | 56 ------------------- modules/nf-core/imputeme/vcftoprs/meta.yml | 41 -------------- tests/config/pytest_modules.yml | 4 -- .../modules/nf-core/imputeme/vcftoprs/main.nf | 15 ----- .../nf-core/imputeme/vcftoprs/nextflow.config | 5 -- .../nf-core/imputeme/vcftoprs/test.yml | 8 --- 6 files changed, 129 deletions(-) delete mode 100644 modules/nf-core/imputeme/vcftoprs/main.nf delete mode 100644 modules/nf-core/imputeme/vcftoprs/meta.yml delete mode 100644 tests/modules/nf-core/imputeme/vcftoprs/main.nf delete mode 100644 tests/modules/nf-core/imputeme/vcftoprs/nextflow.config delete mode 100644 tests/modules/nf-core/imputeme/vcftoprs/test.yml diff --git a/modules/nf-core/imputeme/vcftoprs/main.nf b/modules/nf-core/imputeme/vcftoprs/main.nf deleted file mode 100644 index ad8fc4f0b9d..00000000000 --- a/modules/nf-core/imputeme/vcftoprs/main.nf +++ /dev/null @@ -1,56 +0,0 @@ -process IMPUTEME_VCFTOPRS { - tag "$meta.id" - label 'process_low' - - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/imputeme/vv1.0.7_cv1/imputeme_vv1.0.7_cv1.img' : - 'biocontainers/imputeme:vv1.0.7_cv1' }" - - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "IMPUTEME_VCFTOPRS module does not support Conda. Please use Docker / Singularity / Podman instead." - } - - input: - tuple val(meta), path(vcf) - - output: - tuple val(meta), path("*.json"), emit: json - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - """ - #!/usr/bin/env Rscript - - #Set configuration - either from args or from defaults - source("/imputeme/code/impute-me/functions.R") - if(file.exists('$args')){ - set_conf("set_from_file",'$args') - }else{ - set_conf("set_from_file", "/imputeme/code/impute-me/template/nextflow_default_configuration.R") - } - - #main run - return_message <- prepare_individual_genome('$vcf',overrule_vcf_checks=T) - uniqueID <- sub(' .+\$','',sub('^.+this run is ','',return_message)) - convert_vcfs_to_simple_format(uniqueID=uniqueID) - crawl_for_snps_to_analyze(uniqueIDs=uniqueID) - run_export_script(uniqueIDs=uniqueID) - file.copy(paste0("./",uniqueID,"/",uniqueID,"_data.json"),"output.json") - - #version export. Have to hardcode process name and software name because - #won't run inside an R-block - version_file_path="versions.yml" - f <- file(version_file_path,"w") - writeLines("IMPUTEME_VCFTOPRS:", f) - writeLines(paste0(" imputeme: ", sub("^v","",get_conf("version"))),f) - close(f) - - """ - -} diff --git a/modules/nf-core/imputeme/vcftoprs/meta.yml b/modules/nf-core/imputeme/vcftoprs/meta.yml deleted file mode 100644 index d8b2185f3c7..00000000000 --- a/modules/nf-core/imputeme/vcftoprs/meta.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: imputeme_vcftoprs -description: inputs a VCF-file with whole genome DNA sequencing. Outputs a JSON with polygenic risk scores. -keywords: - - PRS, VCF -tools: - - imputeme: - description: - homepage: https://www.impute.me - documentation: https://hub.docker.com/repository/docker/lassefolkersen/impute-me - tool_dev_url: https://github.com/lassefolkersen/impute-me - doi: 10.3389/fgene.2020.00578 - licence: LGPL3 - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ vcf:'test', single_end:false ] - - vcf: - type: file - description: vcf file - pattern: "*.{vcf}" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - json: - type: file - description: json containing Z-scores for all calculated PRS - pattern: "*.{json}" - -authors: - - "@lassefolkersen" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 5e54dc52b43..013adb0e51d 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1821,10 +1821,6 @@ ilastik/pixelclassification: - modules/nf-core/ilastik/pixelclassification/** - tests/modules/nf-core/ilastik/pixelclassification/** -imputeme/vcftoprs: - - modules/nf-core/imputeme/vcftoprs/** - - tests/modules/nf-core/imputeme/vcftoprs/** - instrain/profile: - modules/nf-core/instrain/profile/** - tests/modules/nf-core/instrain/profile/** diff --git a/tests/modules/nf-core/imputeme/vcftoprs/main.nf b/tests/modules/nf-core/imputeme/vcftoprs/main.nf deleted file mode 100644 index fad879a2bb3..00000000000 --- a/tests/modules/nf-core/imputeme/vcftoprs/main.nf +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { IMPUTEME_VCFTOPRS } from '../../../../../modules/nf-core/imputeme/vcftoprs/main.nf' - -workflow test_imputeme_vcftoprs { - - input = [ - [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['genome']['syntheticvcf_short_vcf_gz'], checkIfExists: true) - ] - - IMPUTEME_VCFTOPRS ( input ) -} diff --git a/tests/modules/nf-core/imputeme/vcftoprs/nextflow.config b/tests/modules/nf-core/imputeme/vcftoprs/nextflow.config deleted file mode 100644 index 8730f1c4b93..00000000000 --- a/tests/modules/nf-core/imputeme/vcftoprs/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} diff --git a/tests/modules/nf-core/imputeme/vcftoprs/test.yml b/tests/modules/nf-core/imputeme/vcftoprs/test.yml deleted file mode 100644 index 239e37c6a8c..00000000000 --- a/tests/modules/nf-core/imputeme/vcftoprs/test.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: imputeme vcftoprs test_imputeme_vcftoprs - command: nextflow run ./tests/modules/nf-core/imputeme/vcftoprs -entry test_imputeme_vcftoprs -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/imputeme/vcftoprs/nextflow.config - tags: - - imputeme - - imputeme/vcftoprs - files: - - path: output/imputeme/output.json - contains: ['type_2_diabetes_32541925":{"GRS":[24.01]'] From 5c3a343c98897b1cd65f5f0a0193e05f00f54b10 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Fri, 28 Apr 2023 09:29:08 +0200 Subject: [PATCH 111/120] Fixing failing subworkflow tests (#3343) * fixing md5sum * rearrange bam_tumor_*_variant_calling_gatk * fix paths * small refactor * fix channels * fix tumor_only subworkflow * fix all channels * fix tests --- .../main.nf | 78 ++++++------ .../nextflow.config | 6 - .../main.nf | 113 ++++++++++++++++++ .../meta.yml | 0 .../main.nf | 88 -------------- .../nextflow.config | 4 - tests/config/pytest_modules.yml | 12 +- .../nf-core/bam_create_som_pon_gatk/main.nf | 2 +- .../nf-core/bam_create_som_pon_gatk/test.yml | 2 +- .../main.nf | 33 +++-- .../nextflow.config | 29 +++++ .../test.yml | 27 ++--- .../main.nf | 25 ++++ .../nextflow.config | 13 ++ .../test.yml | 29 +++++ .../nf-core/fastq_align_dna/test.yml | 4 +- .../nf-core/fastq_align_hisat2/test.yml | 4 +- .../main.nf | 24 ---- .../test.yml | 29 ----- 19 files changed, 286 insertions(+), 236 deletions(-) delete mode 100644 subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/nextflow.config create mode 100644 subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/main.nf rename subworkflows/nf-core/{gatk_tumor_only_somatic_variant_calling => bam_tumor_only_somatic_variant_calling_gatk}/meta.yml (100%) delete mode 100644 subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/main.nf delete mode 100644 subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/nextflow.config create mode 100644 tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/nextflow.config create mode 100644 tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/main.nf create mode 100644 tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/nextflow.config create mode 100644 tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/test.yml delete mode 100644 tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/main.nf delete mode 100644 tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/test.yml diff --git a/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/main.nf b/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/main.nf index 04bc09d2e48..94b1fce1768 100644 --- a/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/main.nf +++ b/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/main.nf @@ -2,13 +2,6 @@ // Run GATK mutect2 in tumor normal mode, getepileupsummaries, calculatecontamination, learnreadorientationmodel and filtermutectcalls // -params.mutect2_options = [:] -params.learnorientation_options = [:] -params.getpileup_tumor_options = [suffix: '_tumor'] -params.getpileup_normal_options = [suffix: '_normal'] -params.calccontam_options = [:] -params.filtercalls_options = [suffix: '_filtered'] - include { GATK4_MUTECT2 as MUTECT2 } from '../../../modules/nf-core/gatk4/mutect2/main' include { GATK4_LEARNREADORIENTATIONMODEL as LEARNREADORIENTATIONMODEL } from '../../../modules/nf-core/gatk4/learnreadorientationmodel/main' include { GATK4_GETPILEUPSUMMARIES as GETPILEUPSUMMARIES_TUMOR } from '../../../modules/nf-core/gatk4/getpileupsummaries/main' @@ -18,16 +11,15 @@ include { GATK4_FILTERMUTECTCALLS as FILTERMUTECTCALLS } from '. workflow BAM_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING_GATK { take: - ch_input // channel: [ val(meta), path(input), path(input_index), val(which_norm) ] - ch_fasta // channel: [ path(fasta) ] - ch_fai // channel: [ path(fai) ] - ch_dict // channel: [ path(dict) ] - ch_germline_resource // channel: [ path(germline_resource) ] - ch_germline_resource_tbi // channel: [ path(germline_resource_tbi) ] - ch_panel_of_normals // channel: [ path(panel_of_normals) ] - ch_panel_of_normals_tbi // channel: [ path(panel_of_normals_tbi) ] - ch_interval_file // channel: [ path(interval_file) ] - + ch_input // channel: [ val(meta), path(input), path(input_index), val(which_norm) ] + ch_fasta // channel: /path/to/reference/fasta + ch_fai // channel: /path/to/reference/fasta/index + ch_dict // channel: /path/to/reference/fasta/dictionary + ch_germline_resource // channel: /path/to/germline/resource + ch_germline_resource_tbi // channel: /path/to/germline/index + ch_panel_of_normals // channel: /path/to/panel/of/normals + ch_panel_of_normals_tbi // channel: /path/to/panel/of/normals/index + ch_interval_file // channel: /path/to/interval/file main: ch_versions = Channel.empty() @@ -45,62 +37,68 @@ workflow BAM_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING_GATK { ch_panel_of_normals, ch_panel_of_normals_tbi ) + ch_versions = ch_versions.mix(MUTECT2.out.versions) // // Generate artifactpriors using learnreadorientationmodel on the f1r2 output of mutect2. // - ch_learnread_in = MUTECT2.out.f1r2.collect() - LEARNREADORIENTATIONMODEL (ch_learnread_in) - ch_versions = ch_versions.mix(LEARNREADORIENTATIONMODEL.out.versions.firs()) + LEARNREADORIENTATIONMODEL (MUTECT2.out.f1r2.collect()) + ch_versions = ch_versions.mix(LEARNREADORIENTATIONMODEL.out.versions) // // Generate pileup summary tables using getepileupsummaries. tumor sample should always be passed in as the first input and input list entries of ch_mutect2_in, // to ensure correct file order for calculatecontamination. // - ch_pileup_tumor_input = ch_input.map { - meta, input_file, input_index, which_norm -> - [meta, input_file[0], input_index[0]] + ch_pileup_tumor_input = ch_input.combine(ch_interval_file).map { + meta, input_file, input_index, which_norm, intervals -> + [meta, input_file[0], input_index[0], intervals] } - ch_pileup_normal_input = ch_input.map { - meta, input_file, input_index, which_norm -> - [meta, input_file[1], input_index[1]] + ch_pileup_normal_input = ch_input.combine(ch_interval_file).map { + meta, input_file, input_index, which_norm, intervals -> + [meta, input_file[1], input_index[1], intervals] } GETPILEUPSUMMARIES_TUMOR ( ch_pileup_tumor_input, + ch_fasta, + ch_fai, + ch_dict, ch_germline_resource, - ch_germline_resource_tbi, - ch_interval_file + ch_germline_resource_tbi ) + GETPILEUPSUMMARIES_NORMAL ( ch_pileup_normal_input, + ch_fasta, + ch_fai, + ch_dict, ch_germline_resource, - ch_germline_resource_tbi, - ch_interval_file + ch_germline_resource_tbi ) + ch_versions = ch_versions.mix(GETPILEUPSUMMARIES_TUMOR.out.versions.first()) ch_versions = ch_versions.mix(GETPILEUPSUMMARIES_NORMAL.out.versions.first()) // // Contamination and segmentation tables created using calculatecontamination on the pileup summary table. // - ch_pileup_tumor = GETPILEUPSUMMARIES_TUMOR.out.table.collect() - ch_pileup_normal = GETPILEUPSUMMARIES_NORMAL.out.table.collect() - ch_calccon_in = ch_pileup_tumor.join(ch_pileup_normal, failOnDuplicate: true, failOnMismatch: true) - CALCULATECONTAMINATION ( ch_calccon_in, true ) + ch_pileup_tumor = GETPILEUPSUMMARIES_TUMOR.out.table.collect() + ch_pileup_normal = GETPILEUPSUMMARIES_NORMAL.out.table.collect() + ch_calccon_in = ch_pileup_tumor.join(ch_pileup_normal, failOnDuplicate: true, failOnMismatch: true) + CALCULATECONTAMINATION ( ch_calccon_in ) ch_versions = ch_versions.mix(CALCULATECONTAMINATION.out.versions) // // Mutect2 calls filtered by filtermutectcalls using the artifactpriors, contamination and segmentation tables. // - ch_vcf = MUTECT2.out.vcf.collect() - ch_tbi = MUTECT2.out.tbi.collect() - ch_stats = MUTECT2.out.stats.collect() - ch_orientation = LEARNREADORIENTATIONMODEL.out.artifactprior.collect() - ch_segment = CALCULATECONTAMINATION.out.segmentation.collect() - ch_contamination = CALCULATECONTAMINATION.out.contamination.collect() + ch_vcf = MUTECT2.out.vcf.collect() + ch_tbi = MUTECT2.out.tbi.collect() + ch_stats = MUTECT2.out.stats.collect() + ch_orientation = LEARNREADORIENTATIONMODEL.out.artifactprior.collect() + ch_segment = CALCULATECONTAMINATION.out.segmentation.collect() + ch_contamination = CALCULATECONTAMINATION.out.contamination.collect() //[] is used as a placeholder for optional input to specify the contamination estimate as a value, since the contamination table is used, this is not needed. ch_contamination.add([]) diff --git a/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/nextflow.config b/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/nextflow.config deleted file mode 100644 index bb8d1bc4eee..00000000000 --- a/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/nextflow.config +++ /dev/null @@ -1,6 +0,0 @@ -params.mutect2_options = [:] -params.learnorientation_options = [:] -params.getpileup_tumor_options = [:] -params.getpileup_normal_options = [:] -params.calccontam_options = [:] -params.filtercalls_options = [:] diff --git a/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/main.nf b/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/main.nf new file mode 100644 index 00000000000..f6fb0acc7b6 --- /dev/null +++ b/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/main.nf @@ -0,0 +1,113 @@ +// +// Run GATK mutect2 in tumor only mode, getepileupsummaries, calculatecontamination and filtermutectcalls +// + +include { GATK4_MUTECT2 as MUTECT2 } from '../../../modules/nf-core/gatk4/mutect2/main' +include { GATK4_GETPILEUPSUMMARIES as GETPILEUPSUMMARIES } from '../../../modules/nf-core/gatk4/getpileupsummaries/main' +include { GATK4_CALCULATECONTAMINATION as CALCULATECONTAMINATION } from '../../../modules/nf-core/gatk4/calculatecontamination/main' +include { GATK4_FILTERMUTECTCALLS as FILTERMUTECTCALLS } from '../../../modules/nf-core/gatk4/filtermutectcalls/main' + +workflow BAM_TUMOR_ONLY_SOMATIC_VARIANT_CALLING_GATK { + take: + ch_input // channel: [ val(meta), [ input ], [ input_index ], [] ] + ch_fasta // channel: /path/to/reference/fasta + ch_fai // channel: /path/to/reference/fasta/index + ch_dict // channel: /path/to/reference/fasta/dictionary + ch_germline_resource // channel: /path/to/germline/resource + ch_germline_resource_tbi // channel: /path/to/germline/index + ch_panel_of_normals // channel: /path/to/panel/of/normals + ch_panel_of_normals_tbi // channel: /path/to/panel/of/normals/index + ch_interval_file // channel: /path/to/interval/file + + main: + ch_versions = Channel.empty() + + // + //Perform variant calling using mutect2 module in tumor single mode. + // + MUTECT2 ( + ch_input, + ch_fasta, + ch_fai, + ch_dict, + ch_germline_resource, + ch_germline_resource_tbi, + ch_panel_of_normals, + ch_panel_of_normals_tbi + ) + + ch_versions = ch_versions.mix(MUTECT2.out.versions) + + // + //Generate pileup summary table using getpileupsummaries. + // + + ch_pileup_input = ch_input.combine(ch_interval_file).map { + meta, input_file, input_index, which_norm, intervals -> + [meta, input_file, input_index, intervals] + } + + GETPILEUPSUMMARIES ( + ch_pileup_input, + ch_fasta, + ch_fai, + ch_dict, + ch_germline_resource, + ch_germline_resource_tbi + ) + + ch_versions = ch_versions.mix(GETPILEUPSUMMARIES.out.versions) + + // + //Contamination and segmentation tables created using calculatecontamination on the pileup summary table. + // + ch_pileup = GETPILEUPSUMMARIES.out.table.collect() + + //[] is a placeholder for the optional input where the matched normal sample would be passed in for tumor-normal samples, which is not necessary for this workflow. + ch_pileup.add([]) + + CALCULATECONTAMINATION ( ch_pileup ) + + ch_versions = ch_versions.mix(CALCULATECONTAMINATION.out.versions) + + // + //Mutect2 calls filtered by filtermutectcalls using the contamination and segmentation tables. + // + + ch_vcf = MUTECT2.out.vcf.collect() + ch_tbi = MUTECT2.out.tbi.collect() + ch_stats = MUTECT2.out.stats.collect() + + ch_segment = CALCULATECONTAMINATION.out.segmentation.collect() + ch_contamination = CALCULATECONTAMINATION.out.contamination.collect() + + ch_filtermutect_in = ch_vcf + .combine(ch_tbi, by: 0) + .combine(ch_stats, by: 0) + .combine(ch_segment, by: 0) + .combine(ch_contamination, by: 0) + // Adding [] as a placeholder for the optional input file artifact priors, which is only used for tumor-normal samples and therefor isn't needed in this workflow. + // and [] as a placeholder for entering a contamination estimate value, which is not needed as this workflow uses the contamination table instead. + .map{ meta, vcf, tbi, stats, segment, contamination -> [meta, vcf, tbi, stats, [], segment, contamination, [] ] } + + ch_filtermutect_in.view() + + FILTERMUTECTCALLS ( ch_filtermutect_in, ch_fasta, ch_fai, ch_dict ) + ch_versions = ch_versions.mix(FILTERMUTECTCALLS.out.versions) + + emit: + mutect2_vcf = MUTECT2.out.vcf.collect() // channel: [ val(meta), [ vcf ] ] + mutect2_index = MUTECT2.out.tbi.collect() // channel: [ val(meta), [ tbi ] ] + mutect2_stats = MUTECT2.out.stats.collect() // channel: [ val(meta), [ stats ] ] + + pileup_table = GETPILEUPSUMMARIES.out.table.collect() // channel: [ val(meta), [ table ] ] + + contamination_table = CALCULATECONTAMINATION.out.contamination.collect() // channel: [ val(meta), [ contamination ] ] + segmentation_table = CALCULATECONTAMINATION.out.segmentation.collect() // channel: [ val(meta), [ segmentation ] ] + + filtered_vcf = FILTERMUTECTCALLS.out.vcf.collect() // channel: [ val(meta), [ vcf ] ] + filtered_index = FILTERMUTECTCALLS.out.tbi.collect() // channel: [ val(meta), [ tbi ] ] + filtered_stats = FILTERMUTECTCALLS.out.stats.collect() // channel: [ val(meta), [ stats ] ] + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml b/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/meta.yml similarity index 100% rename from subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/meta.yml rename to subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/meta.yml diff --git a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/main.nf b/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/main.nf deleted file mode 100644 index ccb503defed..00000000000 --- a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/main.nf +++ /dev/null @@ -1,88 +0,0 @@ -// -// Run GATK mutect2 in tumor only mode, getepileupsummaries, calculatecontamination and filtermutectcalls -// - -params.mutect2_options = [:] -params.getpileup_options = [:] -params.calccontam_options = [:] -params.filtercalls_options = [suffix: '_filtered'] - -include { GATK4_MUTECT2 as MUTECT2 } from '../../../modules/nf-core/gatk4/mutect2/main' -include { GATK4_GETPILEUPSUMMARIES as GETPILEUPSUMMARIES } from '../../../modules/nf-core/gatk4/getpileupsummaries/main' -include { GATK4_CALCULATECONTAMINATION as CALCULATECONTAMINATION } from '../../../modules/nf-core/gatk4/calculatecontamination/main' -include { GATK4_FILTERMUTECTCALLS as FILTERMUTECTCALLS } from '../../../modules/nf-core/gatk4/filtermutectcalls/main' - -workflow GATK_TUMOR_ONLY_SOMATIC_VARIANT_CALLING { - take: - input // channel: [ val(meta), [ input ], [ input_index ], [] ] - fasta // channel: /path/to/reference/fasta - fai // channel: /path/to/reference/fasta/index - dict // channel: /path/to/reference/fasta/dictionary - germline_resource // channel: /path/to/germline/resource - germline_resource_tbi // channel: /path/to/germline/index - panel_of_normals // channel: /path/to/panel/of/normals - panel_of_normals_tbi // channel: /path/to/panel/of/normals/index - interval_file // channel: /path/to/interval/file - - - main: - ch_versions = Channel.empty() - mutect2_input = channel.from(input) - - // - //Perform variant calling using mutect2 module in tumor single mode. - // - MUTECT2 ( mutect2_input , true , false , false , [] , fasta , fai , dict , germline_resource , germline_resource_tbi , panel_of_normals , panel_of_normals_tbi ) - ch_versions = ch_versions.mix(MUTECT2.out.versions) - - // - //Generate pileup summary table using getepileupsummaries. - // - pileup_input = channel.from(input).map { - meta, input_file, input_index, which_norm -> - [meta, input_file[0], input_index[0]] - } - GETPILEUPSUMMARIES ( pileup_input , germline_resource , germline_resource_tbi , interval_file ) - ch_versions = ch_versions.mix(GETPILEUPSUMMARIES.out.versions) - - // - //Contamination and segmentation tables created using calculatecontamination on the pileup summary table. - // - ch_pileup = GETPILEUPSUMMARIES.out.table.collect() - //[] is a placeholder for the optional input where the matched normal sample would be passed in for tumor-normal samples, which is not necessary for this workflow. - ch_pileup.add([]) - CALCULATECONTAMINATION ( ch_pileup, true ) - ch_versions = ch_versions.mix(CALCULATECONTAMINATION.out.versions) - - // - //Mutect2 calls filtered by filtermutectcalls using the contamination and segmentation tables. - // - ch_vcf = MUTECT2.out.vcf.collect() - ch_tbi = MUTECT2.out.tbi.collect() - ch_stats = MUTECT2.out.stats.collect() - //[] is added as a placeholder for the optional input file artifact priors, which is only used for tumor-normal samples and therefor isn't needed in this workflow. - ch_stats.add([]) - ch_segment = CALCULATECONTAMINATION.out.segmentation.collect() - ch_contamination = CALCULATECONTAMINATION.out.contamination.collect() - //[] is added as a placeholder for entering a contamination estimate value, which is not needed as this workflow uses the contamination table instead. - ch_contamination.add([]) - ch_filtermutect_in = ch_vcf.combine(ch_tbi, by: 0).combine(ch_stats, by: 0).combine(ch_segment, by: 0).combine(ch_contamination, by: 0) - FILTERMUTECTCALLS ( ch_filtermutect_in, fasta, fai, dict ) - ch_versions = ch_versions.mix(FILTERMUTECTCALLS.out.versions) - - emit: - mutect2_vcf = MUTECT2.out.vcf.collect() // channel: [ val(meta), [ vcf ] ] - mutect2_index = MUTECT2.out.tbi.collect() // channel: [ val(meta), [ tbi ] ] - mutect2_stats = MUTECT2.out.stats.collect() // channel: [ val(meta), [ stats ] ] - - pileup_table = GETPILEUPSUMMARIES.out.table.collect() // channel: [ val(meta), [ table ] ] - - contamination_table = CALCULATECONTAMINATION.out.contamination.collect() // channel: [ val(meta), [ contamination ] ] - segmentation_table = CALCULATECONTAMINATION.out.segmentation.collect() // channel: [ val(meta), [ segmentation ] ] - - filtered_vcf = FILTERMUTECTCALLS.out.vcf.collect() // channel: [ val(meta), [ vcf ] ] - filtered_index = FILTERMUTECTCALLS.out.tbi.collect() // channel: [ val(meta), [ tbi ] ] - filtered_stats = FILTERMUTECTCALLS.out.stats.collect() // channel: [ val(meta), [ stats ] ] - - versions = ch_versions // channel: [ versions.yml ] -} diff --git a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/nextflow.config b/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/nextflow.config deleted file mode 100644 index af50c2b0a76..00000000000 --- a/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/nextflow.config +++ /dev/null @@ -1,4 +0,0 @@ -params.mutect2_options = [:] -params.getpileup_options = [:] -params.calccontam_options = [:] -params.filtercalls_options = [:] diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 013adb0e51d..d2f7073d3e6 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3360,6 +3360,10 @@ subworkflows/bam_tumor_normal_somatic_variant_calling_gatk: - subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/** - tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/** +subworkflows/bam_tumor_only_somatic_variant_calling_gatk: + - subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/** + - tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/** + subworkflows/bam_variant_calling_sort_freebayes_bcftools: - subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/** - tests/subworkflows/nf-core/bam_variant_calling_sort_freebayes_bcftools/** @@ -3452,14 +3456,6 @@ subworkflows/gatk_create_som_pon: - subworkflows/nf-core/gatk_create_som_pon/** - tests/subworkflows/nf-core/gatk_create_som_pon/** -subworkflows/gatk_tumor_normal_somatic_variant_calling: - - subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/** - - tests/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling/** - -subworkflows/gatk_tumor_only_somatic_variant_calling: - - subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/** - - tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/** - subworkflows/homer/groseq: - subworkflows/nf-core/homer/groseq/** - tests/subworkflows/nf-core/homer/groseq/** diff --git a/tests/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf b/tests/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf index 04cffe65562..77747f2ef74 100644 --- a/tests/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf +++ b/tests/subworkflows/nf-core/bam_create_som_pon_gatk/main.nf @@ -4,7 +4,7 @@ nextflow.enable.dsl = 2 include { BAM_CREATE_SOM_PON_GATK } from '../../../../subworkflows/nf-core/bam_create_som_pon_gatk/main' -workflow bam_create_som_pon_gatk { +workflow test_bam_create_som_pon_gatk { ch_mutect2_in = Channel.of( [ [ id:'test1' ], // meta map diff --git a/tests/subworkflows/nf-core/bam_create_som_pon_gatk/test.yml b/tests/subworkflows/nf-core/bam_create_som_pon_gatk/test.yml index d628391f56a..b70ab6a5e12 100644 --- a/tests/subworkflows/nf-core/bam_create_som_pon_gatk/test.yml +++ b/tests/subworkflows/nf-core/bam_create_som_pon_gatk/test.yml @@ -1,5 +1,5 @@ - name: bam_create_som_pon_gatk - command: nextflow run ./tests/subworkflows/nf-core/bam_create_som_pon_gatk -entry bam_create_som_pon_gatk -c tests/config/nextflow.config + command: nextflow run ./tests/subworkflows/nf-core/bam_create_som_pon_gatk -entry test_bam_create_som_pon_gatk -c tests/config/nextflow.config tags: - subworkflows - subworkflows/bam_create_som_pon_gatk diff --git a/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/main.nf b/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/main.nf index 305dba854a3..0524822d23b 100644 --- a/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/main.nf +++ b/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/main.nf @@ -5,22 +5,21 @@ nextflow.enable.dsl = 2 include { BAM_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING_GATK } from '../../../../subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/main' workflow test_bam_tumor_normal_somatic_variant_calling_gatk { - input = Channel.of( - [ - [ id:'test'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true) , file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) , file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), - ["testN"] - ] - ) - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_vcf_gz'], checkIfExists: true) - germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_vcf_gz_tbi'], checkIfExists: true) - panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_vcf_gz'], checkIfExists: true) - panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_vcf_gz_tbi'], checkIfExists: true) - interval_file = file(params.test_data['homo_sapiens']['genome']['genome_interval_list'], checkIfExists: true) + input = Channel.of([ + [ id:'test'], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true) , file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true)], + [file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) , file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)], + [] + ]) - GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi, interval_file ) + fasta = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)) + fai = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)) + dict = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)) + germline_resource = Channel.value(file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)) + germline_resource_tbi = Channel.value(file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)) + panel_of_normals = Channel.value(file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)) + panel_of_normals_tbi = Channel.value(file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)) + interval_file = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_21_interval_list'], checkIfExists: true)) + + BAM_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING_GATK ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi, interval_file ) } diff --git a/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/nextflow.config b/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/nextflow.config new file mode 100644 index 00000000000..b6afc9da3c0 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/nextflow.config @@ -0,0 +1,29 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: LEARNREADORIENTATIONMODEL { + ext.prefix = { "${meta.id}.artifactprior" } + } + + withName: GETPILEUPSUMMARIES_TUMOR { + ext.prefix = { "${meta.id}.tumor" } + } + + withName: GETPILEUPSUMMARIES_NORMAL { + ext.prefix = { "${meta.id}.normal" } + } + + withName: FILTERMUTECTCALLS { + ext.prefix = { "${meta.id}_filtered" } + } + + withName: CALCULATECONTAMINATION { + ext.args = { "-tumor-segmentation ${meta.id}.segmentation.table" } + } + + withName: MUTECT2 { + ext.args = { "--f1r2-tar-gz ${meta.id}.f1r2.tar.gz --normal-sample normal" } + } + +} diff --git a/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/test.yml b/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/test.yml index a60df6c23c6..882b9493f86 100644 --- a/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/test.yml +++ b/tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk/test.yml @@ -1,8 +1,8 @@ -- name: gatk_tumor_normal_somatic_variant_calling - command: nextflow run ./tests/subworkflows/nf-core/gatk_tumor_normal_somatic_variant_calling -entry test_gatk_tumor_normal_somatic_variant_calling -c tests/config/nextflow.config +- name: bam_tumor_normal_somatic_variant_calling_gatk + command: nextflow run ./tests/subworkflows/nf-core/bam_tumor_normal_somatic_variant_calling_gatk -entry test_bam_tumor_normal_somatic_variant_calling_gatk -c tests/config/nextflow.config tags: - subworkflows - - subworkflows/gatk_tumor_normal_somatic_variant_calling + - subworkflows/bam_tumor_normal_somatic_variant_calling_gatk # Modules - gatk4/mutect2 - gatk4/learnreadorientationmodel @@ -12,24 +12,23 @@ files: # gatk4 mutect2 - path: ./output/mutect2/test.vcf.gz - - path: ./output/mutect2/test.vcf.gz.stats - md5sum: 6ecb874e6a95aa48233587b876c2a7a9 - path: ./output/mutect2/test.vcf.gz.tbi - - path: ./output/mutect2/test.f1r2.tar.gz + - path: ./output/mutect2/test.vcf.gz.stats + md5sum: 17d2091015d04cbd4a26b7a67dc659e6 # gatk4 learnreadorientationmodel - - path: ./output/learnreadorientationmodel/test.tar.gz + - path: ./output/learnreadorientationmodel/test.artifactprior.tar.gz # gatk4 getpileupsummaries - - path: ./output/getpileupsummaries/test_tumor.pileups.table - md5sum: 8b1b4c8ab831eca50ee9e940463a741f - - path: ./output/getpileupsummaries/test_normal.pileups.table - md5sum: 0d19674bef2ff0700d5b02b3463dd210 + - path: ./output/getpileupsummaries/test.tumor.pileups.table + md5sum: fe35b6bc041f2df8bd1f23420af3ddf9 + - path: ./output/getpileupsummaries/test.normal.pileups.table + md5sum: 8e0ca6f66e112bd2f7ec1d31a2d62469 # gatk4 calculatecontamination - path: ./output/calculatecontamination/test.contamination.table - md5sum: 5fdcf1728cf98985ce31c038eb24e05c + md5sum: 46c708c943b453da89a3da08acfdb2a7 - path: ./output/calculatecontamination/test.segmentation.table - md5sum: 91f28bfe4727a3256810927fc5eba92f + md5sum: f4643d9319bde4efbfbe516d6fb13052 # gatk4 filtermutectcalls - path: ./output/filtermutectcalls/test_filtered.vcf.gz - path: ./output/filtermutectcalls/test_filtered.vcf.gz.filteringStats.tsv - md5sum: 98e1b87a52999eb8f429ef4a7877eb3f + md5sum: 9ae27fbd04af1a2ea574e2ff1c3a683b - path: ./output/filtermutectcalls/test_filtered.vcf.gz.tbi diff --git a/tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/main.nf b/tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/main.nf new file mode 100644 index 00000000000..3b9cbeb8580 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/main.nf @@ -0,0 +1,25 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BAM_TUMOR_ONLY_SOMATIC_VARIANT_CALLING_GATK } from '../../../../subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/main' + +workflow test_bam_tumor_only_somatic_variant_calling_gatk { + input = Channel.of([ + [ id:'test2' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), + [] + ]) + + fasta = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)) + fai = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)) + dict = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)) + germline_resource = Channel.value(file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true)) + germline_resource_tbi = Channel.value(file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true)) + panel_of_normals = Channel.value(file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true)) + panel_of_normals_tbi = Channel.value(file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true)) + interval_file = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_21_interval_list'], checkIfExists: true)) + + BAM_TUMOR_ONLY_SOMATIC_VARIANT_CALLING_GATK ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi, interval_file ) +} diff --git a/tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/nextflow.config b/tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/nextflow.config new file mode 100644 index 00000000000..40dc51018c8 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/nextflow.config @@ -0,0 +1,13 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: FILTERMUTECTCALLS { + ext.prefix = { "${meta.id}_filtered" } + } + + withName: CALCULATECONTAMINATION { + ext.args = { "-tumor-segmentation ${meta.id}.segmentation.table" } + } + +} diff --git a/tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/test.yml b/tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/test.yml new file mode 100644 index 00000000000..a5efeb5b400 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk/test.yml @@ -0,0 +1,29 @@ +- name: bam_tumor_only_somatic_variant_calling_gatk + command: nextflow run ./tests/subworkflows/nf-core/bam_tumor_only_somatic_variant_calling_gatk -entry test_bam_tumor_only_somatic_variant_calling_gatk -c tests/config/nextflow.config + tags: + - subworkflows + - subworkflows/bam_tumor_only_somatic_variant_calling_gatk + # Modules + - gatk4/mutect2 + - gatk4/getpileupsummaries + - gatk4/calculatecontamination + - gatk4/filtermutectcalls + files: + # gatk4 mutect2 + - path: output/mutect2/test2.vcf.gz + - path: output/mutect2/test2.vcf.gz.tbi + - path: output/mutect2/test2.vcf.gz.stats + md5sum: 55ed641e16089afb33cdbc478e202d3d + # gatk4 getpileupsummaries + - path: output/getpileupsummaries/test2.pileups.table + md5sum: fe35b6bc041f2df8bd1f23420af3ddf9 + # gatk4 calculatecontamination + - path: output/calculatecontamination/test2.contamination.table + md5sum: 46c708c943b453da89a3da08acfdb2a7 + - path: output/calculatecontamination/test2.segmentation.table + md5sum: f4643d9319bde4efbfbe516d6fb13052 + # gatk4 filtermutectcalls + - path: output/filtermutectcalls/test2_filtered.vcf.gz + - path: output/filtermutectcalls/test2_filtered.vcf.gz.filteringStats.tsv + md5sum: 21ed8cba1ae5aca2fe5b20e4877879bc + - path: output/filtermutectcalls/test2_filtered.vcf.gz.tbi diff --git a/tests/subworkflows/nf-core/fastq_align_dna/test.yml b/tests/subworkflows/nf-core/fastq_align_dna/test.yml index 4df14489d3e..07c391ad985 100644 --- a/tests/subworkflows/nf-core/fastq_align_dna/test.yml +++ b/tests/subworkflows/nf-core/fastq_align_dna/test.yml @@ -171,7 +171,7 @@ - subworkflows/fastq_align_dna files: - path: output/snap/test.bam - md5sum: 44ab4e6a4f98bdd0f3eafa0c7c17d056 + md5sum: 6b3188b8e48ec5c155cfe02b9a24d37a - name: fastq_align_dna test_fastq_align_snapaligner_PE command: nextflow run ./tests/subworkflows/nf-core/fastq_align_dna -entry test_fastq_align_snapaligner_PE -c ./tests/config/nextflow.config @@ -190,4 +190,4 @@ - subworkflows/fastq_align_dna files: - path: output/snap/test.bam - md5sum: 88bc0591a3ac712f49551a719c3cdcd5 + md5sum: 1f4f6c38e40ddd5da7f644bb0f794aa8 diff --git a/tests/subworkflows/nf-core/fastq_align_hisat2/test.yml b/tests/subworkflows/nf-core/fastq_align_hisat2/test.yml index 7c27ddc8921..48162ac739d 100644 --- a/tests/subworkflows/nf-core/fastq_align_hisat2/test.yml +++ b/tests/subworkflows/nf-core/fastq_align_hisat2/test.yml @@ -17,7 +17,7 @@ - path: output/samtools/test.sorted.bam - path: output/samtools/test.sorted.bam.bai - path: output/samtools/test.stats - md5sum: 866b1b188c27d9ef3003905b08ee03a2 + md5sum: de59b04575abceeb5f91d4088653baa9 - name: fastq_align_hisat2 test_fastq_align_hisat2_paired_end command: nextflow run ./tests/subworkflows/nf-core/fastq_align_hisat2 -entry test_fastq_align_hisat2_paired_end -c ./tests/config/nextflow.config @@ -38,4 +38,4 @@ - path: output/samtools/test.sorted.bam - path: output/samtools/test.sorted.bam.bai - path: output/samtools/test.stats - md5sum: e305efebe1da82ee0ead70733d460245 + md5sum: 0f64403e4f929933095d1c9c3c5ca2a3 diff --git a/tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/main.nf b/tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/main.nf deleted file mode 100644 index e9e160604a4..00000000000 --- a/tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/main.nf +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { GATK_TUMOR_ONLY_SOMATIC_VARIANT_CALLING } from '../../../../subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/main' - -workflow test_gatk_tumor_only_somatic_variant_calling { - input = [ - [[ id:'test' ], // meta map - [file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)], - [file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)], - [] ] - ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) - dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true) - germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_vcf_gz'], checkIfExists: true) - germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_vcf_gz_tbi'], checkIfExists: true) - panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_vcf_gz'], checkIfExists: true) - panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_vcf_gz_tbi'], checkIfExists: true) - interval_file = file(params.test_data['homo_sapiens']['genome']['genome_interval_list'], checkIfExists: true) - - GATK_TUMOR_ONLY_SOMATIC_VARIANT_CALLING ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi, interval_file ) -} diff --git a/tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/test.yml b/tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/test.yml deleted file mode 100644 index aa3aeec33aa..00000000000 --- a/tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling/test.yml +++ /dev/null @@ -1,29 +0,0 @@ -- name: gatk_tumor_only_somatic_variant_calling - command: nextflow run ./tests/subworkflows/nf-core/gatk_tumor_only_somatic_variant_calling -entry test_gatk_tumor_only_somatic_variant_calling -c tests/config/nextflow.config - tags: - - subworkflows - - subworkflows/gatk_tumor_only_somatic_variant_calling - # Modules - - gatk4/mutect2 - - gatk4/getpileupsummaries - - gatk4/calculatecontamination - - gatk4/filtermutectcalls - files: - # gatk4 mutect2 - - path: ./output/mutect2/test.vcf.gz - - path: ./output/mutect2/test.vcf.gz.stats - md5sum: 106c5828b02b906c97922618b6072169 - - path: ./output/mutect2/test.vcf.gz.tbi - # gatk4 getpileupsummaries - - path: ./output/getpileupsummaries/test.pileups.table - md5sum: 8b1b4c8ab831eca50ee9e940463a741f - # gatk4 calculatecontamination - - path: ./output/calculatecontamination/test.contamination.table - md5sum: 5fdcf1728cf98985ce31c038eb24e05c - - path: ./output/calculatecontamination/test.segmentation.table - md5sum: 91f28bfe4727a3256810927fc5eba92f - # gatk4 filtermutectcalls - - path: ./output/filtermutectcalls/test_filtered.vcf.gz - - path: ./output/filtermutectcalls/test_filtered.vcf.gz.filteringStats.tsv - md5sum: 8731945490960546719ce4a71a151e4f - - path: ./output/filtermutectcalls/test_filtered.vcf.gz.tbi From f2d63bd5b68925f98f572eed70993d205cc694b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20H=C3=B6rtenhuber?= Date: Fri, 28 Apr 2023 09:46:54 +0200 Subject: [PATCH 112/120] fix meta.ymls for dumpsoftware and multiqc (#3345) fix meta.ymls --- modules/nf-core/custom/dumpsoftwareversions/meta.yml | 2 ++ modules/nf-core/multiqc/meta.yml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml index 60b546a012c..c32657de7a2 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/meta.yml +++ b/modules/nf-core/custom/dumpsoftwareversions/meta.yml @@ -1,7 +1,9 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: custom_dumpsoftwareversions description: Custom module used to dump software versions within the nf-core pipeline template keywords: - custom + - dump - version tools: - custom: diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index ebc29b279d5..f93b5ee5190 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: MultiQC description: Aggregate results from bioinformatics analyses across many samples into a single report keywords: @@ -37,7 +38,7 @@ output: description: MultiQC report file pattern: "multiqc_report.html" - data: - type: dir + type: directory description: MultiQC data dir pattern: "multiqc_data" - plots: From 76cc4938c1f6ea5c7d83fed1eeffc146787f9543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Mir=20Pedrol?= Date: Fri, 28 Apr 2023 11:22:23 +0200 Subject: [PATCH 113/120] give execution permissions to dumpsoftwareversions.py (#3347) --- .../custom/dumpsoftwareversions/templates/dumpsoftwareversions.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py diff --git a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py old mode 100644 new mode 100755 From c356ef8d15e8de9b8f4a80f739dccbeae13ad698 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Fri, 28 Apr 2023 11:59:17 +0200 Subject: [PATCH 114/120] fix corrected typo in output (#3337) * fix corrected typo in output * feat add tests * fix tests --- modules/nf-core/star/align/main.nf | 7 ++++--- modules/nf-core/star/align/meta.yml | 2 +- tests/modules/nf-core/star/align/nextflow.config | 2 +- tests/modules/nf-core/star/align/test.yml | 5 +++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/nf-core/star/align/main.nf b/modules/nf-core/star/align/main.nf index 2bccf3566a5..e8bd647b695 100644 --- a/modules/nf-core/star/align/main.nf +++ b/modules/nf-core/star/align/main.nf @@ -30,7 +30,7 @@ process STAR_ALIGN { tuple val(meta), path('*.out.junction') , optional:true, emit: junction tuple val(meta), path('*.out.sam') , optional:true, emit: sam tuple val(meta), path('*.wig') , optional:true, emit: wig - tuple val(meta), path('*.bedGraph') , optional:true, emit: bedgraph + tuple val(meta), path('*.bg') , optional:true, emit: bedgraph when: task.ext.when == null || task.ext.when @@ -83,13 +83,14 @@ process STAR_ALIGN { touch ${prefix}.sortedByCoord.out.bam touch ${prefix}.toTranscriptome.out.bam touch ${prefix}.Aligned.unsort.out.bam + touch ${prefix}.Aligned.sortedByCoord.out.bam touch ${prefix}.unmapped_1.fastq.gz touch ${prefix}.unmapped_2.fastq.gz touch ${prefix}.tab touch ${prefix}.Chimeric.out.junction touch ${prefix}.out.sam - touch ${prefix}.wig - touch ${prefix}.bedGraph + touch ${prefix}.Signal.UniqueMultiple.str1.out.wig + touch ${prefix}.Signal.UniqueMultiple.str1.out.bg cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/star/align/meta.yml b/modules/nf-core/star/align/meta.yml index 5dbf8ac5837..bce16d360c4 100644 --- a/modules/nf-core/star/align/meta.yml +++ b/modules/nf-core/star/align/meta.yml @@ -81,7 +81,7 @@ output: - bedgraph: type: file description: STAR output bedGraph format file(s) (optional) - pattern: "*.bedGraph" + pattern: "*.bg" authors: - "@kevinmenden" diff --git a/tests/modules/nf-core/star/align/nextflow.config b/tests/modules/nf-core/star/align/nextflow.config index 751f7837926..bdf3cff545d 100644 --- a/tests/modules/nf-core/star/align/nextflow.config +++ b/tests/modules/nf-core/star/align/nextflow.config @@ -7,7 +7,7 @@ process { } withName: STAR_ALIGN { - ext.args = '--readFilesCommand zcat' + ext.args = '--readFilesCommand zcat --outSAMtype BAM SortedByCoordinate --outWigType bedGraph --outWigStrand Unstranded' } withName: STAR_FOR_ARRIBA { diff --git a/tests/modules/nf-core/star/align/test.yml b/tests/modules/nf-core/star/align/test.yml index 08fc762ed52..14c8838b0d2 100644 --- a/tests/modules/nf-core/star/align/test.yml +++ b/tests/modules/nf-core/star/align/test.yml @@ -35,7 +35,7 @@ md5sum: 9e4f991abbbfeb3935a2bb21b9e258f1 - path: output/star/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - - path: output/star/test.Aligned.out.bam + - path: output/star/test.Aligned.sortedByCoord.out.bam - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out @@ -78,11 +78,12 @@ md5sum: 9e4f991abbbfeb3935a2bb21b9e258f1 - path: output/star/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - - path: output/star/test.Aligned.out.bam + - path: output/star/test.Aligned.sortedByCoord.out.bam - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out - path: output/star/test.SJ.out.tab + - path: output/star/test.Signal.UniqueMultiple.str1.out.bg - name: star align test_star_alignment_paired_end_for_fusion command: nextflow run ./tests/modules/nf-core/star/align -entry test_star_alignment_paired_end_for_fusion -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/star/align/nextflow.config From 140d5a0d014138524e21dea80588817ddfc5dcf4 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Fri, 28 Apr 2023 15:22:04 +0200 Subject: [PATCH 115/120] Output channel modification star (#3350) * feat add channel to emit splice juntions and reads per gene * feat add SJ and ReadsPerGene to stubs out --- modules/nf-core/star/align/main.nf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nf-core/star/align/main.nf b/modules/nf-core/star/align/main.nf index e8bd647b695..e6c4443cbaf 100644 --- a/modules/nf-core/star/align/main.nf +++ b/modules/nf-core/star/align/main.nf @@ -27,6 +27,8 @@ process STAR_ALIGN { tuple val(meta), path('*Aligned.unsort.out.bam') , optional:true, emit: bam_unsorted tuple val(meta), path('*fastq.gz') , optional:true, emit: fastq tuple val(meta), path('*.tab') , optional:true, emit: tab + tuple val(meta), path('*.SJ.out.tab') , optional:true, emit: spl_junc_tab + tuple val(meta), path('*.ReadsPerGene.out.tab') , optional:true, emit: read_per_gene_tab tuple val(meta), path('*.out.junction') , optional:true, emit: junction tuple val(meta), path('*.out.sam') , optional:true, emit: sam tuple val(meta), path('*.wig') , optional:true, emit: wig @@ -87,6 +89,8 @@ process STAR_ALIGN { touch ${prefix}.unmapped_1.fastq.gz touch ${prefix}.unmapped_2.fastq.gz touch ${prefix}.tab + touch ${prefix}.SJ.out.tab + touch ${prefix}.ReadsPerGene.out.tab touch ${prefix}.Chimeric.out.junction touch ${prefix}.out.sam touch ${prefix}.Signal.UniqueMultiple.str1.out.wig From 7be616acb9436d748631011420d3c8f73c181cbe Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Fri, 28 Apr 2023 17:02:14 +0100 Subject: [PATCH 116/120] Add space to fix singularity download error on shinyngs modules (#3351) --- modules/nf-core/shinyngs/app/main.nf | 2 +- modules/nf-core/shinyngs/staticdifferential/main.nf | 2 +- modules/nf-core/shinyngs/staticexploratory/main.nf | 2 +- modules/nf-core/shinyngs/validatefomcomponents/main.nf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/shinyngs/app/main.nf b/modules/nf-core/shinyngs/app/main.nf index 9c8dafd93c4..824ef909e0a 100644 --- a/modules/nf-core/shinyngs/app/main.nf +++ b/modules/nf-core/shinyngs/app/main.nf @@ -15,7 +15,7 @@ process SHINYNGS_APP { conda "bioconda::r-shinyngs=1.7.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0': + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0' : 'quay.io/biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }" input: diff --git a/modules/nf-core/shinyngs/staticdifferential/main.nf b/modules/nf-core/shinyngs/staticdifferential/main.nf index 1225467e1b4..f75ea6f1a03 100644 --- a/modules/nf-core/shinyngs/staticdifferential/main.nf +++ b/modules/nf-core/shinyngs/staticdifferential/main.nf @@ -4,7 +4,7 @@ process SHINYNGS_STATICDIFFERENTIAL { conda "bioconda::r-shinyngs=1.7.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0': + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0' : 'quay.io/biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }" input: diff --git a/modules/nf-core/shinyngs/staticexploratory/main.nf b/modules/nf-core/shinyngs/staticexploratory/main.nf index 4c33b3cba1c..29e2e24f346 100644 --- a/modules/nf-core/shinyngs/staticexploratory/main.nf +++ b/modules/nf-core/shinyngs/staticexploratory/main.nf @@ -4,7 +4,7 @@ process SHINYNGS_STATICEXPLORATORY { conda "bioconda::r-shinyngs=1.7.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0': + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0' : 'quay.io/biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }" input: diff --git a/modules/nf-core/shinyngs/validatefomcomponents/main.nf b/modules/nf-core/shinyngs/validatefomcomponents/main.nf index 524689ff9f7..f8a17c4189f 100644 --- a/modules/nf-core/shinyngs/validatefomcomponents/main.nf +++ b/modules/nf-core/shinyngs/validatefomcomponents/main.nf @@ -4,7 +4,7 @@ process SHINYNGS_VALIDATEFOMCOMPONENTS { conda "bioconda::r-shinyngs=1.7.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0': + 'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0' : 'quay.io/biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }" input: From d68b2e6526fcd22a2a6349e0859dbdc9924df93d Mon Sep 17 00:00:00 2001 From: "Kevin L. Keys" Date: Fri, 28 Apr 2023 09:26:37 -0700 Subject: [PATCH 117/120] added cellranger vdj/mkvdjref modules, with module test for vdj (#3033) * added cellranger vdj/mkvdjref modules, with module test for vdj * fixed linting issues part 1 * make that code prettypretty * fixes from review, part 1 * fixes from review, part 2 * leave meta.gem alone * updated cellranger vdj module test * added test for cellranger mkvdjref * meta.gem --> meta.id, whitespace fix, and pytest update * fixed a bunch of small errors in module test, tests execute successfully on local machine * ax md5sums for empty files * fixed md5sum disagreement in cellranger/mkvdjref test * make code prettypretty * clean up cellranger modules, remove nonexistent 'cellranger/gtf' module, update md5sums for tests, and light formatting * updated files per 3rd party review * corrected cellranger count sample name for module test * fixed linting errors * fixed mysterious revert of cellranger/count test * added cellranger vdj + mkvdjref to excluded conda test workflows * Add prefix rather than using meta.id, removed --sample. * Indentation * Update modules/nf-core/cellranger/mkvdjref/main.nf Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> * Update modules/nf-core/cellranger/vdj/main.nf Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> * Update modules/nf-core/cellranger/count/main.nf Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> * Update to use docker.io --------- Co-authored-by: Simon Pearce Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> --- .github/workflows/pytest-workflow.yml | 4 ++ modules/nf-core/cellranger/count/main.nf | 18 +++---- modules/nf-core/cellranger/count/meta.yml | 5 +- modules/nf-core/cellranger/mkfastq/main.nf | 20 ++++--- modules/nf-core/cellranger/mkgtf/main.nf | 7 +-- modules/nf-core/cellranger/mkref/main.nf | 2 +- modules/nf-core/cellranger/mkvdjref/main.nf | 39 ++++++++++++++ modules/nf-core/cellranger/mkvdjref/meta.yml | 40 ++++++++++++++ modules/nf-core/cellranger/vdj/main.nf | 54 +++++++++++++++++++ modules/nf-core/cellranger/vdj/meta.yml | 44 +++++++++++++++ tests/config/pytest_modules.yml | 20 ++++--- tests/config/test_data.config | 11 +++- .../modules/nf-core/cellranger/count/main.nf | 2 +- .../nf-core/cellranger/count/nextflow.config | 2 +- .../modules/nf-core/cellranger/count/test.yml | 48 ++++++++++------- .../modules/nf-core/cellranger/mkref/test.yml | 2 +- .../nf-core/cellranger/mkvdjref/main.nf | 16 ++++++ .../cellranger/mkvdjref/nextflow.config | 5 ++ .../nf-core/cellranger/mkvdjref/test.yml | 10 ++++ tests/modules/nf-core/cellranger/vdj/main.nf | 27 ++++++++++ .../nf-core/cellranger/vdj/nextflow.config | 5 ++ tests/modules/nf-core/cellranger/vdj/test.yml | 51 ++++++++++++++++++ 22 files changed, 376 insertions(+), 56 deletions(-) create mode 100644 modules/nf-core/cellranger/mkvdjref/main.nf create mode 100644 modules/nf-core/cellranger/mkvdjref/meta.yml create mode 100644 modules/nf-core/cellranger/vdj/main.nf create mode 100644 modules/nf-core/cellranger/vdj/meta.yml create mode 100644 tests/modules/nf-core/cellranger/mkvdjref/main.nf create mode 100644 tests/modules/nf-core/cellranger/mkvdjref/nextflow.config create mode 100644 tests/modules/nf-core/cellranger/mkvdjref/test.yml create mode 100644 tests/modules/nf-core/cellranger/vdj/main.nf create mode 100644 tests/modules/nf-core/cellranger/vdj/nextflow.config create mode 100644 tests/modules/nf-core/cellranger/vdj/test.yml diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index db46289add9..3959f62b49e 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -64,6 +64,10 @@ jobs: tags: cellranger/mkgtf - profile: "conda" tags: cellranger/mkref + - profile: "conda" + tags: cellranger/mkvdjref + - profile: "conda" + tags: cellranger/vdj - profile: "conda" tags: coreograph - profile: "conda" diff --git a/modules/nf-core/cellranger/count/main.nf b/modules/nf-core/cellranger/count/main.nf index 5c143b53660..7c481d6ede8 100644 --- a/modules/nf-core/cellranger/count/main.nf +++ b/modules/nf-core/cellranger/count/main.nf @@ -1,8 +1,8 @@ process CELLRANGER_COUNT { - tag "$meta.gem" + tag "$meta.id" label 'process_high' - container "nfcore/cellranger:7.1.0" + container "docker.io/nfcore/cellranger:7.1.0" // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { @@ -14,23 +14,22 @@ process CELLRANGER_COUNT { path reference output: - tuple val(meta), path("sample-${meta.gem}/outs/*"), emit: outs - path "versions.yml" , emit: versions + tuple val(meta), path("**/outs/**"), emit: outs + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def sample_arg = meta.samples.unique().join(",") + def prefix = task.ext.prefix ?: "${meta.id}" def reference_name = reference.name """ cellranger \\ count \\ - --id='sample-${meta.gem}' \\ + --id='$prefix' \\ --fastqs=. \\ --transcriptome=$reference_name \\ - --sample=$sample_arg \\ --localcores=$task.cpus \\ --localmem=${task.memory.toGiga()} \\ $args @@ -42,9 +41,10 @@ process CELLRANGER_COUNT { """ stub: + def prefix = task.ext.prefix ?: "${meta.id}" """ - mkdir -p "sample-${meta.gem}/outs/" - touch sample-${meta.gem}/outs/fake_file.txt + mkdir -p "${prefix}/outs/" + touch ${prefix}/outs/fake_file.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/cellranger/count/meta.yml b/modules/nf-core/cellranger/count/meta.yml index f0d1fef0a31..51d82dd59fa 100644 --- a/modules/nf-core/cellranger/count/meta.yml +++ b/modules/nf-core/cellranger/count/meta.yml @@ -23,14 +23,15 @@ input: description: | List of input FastQ files of size 1 and 2 for single-end and paired-end data, respectively. + pattern: "${Sample_Name}_S1_L00${Lane_Number}_${I1,I2,R1,R2}_001.fastq.gz" - reference: type: directory description: Folder containing all the reference indices needed by Cell Ranger output: - outs: type: file - description: Files containing the outputs of Cell Ranger - pattern: "sample-${meta.gem}/outs/*" + description: Files containing the outputs of Cell Ranger, see official 10X Genomics documentation for a complete list + pattern: "${meta.id}/outs/*" - versions: type: file description: File containing software version diff --git a/modules/nf-core/cellranger/mkfastq/main.nf b/modules/nf-core/cellranger/mkfastq/main.nf index 1185bec65af..f57780afbf0 100644 --- a/modules/nf-core/cellranger/mkfastq/main.nf +++ b/modules/nf-core/cellranger/mkfastq/main.nf @@ -2,7 +2,7 @@ process CELLRANGER_MKFASTQ { tag "mkfastq" label 'process_medium' - container "nfcore/cellrangermkfastq:7.1.0" + container "docker.io/nfcore/cellrangermkfastq:7.1.0" // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { @@ -14,18 +14,21 @@ process CELLRANGER_MKFASTQ { path csv output: - path "versions.yml", emit: versions - path "${bcl.getSimpleName()}/outs/fastq_path/*.fastq.gz" , emit: fastq + path "**/outs/fastq_path/*.fastq.gz", emit: fastq + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${bcl.getSimpleName()}" """ - cellranger mkfastq --id=${bcl.getSimpleName()} \ - --run=$bcl \ - --csv=$csv \ + cellranger \\ + mkfastq \\ + --id=${prefix} \\ + --run=$bcl \\ + --csv=$csv \\ $args cat <<-END_VERSIONS > versions.yml @@ -35,9 +38,10 @@ process CELLRANGER_MKFASTQ { """ stub: + def prefix = task.ext.prefix ?: "${bcl.getSimpleName()}" """ - mkdir -p "${bcl.getSimpleName()}/outs/fastq_path/" - touch ${bcl.getSimpleName()}/outs/fastq_path/fake_file.fastq.gz + mkdir -p "${prefix}/outs/fastq_path/" + touch ${prefix}/outs/fastq_path/fake_file.fastq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/cellranger/mkgtf/main.nf b/modules/nf-core/cellranger/mkgtf/main.nf index 2e75a15395b..40a27a31725 100644 --- a/modules/nf-core/cellranger/mkgtf/main.nf +++ b/modules/nf-core/cellranger/mkgtf/main.nf @@ -2,7 +2,7 @@ process CELLRANGER_MKGTF { tag "$gtf" label 'process_low' - container "nfcore/cellranger:7.1.0" + container "docker.io/nfcore/cellranger:7.1.0" // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { @@ -13,7 +13,7 @@ process CELLRANGER_MKGTF { path gtf output: - path "*.filtered.gtf", emit: gtf + path "*.gtf" , emit: gtf path "versions.yml" , emit: versions when: @@ -21,11 +21,12 @@ process CELLRANGER_MKGTF { script: def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${gtf.baseName}.filtered" """ cellranger \\ mkgtf \\ $gtf \\ - ${gtf.baseName}.filtered.gtf \\ + ${prefix}.gtf \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/cellranger/mkref/main.nf b/modules/nf-core/cellranger/mkref/main.nf index 94a41202660..d3826f97790 100644 --- a/modules/nf-core/cellranger/mkref/main.nf +++ b/modules/nf-core/cellranger/mkref/main.nf @@ -2,7 +2,7 @@ process CELLRANGER_MKREF { tag "$fasta" label 'process_high' - container "nfcore/cellranger:7.1.0" + container "docker.io/nfcore/cellranger:7.1.0" // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { diff --git a/modules/nf-core/cellranger/mkvdjref/main.nf b/modules/nf-core/cellranger/mkvdjref/main.nf new file mode 100644 index 00000000000..25813f7f22f --- /dev/null +++ b/modules/nf-core/cellranger/mkvdjref/main.nf @@ -0,0 +1,39 @@ +process CELLRANGER_MKVDJREF { + tag "$fasta" + label 'process_high' + + container "docker.io/nfcore/cellranger:7.1.0" + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "CELLRANGER_MKREF module does not support Conda. Please use Docker / Singularity / Podman instead." + } + + input: + path fasta + path gtf + val reference_name + + output: + path "${reference_name}", emit: reference + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + cellranger \\ + mkvdjref \\ + --genome=$reference_name \\ + --fasta=$fasta \\ + --genes=$gtf \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cellranger: \$(echo \$( cellranger --version 2>&1) | sed 's/^.*[^0-9]\\([0-9]*\\.[0-9]*\\.[0-9]*\\).*\$/\\1/' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/cellranger/mkvdjref/meta.yml b/modules/nf-core/cellranger/mkvdjref/meta.yml new file mode 100644 index 00000000000..efa1fd8e90d --- /dev/null +++ b/modules/nf-core/cellranger/mkvdjref/meta.yml @@ -0,0 +1,40 @@ +name: cellranger_mkvdjref +description: Module to build the VDJ reference needed by the 10x Genomics Cell Ranger tool. Uses the cellranger mkvdjref command. +keywords: + - reference + - mkvdjref + - index + - immunoprofiling + - single-cell + - cellranger +tools: + - cellranger: + description: Cell Ranger processes data from 10X Genomics Chromium kits. `cellranger vdj` takes FASTQ files from `cellranger mkfastq` or `bcl2fastq` for V(D)J libraries and performs sequence assembly and paired clonotype calling. It uses the Chromium cellular barcodes and UMIs to assemble V(D)J transcripts per cell. Clonotypes and CDR3 sequences are output as a `.vloupe` file which can be loaded into Loupe V(D)J Browser. + homepage: https://support.10xgenomics.com/single-cell-vdj/software/pipelines/latest/what-is-cell-ranger + documentation: https://support.10xgenomics.com/single-cell-vdj/software/pipelines/latest/advanced/references + tool_dev_url: https://support.10xgenomics.com/single-cell-vdj/software/pipelines/latest/advanced/references + licence: 10x Genomics EULA +input: + - fasta: + type: file + description: Reference genome FASTA file + pattern: "*.{fasta,fa}" + - genes: + type: file + description: Reference transcriptome GTF file + pattern: "*.gtf" + - genome: + type: val + description: The name to give the new reference folder, e.g. `my_vdj_ref` + pattern: str +output: + - reference: + type: directory + description: Folder containing all the reference indices needed by Cell Ranger + - versions: + type: file + description: File containing software version + pattern: "versions.yml" +authors: + - "@ggabernet" + - "@klkeys" diff --git a/modules/nf-core/cellranger/vdj/main.nf b/modules/nf-core/cellranger/vdj/main.nf new file mode 100644 index 00000000000..9679fad74ff --- /dev/null +++ b/modules/nf-core/cellranger/vdj/main.nf @@ -0,0 +1,54 @@ +process CELLRANGER_VDJ { + tag "${meta.id}" + label 'process_high' + + container "docker.io/nfcore/cellranger:7.1.0" + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "CELLRANGER_VDJ module does not support Conda. Please use Docker / Singularity / Podman instead." + } + + input: + tuple val(meta), path(reads) + path reference + + output: + tuple val(meta), path("**/outs/**"), emit: outs + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def reference_name = reference.name + """ + cellranger \\ + vdj \\ + --id='${prefix}' \\ + --fastqs=. \\ + --reference=$reference_name \\ + --localcores=${task.cpus} \\ + --localmem=${task.memory.toGiga()} \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cellranger: \$(echo \$( cellranger --version 2>&1) | sed 's/^.*[^0-9]\\([0-9]*\\.[0-9]*\\.[0-9]*\\).*\$/\\1/' ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + mkdir -p "${meta.id}/outs/" + touch ${meta.id}/outs/fake_file.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cellranger: \$(echo \$( cellranger --version 2>&1) | sed 's/^.*[^0-9]\\([0-9]*\\.[0-9]*\\.[0-9]*\\).*\$/\\1/' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/cellranger/vdj/meta.yml b/modules/nf-core/cellranger/vdj/meta.yml new file mode 100644 index 00000000000..c08f1a374c1 --- /dev/null +++ b/modules/nf-core/cellranger/vdj/meta.yml @@ -0,0 +1,44 @@ +name: cellranger_vdj +description: Module to use Cell Ranger's pipelines analyze sequencing data produced from Chromium Single Cell Immune Profiling. +keywords: + - align + - vdj + - reference + - immunoprofiling + - single-cell + - cellranger +tools: + - cellranger: + description: Cell Ranger processes data from 10X Genomics Chromium kits. `cellranger vdj` takes FASTQ files from `cellranger mkfastq` or `bcl2fastq` for V(D)J libraries and performs sequence assembly and paired clonotype calling. It uses the Chromium cellular barcodes and UMIs to assemble V(D)J transcripts per cell. Clonotypes and CDR3 sequences are output as a `.vloupe` file which can be loaded into Loupe V(D)J Browser. + homepage: https://support.10xgenomics.com/single-cell-vdj/software/pipelines/latest/what-is-cell-ranger + documentation: https://support.10xgenomics.com/single-cell-vdj/software/pipelines/latest/tutorial/tutorial-vdj + tool_dev_url: https://support.10xgenomics.com/single-cell-vdj/software/pipelines/latest/tutorial/tutorial-vdj + licence: 10x Genomics EULA +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + pattern: "${Sample_Name}_S1_L00${Lane_Number}_${I1,I2,R1,R2}_001.fastq.gz" + - reference: + type: directory + description: Folder containing all the reference indices needed by Cell Ranger +output: + - outs: + type: file + description: Files containing the outputs of Cell Ranger, see official 10X Genomics documentation for a complete list + pattern: "${meta.id}/outs/*" + - versions: + type: file + description: File containing software version + pattern: "versions.yml" +authors: + - "@ggabernet" + - "@Emiller88" + - "@klkeys" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index d2f7073d3e6..5c6af0b59d3 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -625,12 +625,8 @@ cellranger/count: - tests/modules/nf-core/cellranger/count/** - modules/nf-core/cellranger/mkref/** - tests/modules/nf-core/cellranger/mkref/** - - modules/nf-core/cellranger/gtf/** - - tests/modules/nf-core/cellranger/gtf/** - -cellranger/gtf: - - modules/nf-core/cellranger/gtf/** - - tests/modules/nf-core/cellranger/gtf/** + - modules/nf-core/cellranger/mkgtf/** + - tests/modules/nf-core/cellranger/mkgtf/** cellranger/mkfastq: - modules/nf-core/cellranger/mkfastq/** @@ -643,8 +639,16 @@ cellranger/mkgtf: cellranger/mkref: - modules/nf-core/cellranger/mkref/** - tests/modules/nf-core/cellranger/mkref/** - - modules/nf-core/cellranger/gtf/** - - tests/modules/nf-core/cellranger/gtf/** + - modules/nf-core/cellranger/mkgtf/** + - tests/modules/nf-core/cellranger/mkgtf/** + +cellranger/mkvdjref: + - modules/nf-core/cellranger/mkvdjref/** + - tests/modules/nf-core/cellranger/mkvdjref/** + +cellranger/vdj: + - modules/nf-core/cellranger/vdj/** + - tests/modules/nf-core/cellranger/vdj/** centrifuge/centrifuge: - modules/nf-core/centrifuge/centrifuge/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index d27fbf8fe58..9ca425d4b08 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -388,8 +388,15 @@ params { test_narrowpeak = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/narrowpeak/test.narrowPeak" test2_narrowpeak = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/narrowpeak/test2.narrowPeak" - test_10x_1_fastq_gz = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R1_001.fastq.gz" - test_10x_2_fastq_gz = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R2_001.fastq.gz" + test_10x_1_fastq_gz = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R1_001.fastq.gz" + test_10x_2_fastq_gz = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R2_001.fastq.gz" + + test_10x_b_1_fastq_gz = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/10xgenomics/cellranger_vdj/subsampled_sc5p_v2_hs_B_1k_b_fastqs/subsampled_sc5p_v2_hs_B_1k_b_S1_L001_R1_001.fastq.gz" + test_10x_b_2_fastq_gz = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/10xgenomics/cellranger_vdj/subsampled_sc5p_v2_hs_B_1k_b_fastqs/subsampled_sc5p_v2_hs_B_1k_b_S1_L001_R2_001.fastq.gz" + + test_10x_vdj_ref_json = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/10xgenomics/cellranger_vdj/refdata-cellranger-vdj-GRCh38-alts-ensembl-5.0.0/reference.json" + test_10x_vdj_ref_fasta = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/10xgenomics/cellranger_vdj/refdata-cellranger-vdj-GRCh38-alts-ensembl-5.0.0/fasta/regions.fa" + test_10x_vdj_ref_suppfasta = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/10xgenomics/cellranger_vdj/refdata-cellranger-vdj-GRCh38-alts-ensembl-5.0.0/fasta/supp_regions.fa" test_yak = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/yak/test.yak" test2_yak = "${params.test_data_base}/data/genomics/homo_sapiens/illumina/yak/test2.yak" diff --git a/tests/modules/nf-core/cellranger/count/main.nf b/tests/modules/nf-core/cellranger/count/main.nf index f4746db4bfd..a1aa34521be 100644 --- a/tests/modules/nf-core/cellranger/count/main.nf +++ b/tests/modules/nf-core/cellranger/count/main.nf @@ -8,7 +8,7 @@ include { CELLRANGER_COUNT } from '../../../../../modules/nf-core/cellranger/cou workflow test_cellranger_count { - input = [ [ id:'test', single_end:true, strandedness:'forward', gem: '123', samples: ["test_10x"] ], // meta map + input = [ [ id:'test_10x', single_end:false, strandedness:'auto' ], // meta map [ file(params.test_data['homo_sapiens']['illumina']['test_10x_1_fastq_gz'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_10x_2_fastq_gz'], checkIfExists: true) ] diff --git a/tests/modules/nf-core/cellranger/count/nextflow.config b/tests/modules/nf-core/cellranger/count/nextflow.config index def33d36f23..16419fce161 100644 --- a/tests/modules/nf-core/cellranger/count/nextflow.config +++ b/tests/modules/nf-core/cellranger/count/nextflow.config @@ -25,7 +25,7 @@ process { } withName: CELLRANGER_COUNT { - ext.args = '--chemistry SC3Pv3 --description sample-123' + ext.args = '--chemistry SC3Pv3' } } diff --git a/tests/modules/nf-core/cellranger/count/test.yml b/tests/modules/nf-core/cellranger/count/test.yml index 683ac0dca61..008f3654fa6 100644 --- a/tests/modules/nf-core/cellranger/count/test.yml +++ b/tests/modules/nf-core/cellranger/count/test.yml @@ -1,8 +1,8 @@ - name: cellranger count test_cellranger_count command: nextflow run ./tests/modules/nf-core/cellranger/count -entry test_cellranger_count -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/cellranger/count/nextflow.config tags: - - cellranger/count - cellranger + - cellranger/count files: - path: output/cellranger/genome.filtered.gtf md5sum: a8b8a7b5039e05d3a9cf9151ea138b5b @@ -13,7 +13,7 @@ - path: output/cellranger/homo_sapiens_chr22_reference/genes/genes.gtf.gz md5sum: d1e05cd46684fa26d852b6bc9f05e31f - path: output/cellranger/homo_sapiens_chr22_reference/reference.json - md5sum: 8405fd7f527a944eafb9c2909045840b + md5sum: ec937ee57f457360ca4969051876c79a - path: output/cellranger/homo_sapiens_chr22_reference/star/Genome md5sum: 897cec2d191945335f8b320438bd9135 - path: output/cellranger/homo_sapiens_chr22_reference/star/SA @@ -35,28 +35,36 @@ - path: output/cellranger/homo_sapiens_chr22_reference/star/geneInfo.tab md5sum: 02a8f4575bdfcd4a42b4d8d07f2e9369 - path: output/cellranger/homo_sapiens_chr22_reference/star/genomeParameters.txt - contains: ["genomeGenerate"] + contains: + - "2.7.1a" - path: output/cellranger/homo_sapiens_chr22_reference/star/sjdbInfo.txt md5sum: 1082ab459363b3f2f7aabcef0979c1ed + - path: output/cellranger/homo_sapiens_chr22_reference/star/sjdbList.fromGTF.out.tab + - path: output/cellranger/homo_sapiens_chr22_reference/star/sjdbList.out.tab - path: output/cellranger/homo_sapiens_chr22_reference/star/transcriptInfo.tab md5sum: cedcb5f4e7d97bc548cd5daa022e092c - - path: output/cellranger/sample-123/outs/filtered_feature_bc_matrix.h5 - md5sum: f8b6b7cc8248151a98c46d4ebec450c6 - - path: output/cellranger/sample-123/outs/metrics_summary.csv + - path: output/cellranger/test_10x/outs/filtered_feature_bc_matrix.h5 + md5sum: 2f665c9a4bb7d2c128af956f56aec410 + - path: output/cellranger/test_10x/outs/filtered_feature_bc_matrix/barcodes.tsv.gz + - path: output/cellranger/test_10x/outs/filtered_feature_bc_matrix/features.tsv.gz + - path: output/cellranger/test_10x/outs/filtered_feature_bc_matrix/matrix.mtx.gz + - path: output/cellranger/test_10x/outs/metrics_summary.csv md5sum: 707df0f101d479d93f412ca74f9c4131 - - path: output/cellranger/sample-123/outs/molecule_info.h5 - md5sum: a13bd7425f441c8d0eac8ffc50082996 - - path: output/cellranger/sample-123/outs/possorted_genome_bam.bam - md5sum: 15441da9cfceea0bb48c8b66b1b860df - - path: output/cellranger/sample-123/outs/possorted_genome_bam.bam.bai - md5sum: 7c3d49c77016a09535aff61a027f750c - - path: output/cellranger/sample-123/outs/raw_feature_bc_matrix.h5 - md5sum: a5290f3e300a4070f3d68a0c2e215f54 - - path: output/cellranger/sample-123/outs/raw_feature_bc_matrix/barcodes.tsv.gz + - path: output/cellranger/test_10x/outs/molecule_info.h5 + md5sum: 6e65ed1d0e0dbd96c57edebff0767e33 + - path: output/cellranger/test_10x/outs/possorted_genome_bam.bam + md5sum: 80b349b937a40535d0376f92de61cd57 + - path: output/cellranger/test_10x/outs/possorted_genome_bam.bam.bai + md5sum: 569f13ca6822a935f2435a18be606f17 + - path: output/cellranger/test_10x/outs/raw_feature_bc_matrix.h5 + md5sum: 5f745f96ac38c78281b73f8864e9d92d + - path: output/cellranger/test_10x/outs/raw_feature_bc_matrix/barcodes.tsv.gz md5sum: 5cc39ef0c7ac85f2b758b164aabf9157 - - path: output/cellranger/sample-123/outs/raw_feature_bc_matrix/features.tsv.gz + - path: output/cellranger/test_10x/outs/raw_feature_bc_matrix/features.tsv.gz md5sum: 07d497c7ce3e22f374af7b2cf9b97d72 - - path: output/cellranger/sample-123/outs/raw_feature_bc_matrix/matrix.mtx.gz - md5sum: bdce94a51f16e22d40301724080b76ee - - path: output/cellranger/sample-123/outs/web_summary.html - contains: ["sample-123"] + - path: output/cellranger/test_10x/outs/raw_feature_bc_matrix/matrix.mtx.gz + md5sum: 3c7abf522bf3120b120d2f6420bbdf3c + - path: output/cellranger/test_10x/outs/web_summary.html + contains: + - "test_10x" + - path: output/cellranger/versions.yml diff --git a/tests/modules/nf-core/cellranger/mkref/test.yml b/tests/modules/nf-core/cellranger/mkref/test.yml index 0cb1d14e840..157a85d9e03 100644 --- a/tests/modules/nf-core/cellranger/mkref/test.yml +++ b/tests/modules/nf-core/cellranger/mkref/test.yml @@ -11,7 +11,7 @@ - path: output/cellranger/homo_sapiens_chr22_reference/genes/genes.gtf.gz md5sum: 6d9b5f409bfea95022bc25b9590e194e - path: output/cellranger/homo_sapiens_chr22_reference/reference.json - md5sum: 6cc817f0923062e780e6573806840cea + md5sum: 413e3a660c480b185083c4137cc3829d - path: output/cellranger/homo_sapiens_chr22_reference/star/Genome md5sum: 22102926fadf5890e905ca71b2da3f35 - path: output/cellranger/homo_sapiens_chr22_reference/star/SA diff --git a/tests/modules/nf-core/cellranger/mkvdjref/main.nf b/tests/modules/nf-core/cellranger/mkvdjref/main.nf new file mode 100644 index 00000000000..0129c707eb8 --- /dev/null +++ b/tests/modules/nf-core/cellranger/mkvdjref/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CELLRANGER_MKVDJREF } from '../../../../../modules/nf-core/cellranger/mkvdjref/main.nf' + +workflow test_cellranger_mkvdjref { + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) + reference_name = "homo_sapiens_chr22_reference" + + CELLRANGER_MKVDJREF ( fasta, + gtf, + reference_name ) +} diff --git a/tests/modules/nf-core/cellranger/mkvdjref/nextflow.config b/tests/modules/nf-core/cellranger/mkvdjref/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/cellranger/mkvdjref/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/cellranger/mkvdjref/test.yml b/tests/modules/nf-core/cellranger/mkvdjref/test.yml new file mode 100644 index 00000000000..6f07e88938c --- /dev/null +++ b/tests/modules/nf-core/cellranger/mkvdjref/test.yml @@ -0,0 +1,10 @@ +- name: cellranger mkvdjref test_cellranger_mkvdjref + command: nextflow run ./tests/modules/nf-core/cellranger/mkvdjref -entry test_cellranger_mkvdjref -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/cellranger/mkvdjref/nextflow.config + tags: + - cellranger/mkvdjref + - cellranger + files: + - path: output/cellranger/homo_sapiens_chr22_reference/fasta/regions.fa + - path: output/cellranger/homo_sapiens_chr22_reference/reference.json + md5sum: e7fa1035edaf51079568c7d5ba28858e + - path: output/cellranger/versions.yml diff --git a/tests/modules/nf-core/cellranger/vdj/main.nf b/tests/modules/nf-core/cellranger/vdj/main.nf new file mode 100644 index 00000000000..907f68e8bbe --- /dev/null +++ b/tests/modules/nf-core/cellranger/vdj/main.nf @@ -0,0 +1,27 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CELLRANGER_VDJ } from '../../../../../modules/nf-core/cellranger/vdj/main.nf' + +workflow test_cellranger_vdj { + + input = [ [ id:'subsampled_sc5p_v2_hs_B_1k_b', single_end:false, strandedness:'auto' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_10x_b_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_10x_b_2_fastq_gz'], checkIfExists: true) + ], + ] + + reference_json = file(params.test_data['homo_sapiens']['illumina']['test_10x_vdj_ref_json'], checkIfExists: true) + reference_fasta = file(params.test_data['homo_sapiens']['illumina']['test_10x_vdj_ref_fasta'], checkIfExists: true) + reference_suppfasta = file(params.test_data['homo_sapiens']['illumina']['test_10x_vdj_ref_suppfasta'], checkIfExists: true) + + reference_json.copyTo("${workDir}/vdj_reference/reference.json") + reference_fasta.copyTo("${workDir}/vdj_reference/fasta/regions.fa") + reference_suppfasta.copyTo("${workDir}/vdj_reference/fasta/supp_regions.fa") + + CELLRANGER_VDJ( + input, + file("${workDir}/vdj_reference/") // reference directory + ) +} diff --git a/tests/modules/nf-core/cellranger/vdj/nextflow.config b/tests/modules/nf-core/cellranger/vdj/nextflow.config new file mode 100644 index 00000000000..8730f1c4b93 --- /dev/null +++ b/tests/modules/nf-core/cellranger/vdj/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/nf-core/cellranger/vdj/test.yml b/tests/modules/nf-core/cellranger/vdj/test.yml new file mode 100644 index 00000000000..9e1d3f713d5 --- /dev/null +++ b/tests/modules/nf-core/cellranger/vdj/test.yml @@ -0,0 +1,51 @@ +- name: cellranger vdj test_cellranger_vdj + command: nextflow run ./tests/modules/nf-core/cellranger/vdj -entry test_cellranger_vdj -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/cellranger/vdj/nextflow.config + tags: + - cellranger + - cellranger/vdj + files: + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/airr_rearrangement.tsv + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/all_contig.bam + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/all_contig.bam.bai + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/all_contig.fasta + md5sum: a707ae3029f4871da9263f9ba923532d + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/all_contig.fasta.fai + md5sum: 0df4d0d21a51b379640219e5ead8ff4e + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/all_contig.fastq + md5sum: ad338b9775f7ec8d1697ba9477a8919a + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/all_contig_annotations.bed + md5sum: 36a95f2292c4771261212138ea117363 + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/all_contig_annotations.csv + md5sum: 9335515b7a4847ce77b65d9a63a3e5a4 + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/all_contig_annotations.json + md5sum: c19b87aefbe604492d4e936590bf61b2 + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/cell_barcodes.json + md5sum: d751713988987e9331980363e24189ce + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/clonotypes.csv + md5sum: 439ca9f013e8e1e747df68b04e541ebf + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/concat_ref.bam + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/concat_ref.bam.bai + md5sum: 125978e04496fe193a5c162603a7e6f6 + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/concat_ref.fasta + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/concat_ref.fasta.fai + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/consensus.bam + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/consensus.bam.bai + md5sum: 125978e04496fe193a5c162603a7e6f6 + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/consensus.fasta + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/consensus.fasta.fai + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/consensus_annotations.csv + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/filtered_contig.fasta + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/filtered_contig.fastq + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/filtered_contig_annotations.csv + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/metrics_summary.csv + md5sum: 9dd91b61c8c40e935eb4fff764827c69 + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/vdj_contig_info.pb + md5sum: f64baaf3d4b9ffa8b2850149a501ab6e + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/vdj_reference/fasta/donor_regions.fa + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/vdj_reference/fasta/regions.fa + md5sum: 1953406d913fb0fd753c6b56e847da83 + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/vdj_reference/reference.json + md5sum: 384f6efabad59f6da5c89b862aee71a8 + - path: output/cellranger/subsampled_sc5p_v2_hs_B_1k_b/outs/web_summary.html + md5sum: 8286f36d5f1e109e04ce3da2704553ef + - path: output/cellranger/versions.yml From c7ddd4815892420f93a0c540332c0cccaf648d30 Mon Sep 17 00:00:00 2001 From: Louis LE NEZET <58640615+LouisLeNezet@users.noreply.github.com> Date: Tue, 2 May 2023 09:19:13 +0200 Subject: [PATCH 118/120] Sbwf impute glimpse2 (#3349) * Separate map file in second channel for glimpse2 chunk * Change samples infos files of place Add input, output region and map as optional Add output region as prefix * Change samples infos files in glimpse_phase * Change samples_infos file way to combine * Remove view() * Update vcf_impute_glimpse to respect previous change in glimpse process * Add new sbwf for glimpse2 * Update file name * Change input1 to input * Remove md5 sum of bin file * Correct test glimpse2_phase * Small changes * Add keyword to glimpse_chunk * Update tests/modules/nf-core/glimpse/concordance/main.nf Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> --------- Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> --- modules/nf-core/glimpse/chunk/meta.yml | 1 + modules/nf-core/glimpse/phase/main.nf | 2 +- modules/nf-core/glimpse/phase/meta.yml | 21 ++-- modules/nf-core/glimpse2/chunk/main.nf | 3 +- modules/nf-core/glimpse2/phase/main.nf | 15 ++- modules/nf-core/glimpse2/phase/meta.yml | 35 ++++-- .../nf-core/glimpse2/splitreference/main.nf | 2 +- .../nf-core/multiple_impute_glimpse2/main.nf | 73 +++++++++++++ .../nf-core/multiple_impute_glimpse2/meta.yml | 72 ++++++++++++ .../nf-core/vcf_impute_glimpse/main.nf | 61 +++++++---- .../nf-core/vcf_impute_glimpse/meta.yml | 13 +-- tests/config/pytest_modules.yml | 4 + tests/modules/nf-core/glimpse/chunk/main.nf | 2 +- tests/modules/nf-core/glimpse/chunk/test.yml | 2 +- .../nf-core/glimpse/concordance/main.nf | 37 ++++--- tests/modules/nf-core/glimpse/ligate/main.nf | 31 +++--- tests/modules/nf-core/glimpse/phase/main.nf | 30 ++--- tests/modules/nf-core/glimpse/sample/main.nf | 25 ++--- tests/modules/nf-core/glimpse2/chunk/main.nf | 29 ++--- .../nf-core/glimpse2/concordance/main.nf | 63 ++++++----- .../nf-core/glimpse2/concordance/test.yml | 4 +- tests/modules/nf-core/glimpse2/ligate/main.nf | 28 +++-- .../modules/nf-core/glimpse2/ligate/test.yml | 4 +- tests/modules/nf-core/glimpse2/phase/main.nf | 30 +++-- tests/modules/nf-core/glimpse2/phase/test.yml | 10 +- .../nf-core/multiple_impute_glimpse2/main.nf | 73 +++++++++++++ .../multiple_impute_glimpse2/nextflow.config | 13 +++ .../nf-core/multiple_impute_glimpse2/test.yml | 103 ++++++++++++++++++ .../nf-core/vcf_impute_glimpse/main.nf | 34 +++--- .../nf-core/vcf_impute_glimpse/test.yml | 12 +- 30 files changed, 610 insertions(+), 222 deletions(-) create mode 100644 subworkflows/nf-core/multiple_impute_glimpse2/main.nf create mode 100644 subworkflows/nf-core/multiple_impute_glimpse2/meta.yml create mode 100644 tests/subworkflows/nf-core/multiple_impute_glimpse2/main.nf create mode 100644 tests/subworkflows/nf-core/multiple_impute_glimpse2/nextflow.config create mode 100644 tests/subworkflows/nf-core/multiple_impute_glimpse2/test.yml diff --git a/modules/nf-core/glimpse/chunk/meta.yml b/modules/nf-core/glimpse/chunk/meta.yml index 9e77ddeb1da..9ac840a6e39 100644 --- a/modules/nf-core/glimpse/chunk/meta.yml +++ b/modules/nf-core/glimpse/chunk/meta.yml @@ -3,6 +3,7 @@ description: Defines chunks where to run imputation keywords: - chunk - imputation + - low coverage tools: - "glimpse": description: "GLIMPSE is a phasing and imputation method for large-scale low-coverage sequencing studies." diff --git a/modules/nf-core/glimpse/phase/main.nf b/modules/nf-core/glimpse/phase/main.nf index b936f0bd08c..894d8f1ec6a 100644 --- a/modules/nf-core/glimpse/phase/main.nf +++ b/modules/nf-core/glimpse/phase/main.nf @@ -8,7 +8,7 @@ process GLIMPSE_PHASE { 'quay.io/biocontainers/glimpse-bio:1.1.1--hce55b13_1' }" input: - tuple val(meta) , path(input), path(input_index), val(input_region), val(output_region), path(reference), path(reference_index), path(map), path(samples_file) + tuple val(meta) , path(input), path(input_index), path(samples_file), val(input_region), val(output_region), path(reference), path(reference_index), path(map) output: tuple val(meta), path("*.{vcf,bcf,vcf.gz,bcf.gz}"), emit: phased_variant diff --git a/modules/nf-core/glimpse/phase/meta.yml b/modules/nf-core/glimpse/phase/meta.yml index b17567de76d..47da4de6ec6 100644 --- a/modules/nf-core/glimpse/phase/meta.yml +++ b/modules/nf-core/glimpse/phase/meta.yml @@ -3,6 +3,9 @@ description: main GLIMPSE algorithm, performs phasing and imputation refining ge keywords: - phase - imputation + - low-coverage + - glimpse + tools: - "glimpse": description: "GLIMPSE is a phasing and imputation method for large-scale low-coverage sequencing studies." @@ -29,6 +32,15 @@ input: description: Index file of the input VCF/BCF file containing genotype likelihoods. pattern: "*.{vcf.gz.csi,bcf.gz.csi}" + - samples_file: + type: file + description: | + File with sample names and ploidy information. + One sample per line with a mandatory second column indicating ploidy (1 or 2). + Sample names that are not present are assumed to have ploidy 2 (diploids). + GLIMPSE does NOT handle the use of sex (M/F) instead of ploidy. + pattern: "*.{txt,tsv}" + - input_region: type: string description: Target region used for imputation, including left and right buffers (e.g. chr20:1000000-2000000). @@ -54,15 +66,6 @@ input: description: File containing the genetic map. pattern: "*.gmap" - - samples_file: - type: file - description: | - File with sample names and ploidy information. - One sample per line with a mandatory second column indicating ploidy (1 or 2). - Sample names that are not present are assumed to have ploidy 2 (diploids). - GLIMPSE does NOT handle the use of sex (M/F) instead of ploidy. - pattern: "*.{txt,tsv}" - output: - meta: type: map diff --git a/modules/nf-core/glimpse2/chunk/main.nf b/modules/nf-core/glimpse2/chunk/main.nf index bfb7e440bd4..a6b0011d51f 100644 --- a/modules/nf-core/glimpse2/chunk/main.nf +++ b/modules/nf-core/glimpse2/chunk/main.nf @@ -17,7 +17,8 @@ process GLIMPSE2_CHUNK { 'quay.io/biocontainers/glimpse-bio:2.0.0--hf340a29_0' }" input: - tuple val(meta), path(input), path(input_index), val(region), path(map) + tuple val(meta) , path(input), path(input_index), val(region) + tuple val(meta2), path(map) val(model) output: diff --git a/modules/nf-core/glimpse2/phase/main.nf b/modules/nf-core/glimpse2/phase/main.nf index 03e6803a3ed..97c332afaaf 100644 --- a/modules/nf-core/glimpse2/phase/main.nf +++ b/modules/nf-core/glimpse2/phase/main.nf @@ -18,8 +18,9 @@ process GLIMPSE2_PHASE { 'quay.io/biocontainers/glimpse-bio:2.0.0--hf340a29_0' }" input: - tuple val(meta), path(input), path(input_index), val(input_region), val(output_region), path(reference), path(reference_index), path(map), path(samples_file) + tuple val(meta) , path(input), path(input_index), path(samples_file), val(input_region), val(output_region), path(reference), path(reference_index), path(map) tuple val(meta2), path(fasta_reference), path(fasta_reference_index) + output: tuple val(meta), path("*.{vcf,bcf,bgen}"), emit: phased_variant tuple val(meta), path("*.txt.gz") , emit: stats_coverage, optional: true @@ -29,13 +30,17 @@ process GLIMPSE2_PHASE { task.ext.when == null || task.ext.when script: + def region = input_region ? "${output_region.replace(":","_")}" : "${reference}" def args = task.ext.args ?: "" - def prefix = task.ext.prefix ?: "${meta.id}_${input_region.replace(":","_")}" + def prefix = task.ext.prefix ?: "${meta.id}_${region}" def suffix = task.ext.suffix ?: "bcf" def map_command = map ? "--map $map" : "" def samples_file_command = samples_file ? "--samples-file $samples_file" : "" def fasta_command = fasta_reference ? "--fasta $fasta_reference" : "" + def input_region_cmd = input_region ? "--input-region $input_region" : "" + def output_region_cmd = output_region ? "--output-region $output_region": "" + def input_bam = input.any { it.extension in ["cram","bam"]} """ @@ -54,14 +59,14 @@ process GLIMPSE2_PHASE { $map_command \\ $fasta_command \\ $samples_file_command \\ - --input-region $input_region \\ - --output-region $output_region \\ + $input_region_cmd \\ + $output_region_cmd \\ --thread $task.cpus \\ --output ${prefix}.${suffix} cat <<-END_VERSIONS > versions.yml "${task.process}": - glimpse2: "\$(GLIMPSE2_split_reference --help | sed -nr '/Version/p' | grep -o -E '([0-9]+.){1,2}[0-9]' | head -1)" + glimpse2: "\$(GLIMPSE2_phase --help | sed -nr '/Version/p' | grep -o -E '([0-9]+.){1,2}[0-9]' | head -1)" END_VERSIONS """ } diff --git a/modules/nf-core/glimpse2/phase/meta.yml b/modules/nf-core/glimpse2/phase/meta.yml index 6ba4933e3bf..5e5e88cbbbc 100644 --- a/modules/nf-core/glimpse2/phase/meta.yml +++ b/modules/nf-core/glimpse2/phase/meta.yml @@ -22,9 +22,10 @@ input: e.g. [ id:'test', single_end:false ] - input: - type: files + type: file description: | - Either multiple BAM/CRAM files containing low-coverage sequencing reads or one VCF/BCF file containing the genotype likelihoods. When using BAM/CRAM the name of the file is used as samples name. + Either multiple BAM/CRAM files containing low-coverage sequencing reads or one VCF/BCF file containing the genotype likelihoods. + When using BAM/CRAM the name of the file is used as samples name. pattern: "*.{bam,cram,vcf,vcf.gz,bcf,bcf.gz}" - input_index: @@ -32,14 +33,27 @@ input: description: Index file of the input BAM/CRAM/VCF/BCF file. pattern: "*.{bam.bai,cram.crai,vcf.gz.csi,bcf.gz.csi}" + - samples_file: + type: file + description: | + File with sample names and ploidy information. + One sample per line with a mandatory second column indicating ploidy (1 or 2). + Sample names that are not present are assumed to have ploidy 2 (diploids). + GLIMPSE does NOT handle the use of sex (M/F) instead of ploidy. + pattern: "*.{txt,tsv}" + - input_region: type: string - description: Target region used for imputation, including left and right buffers (e.g. chr20:1000000-2000000). + description: | + Target region used for imputation, including left and right buffers (e.g. chr20:1000000-2000000). + Optional if reference panel is in bin format. pattern: "chrXX:leftBufferPosition-rightBufferPosition" - output_region: type: string - description: Target imputed region, excluding left and right buffers (e.g. chr20:1000000-2000000). + description: | + Target imputed region, excluding left and right buffers (e.g. chr20:1000000-2000000). + Optional if reference panel is in bin format. pattern: "chrXX:leftBufferPosition-rightBufferPosition" - reference: @@ -53,27 +67,24 @@ input: pattern: "*.{vcf.gz.csi,bcf.gz.csi}" - map: - type: file - description: File containing the genetic map. - pattern: "*.gmap" - - - samples_file: type: file description: | - File with sample names and ploidy information. One sample per line with a mandatory second column indicating ploidy (1 or 2). Sample names that are not present are assumed to have ploidy 2 (diploids). GLIMPSE does NOT handle the use of sex (M/F) instead of ploidy. - pattern: "*.{txt,tsv}" + File containing the genetic map. + Optional if reference panel is in bin format. + pattern: "*.gmap" - fasta_reference: type: file description: | Faidx-indexed reference sequence file in the appropriate genome build. - Necessary for CRAM files + Necessary for CRAM files. pattern: "*.fasta" - fasta_reference_index: type: file description: | Faidx index of the reference sequence file in the appropriate genome build. + Necessary for CRAM files. pattern: "*.fai" output: diff --git a/modules/nf-core/glimpse2/splitreference/main.nf b/modules/nf-core/glimpse2/splitreference/main.nf index a86061d47d1..45c6a812cf7 100644 --- a/modules/nf-core/glimpse2/splitreference/main.nf +++ b/modules/nf-core/glimpse2/splitreference/main.nf @@ -31,7 +31,7 @@ process GLIMPSE2_SPLITREFERENCE { script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}_${output_region.replace(":","_")}" def map_command = map ? "--map $map" : "" """ diff --git a/subworkflows/nf-core/multiple_impute_glimpse2/main.nf b/subworkflows/nf-core/multiple_impute_glimpse2/main.nf new file mode 100644 index 00000000000..b300f771246 --- /dev/null +++ b/subworkflows/nf-core/multiple_impute_glimpse2/main.nf @@ -0,0 +1,73 @@ +include { GLIMPSE2_CHUNK } from '../../../modules/nf-core/glimpse2/chunk/main' +include { GLIMPSE2_SPLITREFERENCE } from '../../../modules/nf-core/glimpse2/splitreference/main' +include { GLIMPSE2_PHASE } from '../../../modules/nf-core/glimpse2/phase/main' +include { GLIMPSE2_LIGATE } from '../../../modules/nf-core/glimpse2/ligate/main' +include { BCFTOOLS_INDEX as INDEX_PHASE } from '../../../modules/nf-core/bcftools/index/main.nf' +include { BCFTOOLS_INDEX as INDEX_LIGATE } from '../../../modules/nf-core/bcftools/index/main.nf' + +workflow MULTIPLE_IMPUTE_GLIMPSE2 { + + take: + ch_input // channel (mandatory): [ meta, vcf, csi, infos ] + ch_ref // channel (mandatory): [ meta, vcf, csi, region ] + ch_map // channel (optional): [ meta, map ] + ch_fasta // channel (optional): [ meta, fasta, index ] + chunk_model // string: model used to chunk the reference panel + + main: + + ch_versions = Channel.empty() + + // Chunk reference panel + GLIMPSE2_CHUNK ( ch_ref, ch_map, chunk_model ) + ch_versions = ch_versions.mix( GLIMPSE2_CHUNK.out.versions.first() ) + + chunk_output = GLIMPSE2_CHUNK.out.chunk_chr + .splitCsv(header: ['ID', 'Chr', 'RegionBuf', 'RegionCnk', 'WindowCm', + 'WindowMb', 'NbTotVariants', 'NbComVariants'], + sep: "\t", skip: 0) + .map { meta, it -> [meta, it["RegionBuf"], it["RegionCnk"]]} + + // Split reference panel in bin files + split_input = ch_ref.map{ meta, ref, index, region -> [meta, ref, index]} + .combine(chunk_output, by: 0) + + GLIMPSE2_SPLITREFERENCE( split_input, ch_map ) + ch_versions = ch_versions.mix( GLIMPSE2_SPLITREFERENCE.out.versions.first() ) + + phase_input = ch_input.combine( GLIMPSE2_SPLITREFERENCE.out.bin_ref ) + .map{ input_meta, input_file, input_index, input_infos, + panel_meta, panel_bin -> + [input_meta, input_file, input_index, input_infos, + [], [], panel_bin, [], []] + }/* Remove unnecessary meta maps + add null index as we use a bin file, + add null value for input and output region as we use a bin file */ + + // Phase input files for each reference bin files + indexing + GLIMPSE2_PHASE ( phase_input, ch_fasta ) // [meta, vcf, index, sample_infos, regionin, regionout, regionindex, ref, ref_index, map], [ meta, fasta, index ] + ch_versions = ch_versions.mix( GLIMPSE2_PHASE.out.versions.first() ) + + INDEX_PHASE ( GLIMPSE2_PHASE.out.phased_variant ) + ch_versions = ch_versions.mix( INDEX_PHASE.out.versions.first() ) + + // Ligate all phased files in one and index it + ligate_input = GLIMPSE2_PHASE.out.phased_variant + .groupTuple() + .combine( INDEX_PHASE.out.csi + .groupTuple() + .collect(), by: 0 ) + + GLIMPSE2_LIGATE ( ligate_input ) + ch_versions = ch_versions.mix( GLIMPSE2_LIGATE.out.versions.first() ) + + INDEX_LIGATE ( GLIMPSE2_LIGATE.out.merged_variants ) + ch_versions = ch_versions.mix( INDEX_LIGATE.out.versions.first() ) + + emit: + chunk_chr = GLIMPSE2_CHUNK.out.chunk_chr // channel: [ val(meta), txt ] + merged_variants = GLIMPSE2_LIGATE.out.merged_variants // channel: [ val(meta), bcf ] + merged_variants_index = INDEX_LIGATE.out.csi // channel: [ val(meta), csi ] + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/subworkflows/nf-core/multiple_impute_glimpse2/meta.yml b/subworkflows/nf-core/multiple_impute_glimpse2/meta.yml new file mode 100644 index 00000000000..4f233281b1e --- /dev/null +++ b/subworkflows/nf-core/multiple_impute_glimpse2/meta.yml @@ -0,0 +1,72 @@ +name: "multiple_imputation_glimpse2" +description: Impute VCF/BCF files, but also CRAM and BAM files with Glimpse2 +keywords: + - glimpse + - chunk + - phase + - ligate + - split_reference + +modules: + - glimpse2/chunk + - glimpse/2phase + - glimpse2/ligate + - glimpse2/split_reference + - bcftools/index + +input: + - ch_input: + type: file + description: | + Target dataset in CRAM, BAM or VCF/BCF format. + Index file of the input file. + File with sample names and ploidy information. + Structure: [ meta, file, index, txt ] + + - ch_ref: + type: file + description: | + Reference panel of haplotypes in VCF/BCF format. + Index file of the Reference panel file. + Target region, usually a full chromosome (e.g. chr20:1000000-2000000 or chr20). + The file could possibly be without GT field (for efficiency reasons a file containing only the positions is recommended). + Structure: [ meta, vcf, csi, region ] + + - ch_map: + type: file + description: | + File containing the genetic map. + Structure: [ meta, gmap ] + + - ch_fasta: + type: file + description: | + Reference genome in fasta format. + Reference genome index in fai format + Structure: [ meta, fasta, fai ] + +output: + - chunk_chr: + type: file + description: | + Tab delimited output txt file containing buffer and imputation regions. + Structure: [meta, txt] + + - merged_variants: + type: file + description: | + Output VCF/BCF file for the merged regions. + Phased information (HS field) is updated accordingly for the full region. + Structure: [ val(meta), bcf ] + + - merged_variants_index: + type: file + description: Index file of the ligated phased variants files. + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@LouisLeNezet" diff --git a/subworkflows/nf-core/vcf_impute_glimpse/main.nf b/subworkflows/nf-core/vcf_impute_glimpse/main.nf index ce3ce7eedc4..d5d9b032220 100644 --- a/subworkflows/nf-core/vcf_impute_glimpse/main.nf +++ b/subworkflows/nf-core/vcf_impute_glimpse/main.nf @@ -1,46 +1,65 @@ -include { GLIMPSE_CHUNK } from '../../../modules/nf-core/glimpse/chunk/main' -include { GLIMPSE_PHASE } from '../../../modules/nf-core/glimpse/phase/main' -include { GLIMPSE_LIGATE } from '../../../modules/nf-core/glimpse/ligate/main' -include { BCFTOOLS_INDEX } from '../../../modules/nf-core/bcftools/index/main.nf' +include { GLIMPSE_CHUNK } from '../../../modules/nf-core/glimpse/chunk/main' +include { GLIMPSE_PHASE } from '../../../modules/nf-core/glimpse/phase/main' +include { GLIMPSE_LIGATE } from '../../../modules/nf-core/glimpse/ligate/main' +include { BCFTOOLS_INDEX as INDEX_PHASE } from '../../../modules/nf-core/bcftools/index/main.nf' +include { BCFTOOLS_INDEX as INDEX_LIGATE } from '../../../modules/nf-core/bcftools/index/main.nf' workflow VCF_IMPUTE_GLIMPSE { take: - ch_vcf // channel (mandatory): [ meta, vcf, csi, region, sample ] + ch_vcf // channel (mandatory): [ meta, vcf, csi, sample, region ] ch_ref // channel (mandatory): [ meta, vcf, csi ] - ch_map // channel (optional): path to map - ch_infos // channel (optional): sample infos + ch_map // channel (optional): [meta, map ] main: ch_versions = Channel.empty() - GLIMPSE_CHUNK ( ch_vcf ) + input_chunk = ch_vcf.map{ + meta, vcf, csi, sample, region -> + [ meta, vcf, csi, region] + } + + GLIMPSE_CHUNK ( input_chunk ) ch_versions = ch_versions.mix(GLIMPSE_CHUNK.out.versions) chunk_output = GLIMPSE_CHUNK.out.chunk_chr .splitCsv(header: ['ID', 'Chr', 'RegionIn', 'RegionOut', 'Size1', 'Size2'], sep: "\t", skip: 0) - .map { metamap, it -> [metamap, it["RegionIn"], it["RegionOut"]]} - phase_input = ch_vcf.map{[it[0], it[1], it[2]]} + .map { meta, it -> [meta, it["RegionIn"], it["RegionOut"]]} + + phase_input = ch_vcf.map{meta, vcf, csi, sample, region -> [meta, vcf, csi, sample]} .join(chunk_output) - .join(ch_ref) - .join(ch_map) - .join(ch_infos) + .combine(ch_ref) + .combine(ch_map) + .map{meta, vcf, csi, sample, + regionin, regionout, + meta_ref, ref, ref_index, + meta_map, map -> + [meta, vcf, csi, sample, regionin, regionout, ref, ref_index, map]} - GLIMPSE_PHASE ( phase_input ) // [meta, vcf, index, regionin, regionout, regionindex, ref, ref_index, map, sample_infos] + GLIMPSE_PHASE ( phase_input ) // [meta, vcf, index, sample_infos, regionin, regionout, ref, ref_index, map] ch_versions = ch_versions.mix(GLIMPSE_PHASE.out.versions.first()) - ligate_input = GLIMPSE_PHASE.out.phased_variant.groupTuple() + INDEX_PHASE ( GLIMPSE_PHASE.out.phased_variant ) + ch_versions = ch_versions.mix( INDEX_PHASE.out.versions.first() ) - BCFTOOLS_INDEX ( ligate_input ) - GLIMPSE_LIGATE ( ligate_input.join(BCFTOOLS_INDEX.out.csi.groupTuple()) ) + // Ligate all phased files in one and index it + ligate_input = GLIMPSE_PHASE.out.phased_variant + .groupTuple() + .combine( INDEX_PHASE.out.csi + .groupTuple() + .collect(), by: 0 ) + GLIMPSE_LIGATE ( ligate_input ) ch_versions = ch_versions.mix(GLIMPSE_LIGATE.out.versions.first()) + INDEX_LIGATE ( GLIMPSE_LIGATE.out.merged_variants ) + ch_versions = ch_versions.mix( INDEX_LIGATE.out.versions.first() ) + emit: - chunk_chr = GLIMPSE_CHUNK.out.chunk_chr // channel: [ val(meta), txt ] - merged_variants = GLIMPSE_LIGATE.out.merged_variants // channel: [ val(meta), bcf ] - phased_variants = GLIMPSE_PHASE.out.phased_variant // channel: [ val(meta), bcf ] + chunk_chr = GLIMPSE_CHUNK.out.chunk_chr // channel: [ val(meta), txt ] + merged_variants = GLIMPSE_LIGATE.out.merged_variants // channel: [ val(meta), bcf ] + merged_variants_index = INDEX_LIGATE.out.csi // channel: [ val(meta), csi ] - versions = ch_versions // channel: [ versions.yml ] + versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/nf-core/vcf_impute_glimpse/meta.yml b/subworkflows/nf-core/vcf_impute_glimpse/meta.yml index 9e0ea49ecfd..3dd30d9313f 100644 --- a/subworkflows/nf-core/vcf_impute_glimpse/meta.yml +++ b/subworkflows/nf-core/vcf_impute_glimpse/meta.yml @@ -11,6 +11,7 @@ modules: - glimpse/chunk - glimpse/phase - glimpse/ligate + - bcftools/index input: - ch_vcf: @@ -18,9 +19,10 @@ input: description: | Target dataset in VCF/BCF format defined at all variable positions. Index file of the input VCF/BCF file containing genotype likelihoods. + File with sample names and ploidy information. Target region, usually a full chromosome (e.g. chr20:1000000-2000000 or chr20). The file could possibly be without GT field (for efficiency reasons a file containing only the positions is recommended). - Structure: [ meta, vcf, csi, region ] + Structure: [ meta, vcf, csi, txt, region ] - ch_ref: type: file @@ -35,15 +37,6 @@ input: File containing the genetic map. Structure: [gmap] - - ch_infos: - type: file - description: | - File with sample names and ploidy information. - One sample per line with a mandatory second column indicating ploidy (1 or 2). - Sample names that are not present are assumed to have ploidy 2 (diploids). - GLIMPSE does NOT handle the use of sex (M/F) instead of ploidy. - Structure: [ txt ] - output: - chunk_chr: type: file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 5c6af0b59d3..b3020dddda5 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -3464,6 +3464,10 @@ subworkflows/homer/groseq: - subworkflows/nf-core/homer/groseq/** - tests/subworkflows/nf-core/homer/groseq/** +subworkflows/multiple_impute_glimpse2: + - subworkflows/nf-core/multiple_impute_glimpse2/** + - tests/subworkflows/nf-core/multiple_impute_glimpse2/** + subworkflows/vcf_annotate_ensemblvep: - subworkflows/nf-core/vcf_annotate_ensemblvep/** - tests/subworkflows/nf-core/vcf_annotate_ensemblvep/** diff --git a/tests/modules/nf-core/glimpse/chunk/main.nf b/tests/modules/nf-core/glimpse/chunk/main.nf index cb1610e18b0..a481fca8ae7 100644 --- a/tests/modules/nf-core/glimpse/chunk/main.nf +++ b/tests/modules/nf-core/glimpse/chunk/main.nf @@ -6,7 +6,7 @@ include { GLIMPSE_CHUNK } from '../../../../../modules/nf-core/glimpse/chunk/mai workflow test_glimpse_chunk { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'input' ], // meta map file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true), file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true), "chr21"] diff --git a/tests/modules/nf-core/glimpse/chunk/test.yml b/tests/modules/nf-core/glimpse/chunk/test.yml index dfe3f7bc294..bce2b34bc48 100644 --- a/tests/modules/nf-core/glimpse/chunk/test.yml +++ b/tests/modules/nf-core/glimpse/chunk/test.yml @@ -4,6 +4,6 @@ - glimpse - glimpse/chunk files: - - path: output/glimpse/test.txt + - path: output/glimpse/input.txt md5sum: 9e5562b3f94857b8189b59849ce65cfb - path: output/glimpse/versions.yml diff --git a/tests/modules/nf-core/glimpse/concordance/main.nf b/tests/modules/nf-core/glimpse/concordance/main.nf index ad361cf41be..fe25e6874c6 100644 --- a/tests/modules/nf-core/glimpse/concordance/main.nf +++ b/tests/modules/nf-core/glimpse/concordance/main.nf @@ -9,13 +9,15 @@ include { BCFTOOLS_INDEX } from '../../../../../modules/nf-core/bcftools/in workflow test_glimpse_concordance { - input_vcf = Channel.of([ - [ id:'input', single_end:false ], // meta map + samples_infos = Channel.of('NA12878 2').collectFile(name: 'sampleinfos.txt') + region = Channel.of(["chr21:16600000-16800000","chr21:16650000-16750000"]) + input_vcf = Channel.of([ + [ id:'input' ], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true), - "chr21:16600000-16800000", - "chr21:16650000-16750000" + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) + + input_vcf_with_samples_infos = input_vcf.combine(samples_infos).combine(region) ref_panel = Channel.of([ file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), @@ -26,31 +28,34 @@ workflow test_glimpse_concordance { file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), ]) - samples_file = Channel.of('NA12878 2') - .collectFile(name: 'sampleinfos.txt') - GLIMPSE_PHASE ( - input_vcf.combine(ref_panel) - .combine(ch_map) - .combine(samples_file) - ) // [meta, vcf, index, regionin, regionout, regionindex, ref, ref_index, map, sample_infos] + input_vcf_with_samples_infos.combine(ref_panel) + .combine(ch_map) + ) // [meta, vcf, sample_infos, index, regionin, regionout, regionindex, ref, ref_index, map] ligate_input = GLIMPSE_PHASE.output.phased_variant .groupTuple() BCFTOOLS_INDEX ( ligate_input ) + GLIMPSE_LIGATE ( ligate_input.join(BCFTOOLS_INDEX.out.csi.groupTuple()) ) - allele_freq = [file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz",checkIfExists:true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz.csi",checkIfExists:true)] + allele_freq = [ + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz",checkIfExists:true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz.csi",checkIfExists:true) + ] - truth = [file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf",checkIfExists:true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf.csi",checkIfExists:true)] + truth = [ + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf",checkIfExists:true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf.csi",checkIfExists:true) + ] list_inputs = Channel.of(["chr21", allele_freq[0], truth[0]]) .combine(GLIMPSE_LIGATE.out.merged_variants.map{it[1]}.collect().map{it[0]}) .collect() + concordance_input = Channel.of([[ id:'input', single_end:false ]]).combine(list_inputs) GLIMPSE_CONCORDANCE ( concordance_input, [], [], []) // meta, Region, Frequencies, Truth, Estimate, minPROB, minDP, bins + } diff --git a/tests/modules/nf-core/glimpse/ligate/main.nf b/tests/modules/nf-core/glimpse/ligate/main.nf index 2862f53212a..7ffb7dbbd53 100644 --- a/tests/modules/nf-core/glimpse/ligate/main.nf +++ b/tests/modules/nf-core/glimpse/ligate/main.nf @@ -2,35 +2,40 @@ nextflow.enable.dsl = 2 -include { GLIMPSE_LIGATE } from '../../../../../modules/nf-core/glimpse/ligate/main.nf' -include { GLIMPSE_PHASE } from '../../../../../modules/nf-core/glimpse/phase/main.nf' +include { GLIMPSE_LIGATE } from '../../../../../modules/nf-core/glimpse/ligate/main.nf' +include { GLIMPSE_PHASE } from '../../../../../modules/nf-core/glimpse/phase/main.nf' include { BCFTOOLS_INDEX } from '../../../../../modules/nf-core/bcftools/index/main.nf' workflow test_glimpse_ligate { - input_vcf = Channel.of([ - [ id:'input', single_end:false ], // meta map + + samples_infos = Channel.of('NA12878 2').collectFile(name: 'sampleinfos.txt') + region = Channel.of(["chr21:16600000-16800000","chr21:16650000-16750000"]) + input_vcf = Channel.of([ + [ id:'input'], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true), - "chr21:16600000-16800000", - "chr21:16650000-16750000", + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) + + input_vcf_with_samples_infos = input_vcf.combine(samples_infos).combine(region) + ref_panel = Channel.of([ file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) ]) + ch_map = Channel.of([ file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), ]) - samples_file = Channel.of('NA12878 2') - .collectFile(name: 'sampleinfos.txt') + GLIMPSE_PHASE ( - input_vcf.combine(ref_panel) - .combine(ch_map) - .combine(samples_file) - ) // [meta, vcf, index, regionin, regionout, regionindex, ref, ref_index, map, sample_infos] + input_vcf_with_samples_infos.combine(ref_panel) + .combine(ch_map) + ) // [meta, vcf, index, sample_infos, regionin, regionout, regionindex, ref, ref_index, map] ligate_input = GLIMPSE_PHASE.output.phased_variant .groupTuple() + BCFTOOLS_INDEX ( ligate_input ) + GLIMPSE_LIGATE ( ligate_input.join(BCFTOOLS_INDEX.out.csi.groupTuple()) ) } diff --git a/tests/modules/nf-core/glimpse/phase/main.nf b/tests/modules/nf-core/glimpse/phase/main.nf index 152cb332273..bfe5ea37b5f 100644 --- a/tests/modules/nf-core/glimpse/phase/main.nf +++ b/tests/modules/nf-core/glimpse/phase/main.nf @@ -4,14 +4,18 @@ nextflow.enable.dsl = 2 include { GLIMPSE_PHASE } from '../../../../../modules/nf-core/glimpse/phase/main.nf' - input_vcf = Channel.of([ - [ id:'input', single_end:false ], // meta map + samples_infos = Channel.of('NA12878 2').collectFile(name: 'sampleinfos.txt') + empty_channel = Channel.of([[]]) + region = Channel.of(["chr21:16600000-16800000","chr21:16650000-16750000"]) + input_vcf = Channel.of([ + [ id:'input'], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true), - "chr21:16600000-16800000", - "chr21:16650000-16750000", + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) + input_vcf_with_samples_infos = input_vcf.combine(samples_infos).combine(region) + input_vcf_without_samples_infos = input_vcf.combine(empty_channel).combine(region) + ref_panel = Channel.of([ file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) @@ -21,20 +25,16 @@ include { GLIMPSE_PHASE } from '../../../../../modules/nf-core/glimpse/phase/mai file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), ]) - samples_file = Channel.of('NA12878 2').collectFile(name: 'sampleinfos.txt') - workflow test_glimpse_phase_nosampleinfos { GLIMPSE_PHASE ( - input_vcf.combine(ref_panel) - .combine(ch_map) - .combine(Channel.of([[]])) - ) // [meta, vcf, index, regionin, regionout, regionindex, ref, ref_index, map, sample_infos] + input_vcf_without_samples_infos.combine(ref_panel) + .combine(ch_map) + ) // [meta, vcf, index, sample_infos, regionin, regionout, regionindex, ref, ref_index, map] } workflow test_glimpse_phase_withsampleinfos { GLIMPSE_PHASE ( - input_vcf.combine(ref_panel) - .combine(ch_map) - .combine(samples_file) - ) // [meta, vcf, index, regionin, regionout, regionindex, ref, ref_index, map, sample_infos] + input_vcf_with_samples_infos.combine(ref_panel) + .combine(ch_map) + ) // [meta, vcf, index, sample_infos, regionin, regionout, regionindex, ref, ref_index, map] } diff --git a/tests/modules/nf-core/glimpse/sample/main.nf b/tests/modules/nf-core/glimpse/sample/main.nf index 029ace0c191..093fd16036d 100644 --- a/tests/modules/nf-core/glimpse/sample/main.nf +++ b/tests/modules/nf-core/glimpse/sample/main.nf @@ -8,15 +8,17 @@ include { GLIMPSE_SAMPLE } from '../../../../../modules/nf-core/glimpse/sample/m include { BCFTOOLS_INDEX } from '../../../../../modules/nf-core/bcftools/index/main.nf' workflow test_glimpse_sample { - - input_vcf = Channel.of([ - [ id:'input', single_end:false ], // meta map + + samples_infos = Channel.of('NA12878 2').collectFile(name: 'sampleinfos.txt') + region = Channel.of(["chr21:16600000-16800000","chr21:16650000-16750000"]) + input_vcf = Channel.of([ + [ id:'input'], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true), - "chr21:16600000-16800000", - "chr21:16650000-16750000", + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) + input_vcf_with_samples_infos = input_vcf.combine(samples_infos).combine(region) + ref_panel = Channel.of([ file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) @@ -26,13 +28,10 @@ workflow test_glimpse_sample { file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), ]) - samples_file = Channel.of('NA12878 2').collectFile(name: 'sampleinfos.txt') - - GLIMPSE_PHASE ( - input_vcf.combine(ref_panel) - .combine(ch_map) - .combine(Channel.of([[]])) - ) // [meta, vcf, index, regionin, regionout, regionindex, ref, ref_index, map, sample_infos] + GLIMPSE_PHASE ( + input_vcf_with_samples_infos.combine(ref_panel) + .combine(ch_map) + ) // [meta, vcf, index, sample_infos, regionin, regionout, regionindex, ref, ref_index, map] ligate_input = GLIMPSE_PHASE.output.phased_variant .groupTuple() diff --git a/tests/modules/nf-core/glimpse2/chunk/main.nf b/tests/modules/nf-core/glimpse2/chunk/main.nf index 607d6bca23c..177beb1f6d4 100644 --- a/tests/modules/nf-core/glimpse2/chunk/main.nf +++ b/tests/modules/nf-core/glimpse2/chunk/main.nf @@ -4,27 +4,28 @@ nextflow.enable.dsl = 2 include { GLIMPSE2_CHUNK } from '../../../../../modules/nf-core/glimpse2/chunk/main.nf' -workflow test_glimpse2_chunk { - - input = [ +input = [ [ id:'test', single_end:false ], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true), - "chr21", - []] - GLIMPSE2_CHUNK (input, "recursive") + "chr21"] + +workflow test_glimpse2_chunk { + ch_map_empty = Channel.of([ + [ id:'map'], + [] + ]).collect() + + GLIMPSE2_CHUNK (input, ch_map_empty, "recursive") } workflow test_glimpse2_chunk_withmap { - - input = [ - [ id:'test', single_end:false ], // meta map - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true), - "chr21", - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true)] - GLIMPSE2_CHUNK (input, "recursive") + ch_map = Channel.of([ + [ id:'map'], + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true) + ]).collect() + GLIMPSE2_CHUNK (input,ch_map,"recursive") } diff --git a/tests/modules/nf-core/glimpse2/concordance/main.nf b/tests/modules/nf-core/glimpse2/concordance/main.nf index 4d2508d3a74..ad78ce739d3 100644 --- a/tests/modules/nf-core/glimpse2/concordance/main.nf +++ b/tests/modules/nf-core/glimpse2/concordance/main.nf @@ -3,20 +3,23 @@ nextflow.enable.dsl = 2 include { GLIMPSE2_PHASE } from '../../../../../modules/nf-core/glimpse2/phase/main.nf' -include { GLIMPSE_LIGATE } from '../../../../../modules/nf-core/glimpse/ligate/main.nf' +include { GLIMPSE_LIGATE } from '../../../../../modules/nf-core/glimpse/ligate/main.nf' include { GLIMPSE2_CONCORDANCE } from '../../../../../modules/nf-core/glimpse2/concordance/main.nf' -include { BCFTOOLS_INDEX } from '../../../../../modules/nf-core/bcftools/index/main.nf' +include { BCFTOOLS_INDEX } from '../../../../../modules/nf-core/bcftools/index/main.nf' workflow test_glimpse2_concordance { - - input_vcf = Channel.of([ - [ id:'input', single_end:false ], // meta map + + samples_infos = Channel.of('NA12878 2').collectFile(name: 'sampleinfos.txt') + region = Channel.of(["chr21:16600000-16800000","chr21:16650000-16750000"]) + input_vcf = Channel.of([ + [ id:'input'], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true), - "chr21:16600000-16800000", - "chr21:16650000-16750000" + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) - + + input_vcf_with_samples_infos = input_vcf.combine(samples_infos).combine(region) + + ref_panel = Channel.of([ file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) @@ -26,32 +29,34 @@ workflow test_glimpse2_concordance { file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), ]) - samples_file = Channel.of('NA12878 2') - .collectFile(name: 'sampleinfos.txt') - GLIMPSE2_PHASE ( - input_vcf.combine(ref_panel) - .combine(ch_map) - .combine(samples_file), + input_vcf_with_samples_infos.combine( ref_panel ) + .combine( ch_map ), Channel.of([[],[],[]]) - ) // [meta, vcf, index, regionin, regionout, regionindex, ref, ref_index, map, sample_infos] - - allele_freq = Channel.of([file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz",checkIfExists:true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz.csi",checkIfExists:true)]) - - truth = Channel.of([file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf",checkIfExists:true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf.csi",checkIfExists:true)]) - - BCFTOOLS_INDEX(GLIMPSE2_PHASE.output.phased_variant) + ) // [meta, vcf, index, sample_infos, regionin, regionout, regionindex, ref, ref_index, map] + + allele_freq = Channel.of([ + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz",checkIfExists:true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz.csi",checkIfExists:true) + ]) + + truth = Channel.of([ + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf",checkIfExists:true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf.csi",checkIfExists:true) + ]) + + BCFTOOLS_INDEX ( GLIMPSE2_PHASE.output.phased_variant ) + list_inputs = GLIMPSE2_PHASE.output.phased_variant - .join(BCFTOOLS_INDEX.out.csi) - .combine(truth) - .combine(allele_freq) - .combine(Channel.of([[]])) - .combine(Channel.of(["chr21"])) + .join( BCFTOOLS_INDEX.out.csi ) + .combine( truth ) + .combine( allele_freq ) + .combine( Channel.of([[]]) ) + .combine( Channel.of(["chr21"]) ) GLIMPSE2_CONCORDANCE ( list_inputs, Channel.of([[id:"params"],[],"0 0.01 0.05 0.1 0.2 0.5",[],[]]), 0.9999, 8) // [meta, Region, Frequencies, Truth, Estimate], [meta, group, bins, ac_bins, allele_count], min-val-gl, min-val-dp + } diff --git a/tests/modules/nf-core/glimpse2/concordance/test.yml b/tests/modules/nf-core/glimpse2/concordance/test.yml index 9999229c3e0..f62cb36fcbc 100644 --- a/tests/modules/nf-core/glimpse2/concordance/test.yml +++ b/tests/modules/nf-core/glimpse2/concordance/test.yml @@ -4,12 +4,12 @@ - glimpse2 - glimpse2/concordance files: - - path: output/bcftools/input_chr21_16600000-16800000.bcf.csi + - path: output/bcftools/input_chr21_16650000-16750000.bcf.csi - path: output/bcftools/versions.yml - path: output/glimpse2/input.error.cal.txt.gz - path: output/glimpse2/input.error.grp.txt.gz - path: output/glimpse2/input.error.spl.txt.gz - path: output/glimpse2/input.rsquare.grp.txt.gz - path: output/glimpse2/input.rsquare.spl.txt.gz - - path: output/glimpse2/input_chr21_16600000-16800000.bcf + - path: output/glimpse2/input_chr21_16650000-16750000.bcf - path: output/glimpse2/versions.yml diff --git a/tests/modules/nf-core/glimpse2/ligate/main.nf b/tests/modules/nf-core/glimpse2/ligate/main.nf index 20f1c2bfde3..82e885243ac 100644 --- a/tests/modules/nf-core/glimpse2/ligate/main.nf +++ b/tests/modules/nf-core/glimpse2/ligate/main.nf @@ -7,31 +7,37 @@ include { GLIMPSE2_PHASE } from '../../../../../modules/nf-core/glimpse2/phase/ include { BCFTOOLS_INDEX } from '../../../../../modules/nf-core/bcftools/index/main.nf' workflow test_glimpse2_ligate { - input_vcf = Channel.of([ - [ id:'input', single_end:false ], // meta map + + samples_infos = Channel.of('NA12878 2').collectFile(name: 'sampleinfos.txt') + region = Channel.of(["chr21:16600000-16800000","chr21:16650000-16750000"]) + input_vcf = Channel.of([ + [ id:'input'], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true), - "chr21:16600000-16800000", - "chr21:16650000-16750000", + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) + + input_vcf_with_samples_infos = input_vcf.combine(samples_infos).combine(region) + ref_panel = Channel.of([ file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) ]) + ch_map = Channel.of([ file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), ]) - samples_file = Channel.of('NA12878 2') - .collectFile(name: 'sampleinfos.txt') + GLIMPSE2_PHASE ( - input_vcf.combine(ref_panel) - .combine(ch_map) - .combine(samples_file), + input_vcf_with_samples_infos.combine( ref_panel ) + .combine( ch_map ), Channel.of([[],[],[]]) - ) // [meta, vcf, index, regionin, regionout, regionindex, ref, ref_index, map, sample_infos] + ) // [meta, vcf, index, sample_infos, regionin, regionout, regionindex, ref, ref_index, map] ligate_input = GLIMPSE2_PHASE.output.phased_variant .groupTuple() + BCFTOOLS_INDEX ( ligate_input ) + GLIMPSE2_LIGATE ( ligate_input.join(BCFTOOLS_INDEX.out.csi.groupTuple()) ) + } diff --git a/tests/modules/nf-core/glimpse2/ligate/test.yml b/tests/modules/nf-core/glimpse2/ligate/test.yml index d8518751b98..c18143cd298 100644 --- a/tests/modules/nf-core/glimpse2/ligate/test.yml +++ b/tests/modules/nf-core/glimpse2/ligate/test.yml @@ -4,8 +4,8 @@ - glimpse2 - glimpse2/ligate files: - - path: output/bcftools/input_chr21_16600000-16800000.bcf.csi + - path: output/bcftools/input_chr21_16650000-16750000.bcf.csi - path: output/bcftools/versions.yml - path: output/glimpse2/input.vcf.gz - - path: output/glimpse2/input_chr21_16600000-16800000.bcf + - path: output/glimpse2/input_chr21_16650000-16750000.bcf - path: output/glimpse2/versions.yml diff --git a/tests/modules/nf-core/glimpse2/phase/main.nf b/tests/modules/nf-core/glimpse2/phase/main.nf index bff99e53ba6..36219c4e92e 100644 --- a/tests/modules/nf-core/glimpse2/phase/main.nf +++ b/tests/modules/nf-core/glimpse2/phase/main.nf @@ -4,11 +4,12 @@ nextflow.enable.dsl = 2 include { GLIMPSE2_PHASE } from '../../../../../modules/nf-core/glimpse2/phase/main.nf' - + input_vcf = Channel.of([ [ id:'input' ], // meta map file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true), + [], "chr21:16600000-16800000", "chr21:16650000-16750000" ]) @@ -16,15 +17,17 @@ input_bam = Channel.of([ [id:'input'], file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.bam", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.bam.bai", checkIfExists: true), + [], "chr21:16600000-16800000", - "chr21:16650000-16750000", + "chr21:16650000-16750000", ]) input_cram = Channel.of([ [id:'input'], file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.cram", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.cram.crai", checkIfExists: true), + [], "chr21:16600000-16800000", - "chr21:16650000-16750000", + "chr21:16650000-16750000", ]) ref_panel = Channel.of([ file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), @@ -35,10 +38,6 @@ map_file = Channel.of([ file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true) ]) -samples_file = Channel.of([ - [] - ]) - reference_genome = Channel.of([ [id:'refHG38_chr21'], file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/hs38DH.chr21.fa.gz", checkIfExists: true), @@ -48,26 +47,23 @@ reference_genome = Channel.of([ workflow test_glimpse2_phase_vcf { GLIMPSE2_PHASE ( input_vcf.combine(ref_panel) - .combine(map_file) - .combine(samples_file), + .combine(map_file), Channel.of([[],[],[]]) - ) // [meta, vcf, index, regionin, regionout, regionindex, sample_infos], map, sample, [meta, ref, index] + ) // [meta, vcf, index, sample_infos, regionin, regionout,ref, index, map] [meta, fasta, fai] } workflow test_glimpse2_phase_bam { GLIMPSE2_PHASE ( input_bam.combine(ref_panel) - .combine(map_file) - .combine(samples_file), + .combine(map_file), Channel.of([[],[],[]]) - ) // [meta, vcf, index, regionin, regionout, regionindex, sample_infos], map, sample, [meta, ref, index] + ) // [meta, vcf, index, sample_infos, regionin, regionout,ref, index, map] [meta, fasta, fai] } workflow test_glimpse2_phase_cram { GLIMPSE2_PHASE ( input_cram.combine(ref_panel) - .combine(map_file) - .combine(samples_file), + .combine(map_file), reference_genome - ) // [meta, vcf, index, regionin, regionout, regionindex, sample_infos], map, sample, [meta, ref, index] -} \ No newline at end of file + ) // [meta, vcf, index, sample_infos, regionin, regionout,ref, index, map] [meta, fasta, fai] +} diff --git a/tests/modules/nf-core/glimpse2/phase/test.yml b/tests/modules/nf-core/glimpse2/phase/test.yml index 17d8e3e8ad0..d23a02903db 100644 --- a/tests/modules/nf-core/glimpse2/phase/test.yml +++ b/tests/modules/nf-core/glimpse2/phase/test.yml @@ -4,7 +4,7 @@ - glimpse2 - glimpse2/phase files: - - path: output/glimpse2/input_chr21_16600000-16800000.bcf + - path: output/glimpse2/input_chr21_16650000-16750000.bcf - path: output/glimpse2/versions.yml - name: glimpse2 phase test_glimpse2_phase_bam @@ -13,8 +13,8 @@ - glimpse2 - glimpse2/phase files: - - path: output/glimpse2/input_chr21_16600000-16800000.bcf - - path: output/glimpse2/input_chr21_16600000-16800000_stats_coverage.txt.gz + - path: output/glimpse2/input_chr21_16650000-16750000.bcf + - path: output/glimpse2/input_chr21_16650000-16750000_stats_coverage.txt.gz md5sum: 632f4bf08bed0870192933a0a32b95c8 - path: output/glimpse2/versions.yml @@ -24,7 +24,7 @@ - glimpse2 - glimpse2/phase files: - - path: output/glimpse2/input_chr21_16600000-16800000.bcf - - path: output/glimpse2/input_chr21_16600000-16800000_stats_coverage.txt.gz + - path: output/glimpse2/input_chr21_16650000-16750000.bcf + - path: output/glimpse2/input_chr21_16650000-16750000_stats_coverage.txt.gz md5sum: a2d58d6fcd1918f649a4eb19d0ee68c3 - path: output/glimpse2/versions.yml diff --git a/tests/subworkflows/nf-core/multiple_impute_glimpse2/main.nf b/tests/subworkflows/nf-core/multiple_impute_glimpse2/main.nf new file mode 100644 index 00000000000..df0c9fb0a00 --- /dev/null +++ b/tests/subworkflows/nf-core/multiple_impute_glimpse2/main.nf @@ -0,0 +1,73 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MULTIPLE_IMPUTE_GLIMPSE2 } from '../../../../subworkflows/nf-core/multiple_impute_glimpse2/main.nf' + + ch_input_vcf = Channel.of([ + [ id:'input_vcf'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", + checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", + checkIfExists: true), + ]) + sample = Channel.of('NA12878 2') + .collectFile(name: 'sampleinfos.txt') + ch_input_vcf_with_sample = ch_input_vcf.combine(sample) + ch_input_vcf_without_sample = ch_input_vcf.combine(Channel.of([[]])) + + ch_ref_panel = Channel.of([ + [ id:'ref_panel'], + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", + checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", + checkIfExists: true), + "chr21" + ]) + ch_map = Channel.of([ + [ id:'map'], + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true) + ]).collect() + + ch_fasta_empty = Channel.of([ + [ id:'ref_fasta'], + [], + [] + ]).collect() + +workflow test_multiple_impute_glimpse2_without_sample { + MULTIPLE_IMPUTE_GLIMPSE2 ( ch_input_vcf_without_sample, + ch_ref_panel, ch_map, ch_fasta_empty, "recursive" ) +} + +workflow test_multiple_impute_glimpse2_with_sample { + MULTIPLE_IMPUTE_GLIMPSE2 ( ch_input_vcf_with_sample, + ch_ref_panel, ch_map, ch_fasta_empty, "recursive" ) +} + +workflow test_multiple_impute_glimpse2_bam { + + input_bam = Channel.of([ + [id:'input'], + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.bam", checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.bam.bai", checkIfExists: true), + [] + ]) + + MULTIPLE_IMPUTE_GLIMPSE2 ( input_bam, ch_ref_panel, ch_map, ch_fasta_empty, "recursive" ) +} + +workflow test_multiple_impute_glimpse2_cram { + input_cram = Channel.of([ + [id:'input'], + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.cram", checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.cram.crai", checkIfExists: true), + [] + ]) + ch_fasta = Channel.of([ + [id:'refHG38_chr21'], + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/hs38DH.chr21.fa.gz", checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/hs38DH.chr21.fa.gz.fai", checkIfExists: true) + ]).collect() + MULTIPLE_IMPUTE_GLIMPSE2 ( input_cram, ch_ref_panel, ch_map, ch_fasta, "recursive" ) +} diff --git a/tests/subworkflows/nf-core/multiple_impute_glimpse2/nextflow.config b/tests/subworkflows/nf-core/multiple_impute_glimpse2/nextflow.config new file mode 100644 index 00000000000..15fff1d62f5 --- /dev/null +++ b/tests/subworkflows/nf-core/multiple_impute_glimpse2/nextflow.config @@ -0,0 +1,13 @@ +process { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: GLIMPSE2_CHUNK { + ext.args = [ + "--window-cm 0.05", + "--buffer-cm 0.02", + "--window-mb 0.05", + "--buffer-mb 0.02", + "--window-count 50", + "--buffer-count 25" + ].join(' ') + } +} diff --git a/tests/subworkflows/nf-core/multiple_impute_glimpse2/test.yml b/tests/subworkflows/nf-core/multiple_impute_glimpse2/test.yml new file mode 100644 index 00000000000..ead3a4648a9 --- /dev/null +++ b/tests/subworkflows/nf-core/multiple_impute_glimpse2/test.yml @@ -0,0 +1,103 @@ +- name: multiple_impute_glimpse2 test_multiple_impute_glimpse2_without_sample + command: nextflow run ./tests/subworkflows/nf-core/multiple_impute_glimpse2 -entry test_multiple_impute_glimpse2_without_sample -c ./tests/config/nextflow.config + tags: + - bcftools + - bcftools/index + - glimpse2 + - glimpse2/chunk + - glimpse2/ligate + - glimpse2/phase + - glimpse2/splitreference + - subworkflows + - subworkflows/multiple_impute_glimpse2 + files: + - path: output/glimpse2/input_vcf.vcf.gz + - path: output/glimpse2/input_vcf_ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin.bcf + - path: output/glimpse2/input_vcf_ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin.bcf + - path: output/glimpse2/ref_panel.txt + md5sum: 129913c63dbe586de143b8062bd1119d + - path: output/glimpse2/ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin + - path: output/glimpse2/ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin + - path: output/index/input_vcf.vcf.gz.csi + - path: output/index/input_vcf_ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin.bcf.csi + - path: output/index/input_vcf_ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin.bcf.csi + +- name: multiple_impute_glimpse2 test_multiple_impute_glimpse2_with_sample + command: nextflow run ./tests/subworkflows/nf-core/multiple_impute_glimpse2 -entry test_multiple_impute_glimpse2_with_sample -c ./tests/config/nextflow.config + tags: + - bcftools + - bcftools/index + - glimpse2 + - glimpse2/chunk + - glimpse2/ligate + - glimpse2/phase + - glimpse2/splitreference + - subworkflows + - subworkflows/multiple_impute_glimpse2 + files: + - path: output/glimpse2/input_vcf.vcf.gz + - path: output/glimpse2/input_vcf_ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin.bcf + - path: output/glimpse2/input_vcf_ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin.bcf + - path: output/glimpse2/ref_panel.txt + md5sum: 129913c63dbe586de143b8062bd1119d + - path: output/glimpse2/ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin + - path: output/glimpse2/ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin + - path: output/index/input_vcf.vcf.gz.csi + - path: output/index/input_vcf_ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin.bcf.csi + - path: output/index/input_vcf_ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin.bcf.csi + +- name: multiple_impute_glimpse2 test_multiple_impute_glimpse2_bam + command: nextflow run ./tests/subworkflows/nf-core/multiple_impute_glimpse2 -entry test_multiple_impute_glimpse2_bam -c ./tests/config/nextflow.config + tags: + - bcftools + - bcftools/index + - glimpse2 + - glimpse2/chunk + - glimpse2/ligate + - glimpse2/phase + - glimpse2/splitreference + - subworkflows + - subworkflows/multiple_impute_glimpse2 + files: + - path: output/glimpse2/input.vcf.gz + - path: output/glimpse2/input_ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin.bcf + - path: output/glimpse2/input_ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin_stats_coverage.txt.gz + md5sum: 632f4bf08bed0870192933a0a32b95c8 + - path: output/glimpse2/input_ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin.bcf + - path: output/glimpse2/input_ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin_stats_coverage.txt.gz + md5sum: 632f4bf08bed0870192933a0a32b95c8 + - path: output/glimpse2/ref_panel.txt + md5sum: 129913c63dbe586de143b8062bd1119d + - path: output/glimpse2/ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin + - path: output/glimpse2/ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin + - path: output/index/input.vcf.gz.csi + - path: output/index/input_ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin.bcf.csi + - path: output/index/input_ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin.bcf.csi + +- name: multiple_impute_glimpse2 test_multiple_impute_glimpse2_cram + command: nextflow run ./tests/subworkflows/nf-core/multiple_impute_glimpse2 -entry test_multiple_impute_glimpse2_cram -c ./tests/config/nextflow.config + tags: + - bcftools + - bcftools/index + - glimpse2 + - glimpse2/chunk + - glimpse2/ligate + - glimpse2/phase + - glimpse2/splitreference + - subworkflows + - subworkflows/multiple_impute_glimpse2 + files: + - path: output/glimpse2/input.vcf.gz + - path: output/glimpse2/input_ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin.bcf + - path: output/glimpse2/input_ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin_stats_coverage.txt.gz + md5sum: a2d58d6fcd1918f649a4eb19d0ee68c3 + - path: output/glimpse2/input_ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin.bcf + - path: output/glimpse2/input_ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin_stats_coverage.txt.gz + md5sum: a2d58d6fcd1918f649a4eb19d0ee68c3 + - path: output/glimpse2/ref_panel.txt + md5sum: 129913c63dbe586de143b8062bd1119d + - path: output/glimpse2/ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin + - path: output/glimpse2/ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin + - path: output/index/input.vcf.gz.csi + - path: output/index/input_ref_panel_chr21_16600115-16696345_chr21_16600115_16799989.bin.bcf.csi + - path: output/index/input_ref_panel_chr21_16696369-16799989_chr21_16600115_16799989.bin.bcf.csi diff --git a/tests/subworkflows/nf-core/vcf_impute_glimpse/main.nf b/tests/subworkflows/nf-core/vcf_impute_glimpse/main.nf index befb4e4ad45..f6cf80c20d7 100644 --- a/tests/subworkflows/nf-core/vcf_impute_glimpse/main.nf +++ b/tests/subworkflows/nf-core/vcf_impute_glimpse/main.nf @@ -4,35 +4,35 @@ nextflow.enable.dsl = 2 include { VCF_IMPUTE_GLIMPSE } from '../../../../subworkflows/nf-core/vcf_impute_glimpse/main.nf' - input_vcf = Channel.of([ - [ id:'input1'], // meta map - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", - checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", - checkIfExists: true), - "chr21" + samples_infos = Channel.of('NA12878 2').collectFile(name: 'sampleinfos.txt') + empty_channel = Channel.of([[]]) + region = Channel.of(["chr21"]) + input_vcf = Channel.of([ + [ id:'input'], // meta map + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) - ref_panel = Channel.of([ - [ id:'input1'], + + input_vcf_with_samples_infos = input_vcf.combine(samples_infos).combine(region) + input_vcf_without_samples_infos = input_vcf.combine(empty_channel).combine(region) + + ch_ref_panel = Channel.of([ + [ id:'ref_panel'], file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) ]) + ch_map = Channel.of([ - [ id:'input1'], + [ id:'map'], file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true) ]) workflow test_vcf_impute_glimpse_without_sample { - sample = Channel.of([[ id:'input1'],[]]) - VCF_IMPUTE_GLIMPSE ( input_vcf, ref_panel, ch_map, sample ) + VCF_IMPUTE_GLIMPSE ( input_vcf_without_samples_infos, ch_ref_panel, ch_map ) } workflow test_vcf_impute_glimpse_with_sample { - sample = Channel.of([[ id:'input1']]) - .combine(Channel.of('NA12878 2') - .collectFile(name: 'sampleinfos.txt') - ) - VCF_IMPUTE_GLIMPSE ( input_vcf, ref_panel, ch_map, sample ) + VCF_IMPUTE_GLIMPSE ( input_vcf_with_samples_infos, ch_ref_panel, ch_map ) } diff --git a/tests/subworkflows/nf-core/vcf_impute_glimpse/test.yml b/tests/subworkflows/nf-core/vcf_impute_glimpse/test.yml index f950fe3df1f..0dd90f6b903 100644 --- a/tests/subworkflows/nf-core/vcf_impute_glimpse/test.yml +++ b/tests/subworkflows/nf-core/vcf_impute_glimpse/test.yml @@ -8,10 +8,10 @@ - subworkflows - subworkflows/vcf_impute_glimpse files: - - path: output/glimpse/input1.txt + - path: output/glimpse/input.txt md5sum: 75bff56f26d8a590c429afee74df5110 - - path: output/glimpse/input1.vcf.gz - - path: output/glimpse/input1_chr21_16600115-16799989.vcf.gz + - path: output/glimpse/input.vcf.gz + - path: output/glimpse/input_chr21_16600115-16799989.vcf.gz - name: vcf_impute_glimpse test_vcf_impute_glimpse_with_sample command: nextflow run ./tests/subworkflows/nf-core/vcf_impute_glimpse -entry test_vcf_impute_glimpse_with_sample -c ./tests/config/nextflow.config @@ -23,7 +23,7 @@ - subworkflows - subworkflows/vcf_impute_glimpse files: - - path: output/glimpse/input1.txt + - path: output/glimpse/input.txt md5sum: 75bff56f26d8a590c429afee74df5110 - - path: output/glimpse/input1.vcf.gz - - path: output/glimpse/input1_chr21_16600115-16799989.vcf.gz + - path: output/glimpse/input.vcf.gz + - path: output/glimpse/input_chr21_16600115-16799989.vcf.gz From b9829e1064382745d8dff7f1d74d2138d2864f71 Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Tue, 2 May 2023 10:56:45 +0100 Subject: [PATCH 119/120] Default registry to quay.io (#3344) * Add default registry for Docker and Podman to quay.io Will break any non quay.io containers that were not specified with a full URI * Use full URI for all modules * More docker.io added to container specs * More docker.io * Correct docker container for VEP * Artifacts named after specific run Changes: - Name the upload after the specific tool that was analysed using the tag value - Reduces download size of artifacts when investigating failures * Update universc image name to use nfcore/universc instead of biocontainers/universc * Revert snpeff docker container to nfcore/snpeff * Update cellranger/count md5sum tests * Remove eido md5sum because it doesn't work on conda * Fix eido version string * correct md5sums * Omit gatk4 conda tools that don't work * Remove slashes from tags for uploading artifacts * bb22faef28dfb0b3b106bd5cc320bf09 * Correct string parsing for artifact upload * Remove singularity gatk4/determinegermlinecontigploidy test because it just breaks the VM after too long * fix-meta-liniting --------- Co-authored-by: Sateesh Peri --- .github/workflows/pytest-workflow.yml | 20 ++++++++++++++++++- modules/nf-core/bases2fastq/main.nf | 2 +- modules/nf-core/basicpy/main.nf | 2 +- modules/nf-core/basicpy/meta.yml | 2 +- modules/nf-core/bcl2fastq/main.nf | 2 +- modules/nf-core/bclconvert/main.nf | 2 +- modules/nf-core/cat/fastq/main.nf | 2 +- modules/nf-core/cat/fastq/meta.yml | 3 ++- modules/nf-core/cellpose/main.nf | 2 +- modules/nf-core/cellpose/meta.yml | 8 +++++--- modules/nf-core/coreograph/main.nf | 2 +- modules/nf-core/coreograph/meta.yml | 4 ++-- .../nf-core/custom/tabulartogseacls/main.nf | 2 +- .../nf-core/custom/tabulartogseagct/main.nf | 2 +- .../nf-core/custom/tabulartogseagct/meta.yml | 1 + modules/nf-core/deepcell/mesmer/main.nf | 2 +- modules/nf-core/deepcell/mesmer/meta.yml | 2 +- modules/nf-core/deepvariant/main.nf | 2 +- modules/nf-core/deepvariant/meta.yml | 1 + modules/nf-core/eido/convert/main.nf | 4 ++-- modules/nf-core/eido/convert/meta.yml | 2 +- modules/nf-core/eido/validate/main.nf | 4 ++-- modules/nf-core/fqtk/meta.yml | 4 ++-- modules/nf-core/gatk4/applybqsrspark/main.nf | 2 +- modules/nf-core/gatk4/applybqsrspark/meta.yml | 1 + .../gatk4/baserecalibratorspark/main.nf | 2 +- .../gatk4/baserecalibratorspark/meta.yml | 2 ++ .../nf-core/gatk4/cnnscorevariants/main.nf | 2 +- .../determinegermlinecontigploidy/main.nf | 2 +- .../determinegermlinecontigploidy/meta.yml | 4 ++-- .../nf-core/gatk4/germlinecnvcaller/main.nf | 2 +- .../nf-core/gatk4/germlinecnvcaller/meta.yml | 3 ++- .../nf-core/gatk4/markduplicatesspark/main.nf | 2 +- .../gatk4/postprocessgermlinecnvcalls/main.nf | 2 +- modules/nf-core/gnu/sort/main.nf | 2 +- modules/nf-core/gnu/sort/meta.yml | 3 ++- modules/nf-core/gunzip/main.nf | 2 +- modules/nf-core/gunzip/meta.yml | 1 + modules/nf-core/igv/js/main.nf | 2 +- modules/nf-core/ilastik/multicut/main.nf | 2 +- modules/nf-core/ilastik/multicut/meta.yml | 2 +- .../ilastik/pixelclassification/main.nf | 2 +- .../ilastik/pixelclassification/meta.yml | 1 - modules/nf-core/kraken2/kraken2/meta.yml | 4 ++-- modules/nf-core/mcquant/main.nf | 2 +- modules/nf-core/mcquant/meta.yml | 2 +- modules/nf-core/md5sum/main.nf | 2 +- modules/nf-core/md5sum/meta.yml | 2 ++ modules/nf-core/scimap/mcmicro/main.nf | 2 +- modules/nf-core/scimap/mcmicro/meta.yml | 3 ++- modules/nf-core/sentieon/bwaindex/main.nf | 2 +- modules/nf-core/sentieon/bwamem/main.nf | 2 +- modules/nf-core/sentieon/bwamem/meta.yml | 1 + modules/nf-core/sentieon/dedup/main.nf | 2 +- modules/nf-core/sentieon/dedup/meta.yml | 2 ++ modules/nf-core/sentieon/haplotyper/main.nf | 2 +- modules/nf-core/sgdemux/meta.yml | 1 + modules/nf-core/shasum/main.nf | 2 +- modules/nf-core/shasum/meta.yml | 1 + modules/nf-core/snpeff/snpeff/meta.yml | 4 +++- modules/nf-core/universc/README.md | 6 +++--- modules/nf-core/universc/main.nf | 2 +- modules/nf-core/untar/main.nf | 2 +- modules/nf-core/untar/meta.yml | 1 + modules/nf-core/untarfiles/main.nf | 2 +- modules/nf-core/untarfiles/meta.yml | 3 ++- tests/config/nextflow.config | 2 ++ tests/modules/nf-core/eido/validate/test.yml | 2 -- .../nf-core/ensemblvep/vep/nextflow.config | 14 ++++++------- .../nf-core/snpeff/snpeff/nextflow.config | 2 +- .../modules/nf-core/universc/nextflow.config | 6 +++--- .../vcf_annotate_ensemblvep/nextflow.config | 2 +- .../vcf_annotate_snpeff/nextflow.config | 2 +- 73 files changed, 120 insertions(+), 80 deletions(-) diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 3959f62b49e..6bdaab9815c 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -86,10 +86,18 @@ jobs: tags: fcs/fcsadaptor - profile: "conda" tags: fcs/fcsgx + - profile: "conda" + tags: gatk4/baserecalibratorspark - profile: "conda" tags: gatk4/cnnscorevariants - profile: "conda" tags: gatk4/determinegermlinecontigploidy + - profile: "conda" + tags: gatk4/germlinecnvcaller + - profile: "conda" + tags: gatk4/markduplicatesspark + - profile: "conda" + tags: gatk4/postprocessgermlinecnvcalls - profile: "conda" tags: genescopefk - profile: "conda" @@ -122,6 +130,8 @@ jobs: tags: universc - profile: "singularity" tags: universc + - profile: "singularity" + tags: gatk4/determinegermlinecontigploidy - profile: "conda" tags: subworkflows/bcl_demultiplex - profile: "conda" @@ -207,11 +217,19 @@ jobs: sudo apt-get install bat > /dev/null batcat --decorations=always --color=always /home/runner/pytest_workflow_*/*/log.{out,err} + - name: Setting global variables + uses: actions/github-script@v6 + id: parsed + with: + script: | + return '${{ matrix.tags }}'.toLowerCase().replaceAll(/\//g, '-').trim('-').trim('"') + result-encoding: string + - name: Upload logs on failure if: failure() uses: actions/upload-artifact@v2 with: - name: logs-${{ matrix.profile }} + name: logs-${{ matrix.profile }}-${{ steps.parsed.outputs.result }} path: | /home/runner/pytest_workflow_*/*/.nextflow.log /home/runner/pytest_workflow_*/*/log.out diff --git a/modules/nf-core/bases2fastq/main.nf b/modules/nf-core/bases2fastq/main.nf index 5821c7200f0..89c0445618b 100644 --- a/modules/nf-core/bases2fastq/main.nf +++ b/modules/nf-core/bases2fastq/main.nf @@ -2,7 +2,7 @@ process BASES2FASTQ { tag "$meta.id" label 'process_high' - container "elembio/bases2fastq:1.1.0" + container "docker.io/elembio/bases2fastq:1.1.0" // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { diff --git a/modules/nf-core/basicpy/main.nf b/modules/nf-core/basicpy/main.nf index 4cc92517067..bfebe901ce8 100644 --- a/modules/nf-core/basicpy/main.nf +++ b/modules/nf-core/basicpy/main.nf @@ -7,7 +7,7 @@ process BASICPY { exit 1, "Basicpy module does not support Conda. Please use Docker / Singularity instead." } - container "yfukai/basicpy-docker-mcmicro:0.2.1" + container "docker.io/yfukai/basicpy-docker-mcmicro:0.2.1" input: tuple val(meta), path(image) diff --git a/modules/nf-core/basicpy/meta.yml b/modules/nf-core/basicpy/meta.yml index bf9e69037e0..14151780145 100644 --- a/modules/nf-core/basicpy/meta.yml +++ b/modules/nf-core/basicpy/meta.yml @@ -11,7 +11,7 @@ tools: homepage: "https://github.com/peng-lab/BaSiCPy" documentation: "https://basicpy.readthedocs.io/en/latest/index.html" tool_dev_url: "https://github.com/peng-lab/BaSiCPy" - doi: "doi: 10.1038/ncomms14836." + doi: 10.1038/ncomms14836 licence: "MIT License" input: diff --git a/modules/nf-core/bcl2fastq/main.nf b/modules/nf-core/bcl2fastq/main.nf index 775c705353a..c34e1081291 100644 --- a/modules/nf-core/bcl2fastq/main.nf +++ b/modules/nf-core/bcl2fastq/main.nf @@ -2,7 +2,7 @@ process BCL2FASTQ { tag {"$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } label 'process_high' - container "nfcore/bcl2fastq:2.20.0.422" + container "docker.io/nfcore/bcl2fastq:2.20.0.422" // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { diff --git a/modules/nf-core/bclconvert/main.nf b/modules/nf-core/bclconvert/main.nf index 82e86b34d6d..8624930b317 100644 --- a/modules/nf-core/bclconvert/main.nf +++ b/modules/nf-core/bclconvert/main.nf @@ -2,7 +2,7 @@ process BCLCONVERT { tag {"$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } label 'process_high' - container "nfcore/bclconvert:4.0.3" + container "docker.io/nfcore/bclconvert:4.0.3" // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index 8a0b5600c22..4bdec89001f 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -5,7 +5,7 @@ process CAT_FASTQ { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'docker.io/ubuntu:20.04' }" input: tuple val(meta), path(reads, stageAs: "input*/*") diff --git a/modules/nf-core/cat/fastq/meta.yml b/modules/nf-core/cat/fastq/meta.yml index c836598e491..8a39e309fbc 100644 --- a/modules/nf-core/cat/fastq/meta.yml +++ b/modules/nf-core/cat/fastq/meta.yml @@ -1,6 +1,7 @@ name: cat_fastq description: Concatenates fastq files keywords: + - cat - fastq - concatenate tools: @@ -16,7 +17,7 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - reads: - type: list + type: file description: | List of input FastQ files to be concatenated. output: diff --git a/modules/nf-core/cellpose/main.nf b/modules/nf-core/cellpose/main.nf index fdf4d171641..f0f462e0ff2 100644 --- a/modules/nf-core/cellpose/main.nf +++ b/modules/nf-core/cellpose/main.nf @@ -6,7 +6,7 @@ process CELLPOSE { if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { exit 1, "I did not manage to create a cellpose module in Conda that works in all OSes. Please use Docker / Singularity / Podman instead."} - container "biocontainers/cellpose:2.1.1_cv2" + container "docker.io/biocontainers/cellpose:2.1.1_cv2" input: tuple val(meta), path(image) diff --git a/modules/nf-core/cellpose/meta.yml b/modules/nf-core/cellpose/meta.yml index 033ea613f6b..b452f576b6f 100644 --- a/modules/nf-core/cellpose/meta.yml +++ b/modules/nf-core/cellpose/meta.yml @@ -2,13 +2,15 @@ name: "cellpose" description: cellpose segments cells in images keywords: - segmentation + - image + - cellpose tools: - "cellpose": description: "cellpose is an anatomical segmentation algorithm written in Python 3 by Carsen Stringer and Marius Pachitariu" homepage: "https://github.com/MouseLand/cellpose" documentation: "https://cellpose.readthedocs.io/en/latest/command.html" tool_dev_url: "https://github.com/MouseLand/cellpose" - doi: "https://doi.org/10.1038/s41592-022-01663-4" + doi: 10.1038/s41592-022-01663-4 licence: "BSD 3-Clause" input: @@ -18,7 +20,7 @@ input: Groovy Map containing sample information (sample id) - image: - type: image stack + type: file description: tif file for ready for segmentation pattern: "*.{tif,tiff}" - model: @@ -36,7 +38,7 @@ output: description: File containing software versions pattern: "versions.yml" - mask: - type: tif_file + type: file description: labelled mask output from cellpose in tif format pattern: "*.{tif, tiff}" diff --git a/modules/nf-core/coreograph/main.nf b/modules/nf-core/coreograph/main.nf index cd1646dba3a..52a1adcf060 100644 --- a/modules/nf-core/coreograph/main.nf +++ b/modules/nf-core/coreograph/main.nf @@ -2,7 +2,7 @@ process COREOGRAPH { tag "$meta.id" label 'process_single' - container "labsyspharm/unetcoreograph:2.2.9" + container "docker.io/labsyspharm/unetcoreograph:2.2.9" input: tuple val(meta), path(image) diff --git a/modules/nf-core/coreograph/meta.yml b/modules/nf-core/coreograph/meta.yml index ee44c9459f4..2e22853b448 100644 --- a/modules/nf-core/coreograph/meta.yml +++ b/modules/nf-core/coreograph/meta.yml @@ -11,7 +11,7 @@ tools: homepage: "https://mcmicro.org/parameters/core.html#coreograph" documentation: "https://mcmicro.org/troubleshooting/tuning/coreograph.html" tool_dev_url: "https://github.com/HMS-IDAC/UNetCoreograph" - doi: "https://doi.org/10.1038/s41592-021-01308-y" + doi: 10.1038/s41592-021-01308-y licence: "MIT License" input: @@ -38,7 +38,7 @@ output: pattern: "*.{tif}" - masks: - type: files + type: file description: Binary masks for the Complete/Incomplete tissue cores pattern: "./masks/*.{tif}" diff --git a/modules/nf-core/custom/tabulartogseacls/main.nf b/modules/nf-core/custom/tabulartogseacls/main.nf index f5f9dbcfa1f..0e1d4d9638a 100644 --- a/modules/nf-core/custom/tabulartogseacls/main.nf +++ b/modules/nf-core/custom/tabulartogseacls/main.nf @@ -5,7 +5,7 @@ process CUSTOM_TABULARTOGSEACLS { conda "conda-forge::coreutils=9.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'docker.io/ubuntu:20.04' }" input: tuple val(meta), path(samples) diff --git a/modules/nf-core/custom/tabulartogseagct/main.nf b/modules/nf-core/custom/tabulartogseagct/main.nf index 2aa72ef086a..62ca8eaf84a 100644 --- a/modules/nf-core/custom/tabulartogseagct/main.nf +++ b/modules/nf-core/custom/tabulartogseagct/main.nf @@ -5,7 +5,7 @@ process CUSTOM_TABULARTOGSEAGCT { conda "conda-forge::coreutils=9.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'docker.io/ubuntu:20.04' }" input: tuple val(meta), path(tabular) diff --git a/modules/nf-core/custom/tabulartogseagct/meta.yml b/modules/nf-core/custom/tabulartogseagct/meta.yml index 5de072e051f..14274b6058a 100644 --- a/modules/nf-core/custom/tabulartogseagct/meta.yml +++ b/modules/nf-core/custom/tabulartogseagct/meta.yml @@ -3,6 +3,7 @@ description: Convert a TSV or CSV with features by row and observations by colum keywords: - gsea - gct + - tabular tools: - tabulartogseagct: description: "Convert a TSV or CSV with features by row and observations by column to a GCT format file as consumed by GSEA" diff --git a/modules/nf-core/deepcell/mesmer/main.nf b/modules/nf-core/deepcell/mesmer/main.nf index 8bff71c3f37..56d96c5a9e0 100644 --- a/modules/nf-core/deepcell/mesmer/main.nf +++ b/modules/nf-core/deepcell/mesmer/main.nf @@ -2,7 +2,7 @@ process DEEPCELL_MESMER { tag "$meta.id" label 'process_single' - container "vanvalenlab/deepcell-applications:0.4.1" + container "docker.io/vanvalenlab/deepcell-applications:0.4.1" input: tuple val(meta) , path(img) diff --git a/modules/nf-core/deepcell/mesmer/meta.yml b/modules/nf-core/deepcell/mesmer/meta.yml index c4c7715869a..49fd3918ae4 100644 --- a/modules/nf-core/deepcell/mesmer/meta.yml +++ b/modules/nf-core/deepcell/mesmer/meta.yml @@ -10,7 +10,7 @@ tools: homepage: "https://github.com/vanvalenlab/deepcell-tf" documentation: "https://github.com/vanvalenlab/intro-to-deepcell/tree/master/pretrained_models" tool_dev_url: "https://githu/b.com/vanvalenlab/deepcell-tf" - doi: "https://doi.org/10.1038/s41587-021-01094-0" + doi: 10.1038/s41587-021-01094-0 licence: "APACHE2" input: diff --git a/modules/nf-core/deepvariant/main.nf b/modules/nf-core/deepvariant/main.nf index 434fcc0e4b3..afc5e444b33 100644 --- a/modules/nf-core/deepvariant/main.nf +++ b/modules/nf-core/deepvariant/main.nf @@ -2,7 +2,7 @@ process DEEPVARIANT { tag "$meta.id" label 'process_medium' - container "google/deepvariant:1.4.0" + container "docker.io/google/deepvariant:1.4.0" // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { diff --git a/modules/nf-core/deepvariant/meta.yml b/modules/nf-core/deepvariant/meta.yml index 63868b25978..97f068ec1ff 100644 --- a/modules/nf-core/deepvariant/meta.yml +++ b/modules/nf-core/deepvariant/meta.yml @@ -3,6 +3,7 @@ description: DeepVariant is an analysis pipeline that uses a deep neural network keywords: - variant calling - machine learning + - neural network tools: - deepvariant: description: DeepVariant is an analysis pipeline that uses a deep neural network to call genetic variants from next-generation DNA sequencing data diff --git a/modules/nf-core/eido/convert/main.nf b/modules/nf-core/eido/convert/main.nf index dbbe142d013..dec190f9a89 100644 --- a/modules/nf-core/eido/convert/main.nf +++ b/modules/nf-core/eido/convert/main.nf @@ -5,7 +5,7 @@ process EIDO_CONVERT { conda "conda-forge::eido=0.1.9" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://containers.biocontainers.pro/s3/SingImgsRepo/eido/0.1.9_cv1/eido_0.1.9_cv1.sif' : - 'biocontainers/eido:0.1.9_cv1' }" + 'docker.io/biocontainers/eido:0.1.9_cv1' }" input: path samplesheet @@ -32,7 +32,7 @@ process EIDO_CONVERT { cat <<-END_VERSIONS > versions.yml "${task.process}": - eido: \$(echo \$(eido --version 2>&1) | sed 's/^.*eido //;s/ .*//' )) + eido: \$(echo \$(eido --version 2>&1) | sed 's/^.*eido //;s/ .*//' ) END_VERSIONS """ } diff --git a/modules/nf-core/eido/convert/meta.yml b/modules/nf-core/eido/convert/meta.yml index bd12e032699..765b722b3e9 100644 --- a/modules/nf-core/eido/convert/meta.yml +++ b/modules/nf-core/eido/convert/meta.yml @@ -20,7 +20,7 @@ input: description: Nextflow samplesheet or PEP project pattern: "*.{yaml,yml,csv}" - format: - type: value + type: string description: Extension of an output file - pep_input_base_dir: type: file diff --git a/modules/nf-core/eido/validate/main.nf b/modules/nf-core/eido/validate/main.nf index 466bcc96402..aa464537625 100644 --- a/modules/nf-core/eido/validate/main.nf +++ b/modules/nf-core/eido/validate/main.nf @@ -5,7 +5,7 @@ process EIDO_VALIDATE { conda "conda-forge::eido=0.1.9" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://containers.biocontainers.pro/s3/SingImgsRepo/eido/0.1.9_cv2/eido_0.1.9_cv2.sif' : - 'biocontainers/eido:0.1.9_cv2' }" + 'docker.io/biocontainers/eido:0.1.9_cv2' }" input: path samplesheet @@ -27,7 +27,7 @@ process EIDO_VALIDATE { cat <<-END_VERSIONS > versions.yml "${task.process}": - eido: \$(echo \$(eido --version 2>&1) | sed 's/^.*eido //;s/ .*//' )) + eido: \$(echo \$(eido --version 2>&1) | sed 's/^.*eido //;s/ .*//' ) END_VERSIONS """ } diff --git a/modules/nf-core/fqtk/meta.yml b/modules/nf-core/fqtk/meta.yml index 7ebc0c150cc..1568bdf879a 100644 --- a/modules/nf-core/fqtk/meta.yml +++ b/modules/nf-core/fqtk/meta.yml @@ -3,12 +3,12 @@ description: Demultiplex fastq files keywords: - demultiplex - fastq + - rust tools: - "fqtk": description: "A toolkit for working with FASTQ files, written in Rust." homepage: "https://github.com/fulcrumgenomics/fqtk" documentation: "https://github.com/fulcrumgenomics/fqtk" - tool_dev_url: "None" licence: "['MIT']" input: @@ -22,7 +22,7 @@ input: description: Tsv file, with two columns sample_id and barcode pattern: "*.{tsv}" - fastq_readstructure_pairs: - type: list + type: map description: List of lists i.e. [[, , ],...] output: diff --git a/modules/nf-core/gatk4/applybqsrspark/main.nf b/modules/nf-core/gatk4/applybqsrspark/main.nf index 208c6b5b026..e920a2554d6 100644 --- a/modules/nf-core/gatk4/applybqsrspark/main.nf +++ b/modules/nf-core/gatk4/applybqsrspark/main.nf @@ -3,7 +3,7 @@ process GATK4_APPLYBQSR_SPARK { label 'process_low' conda "bioconda::gatk4=4.3.0.0 conda-forge::openjdk=8.0.312" - container 'broadinstitute/gatk:4.4.0.0' + container 'docker.io/broadinstitute/gatk:4.4.0.0' input: tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals) diff --git a/modules/nf-core/gatk4/applybqsrspark/meta.yml b/modules/nf-core/gatk4/applybqsrspark/meta.yml index bc6a8ebfd8a..9acdecc5af4 100644 --- a/modules/nf-core/gatk4/applybqsrspark/meta.yml +++ b/modules/nf-core/gatk4/applybqsrspark/meta.yml @@ -3,6 +3,7 @@ description: Apply base quality score recalibration (BQSR) to a bam file keywords: - bqsr - bam + - gatk tools: - gatk4: description: | diff --git a/modules/nf-core/gatk4/baserecalibratorspark/main.nf b/modules/nf-core/gatk4/baserecalibratorspark/main.nf index 85785856578..8857dbc3828 100644 --- a/modules/nf-core/gatk4/baserecalibratorspark/main.nf +++ b/modules/nf-core/gatk4/baserecalibratorspark/main.nf @@ -3,7 +3,7 @@ process GATK4_BASERECALIBRATOR_SPARK { label 'process_low' conda "bioconda::gatk4=4.4.0.0 conda-forge::openjdk=8.0.312" - container 'broadinstitute/gatk:4.4.0.0' + container 'docker.io/broadinstitute/gatk:4.4.0.0' input: tuple val(meta), path(input), path(input_index), path(intervals) diff --git a/modules/nf-core/gatk4/baserecalibratorspark/meta.yml b/modules/nf-core/gatk4/baserecalibratorspark/meta.yml index d12f8ec267e..a4a73ade518 100644 --- a/modules/nf-core/gatk4/baserecalibratorspark/meta.yml +++ b/modules/nf-core/gatk4/baserecalibratorspark/meta.yml @@ -2,6 +2,8 @@ name: gatk4_baserecalibrator_spark description: Generate recalibration table for Base Quality Score Recalibration (BQSR) keywords: - sort + - bqsr + - gatk tools: - gatk4: description: | diff --git a/modules/nf-core/gatk4/cnnscorevariants/main.nf b/modules/nf-core/gatk4/cnnscorevariants/main.nf index 38dad6cb443..730544f61e5 100644 --- a/modules/nf-core/gatk4/cnnscorevariants/main.nf +++ b/modules/nf-core/gatk4/cnnscorevariants/main.nf @@ -3,7 +3,7 @@ process GATK4_CNNSCOREVARIANTS { label 'process_low' //Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811 - container "broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package + container "docker.io/broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { diff --git a/modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf b/modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf index 2d630bbae13..2112f675cff 100644 --- a/modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf +++ b/modules/nf-core/gatk4/determinegermlinecontigploidy/main.nf @@ -3,7 +3,7 @@ process GATK4_DETERMINEGERMLINECONTIGPLOIDY { label 'process_single' //Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811 - container "broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package + container "docker.io/broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { diff --git a/modules/nf-core/gatk4/determinegermlinecontigploidy/meta.yml b/modules/nf-core/gatk4/determinegermlinecontigploidy/meta.yml index 1a624a5d0ff..3facab6ea52 100644 --- a/modules/nf-core/gatk4/determinegermlinecontigploidy/meta.yml +++ b/modules/nf-core/gatk4/determinegermlinecontigploidy/meta.yml @@ -23,7 +23,7 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - counts: - type: file(s) + type: file description: One or more count TSV files created with gatk/collectreadcounts pattern: "*.tsv" - bed: @@ -31,7 +31,7 @@ input: description: Optional - A bed file containing the intervals to include in the process pattern: "*.bed" - exclude_beds: - type: file(s) + type: file description: Optional - One or more bed files containing intervals to exclude from the process pattern: "*.bed" - contig_ploidy_table: diff --git a/modules/nf-core/gatk4/germlinecnvcaller/main.nf b/modules/nf-core/gatk4/germlinecnvcaller/main.nf index f3e7248ec3d..c6fc0a46f09 100644 --- a/modules/nf-core/gatk4/germlinecnvcaller/main.nf +++ b/modules/nf-core/gatk4/germlinecnvcaller/main.nf @@ -3,7 +3,7 @@ process GATK4_GERMLINECNVCALLER { label 'process_single' //Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811 - container "broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package + container "docker.io/broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { diff --git a/modules/nf-core/gatk4/germlinecnvcaller/meta.yml b/modules/nf-core/gatk4/germlinecnvcaller/meta.yml index 1574c06a4bb..c234e7b71e5 100644 --- a/modules/nf-core/gatk4/germlinecnvcaller/meta.yml +++ b/modules/nf-core/gatk4/germlinecnvcaller/meta.yml @@ -3,6 +3,7 @@ description: Calls copy-number variants in germline samples given their counts a keywords: - gatk - gatk4_germlinecnvcaller + - germline contig ploidy tools: - "gatk4": description: @@ -21,7 +22,7 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - tsv: - type: file(s) + type: file description: One or more count TSV files created with gatk/collectreadcounts pattern: "*.tsv" - intervals: diff --git a/modules/nf-core/gatk4/markduplicatesspark/main.nf b/modules/nf-core/gatk4/markduplicatesspark/main.nf index b1716584d58..d1388298c1c 100644 --- a/modules/nf-core/gatk4/markduplicatesspark/main.nf +++ b/modules/nf-core/gatk4/markduplicatesspark/main.nf @@ -3,7 +3,7 @@ process GATK4_MARKDUPLICATES_SPARK { label 'process_high' conda "bioconda::gatk4=4.3.0.0 conda-forge::openjdk=8.0.312" - container 'broadinstitute/gatk:4.4.0.0' + container 'docker.io/broadinstitute/gatk:4.4.0.0' input: tuple val(meta), path(bam) diff --git a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf index 9e965107e21..8ac5d6013ca 100644 --- a/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf +++ b/modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf @@ -3,7 +3,7 @@ process GATK4_POSTPROCESSGERMLINECNVCALLS { label 'process_single' //Conda is not supported at the moment: https://github.com/broadinstitute/gatk/issues/7811 - container "broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package + container "docker.io/broadinstitute/gatk:4.4.0.0" //Biocontainers is missing a package // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { diff --git a/modules/nf-core/gnu/sort/main.nf b/modules/nf-core/gnu/sort/main.nf index e2b0bc9eb85..1c1b9ede824 100644 --- a/modules/nf-core/gnu/sort/main.nf +++ b/modules/nf-core/gnu/sort/main.nf @@ -5,7 +5,7 @@ process GNU_SORT { conda "conda-forge::coreutils=9.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'docker.io/ubuntu:20.04' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/gnu/sort/meta.yml b/modules/nf-core/gnu/sort/meta.yml index d53317a65bd..e7fb028437f 100644 --- a/modules/nf-core/gnu/sort/meta.yml +++ b/modules/nf-core/gnu/sort/meta.yml @@ -4,9 +4,10 @@ description: | keywords: - GNU - sort + - merge compare tools: - sort: - description: "Writes a sorted consatenation of file/s" + description: "Writes a sorted concatenation of file/s" homepage: "https://github.com/vgl-hub/gfastats" documentation: "https://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html" licence: ["GPL"] diff --git a/modules/nf-core/gunzip/main.nf b/modules/nf-core/gunzip/main.nf index d906034c38a..194dfc32263 100644 --- a/modules/nf-core/gunzip/main.nf +++ b/modules/nf-core/gunzip/main.nf @@ -5,7 +5,7 @@ process GUNZIP { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'docker.io/ubuntu:20.04' }" input: tuple val(meta), path(archive) diff --git a/modules/nf-core/gunzip/meta.yml b/modules/nf-core/gunzip/meta.yml index 2e0e4054d82..4cdcdf4c439 100644 --- a/modules/nf-core/gunzip/meta.yml +++ b/modules/nf-core/gunzip/meta.yml @@ -3,6 +3,7 @@ description: Compresses and decompresses files. keywords: - gunzip - compression + - decompression tools: - gunzip: description: | diff --git a/modules/nf-core/igv/js/main.nf b/modules/nf-core/igv/js/main.nf index 12e050f431c..198d6bc047c 100644 --- a/modules/nf-core/igv/js/main.nf +++ b/modules/nf-core/igv/js/main.nf @@ -6,7 +6,7 @@ process IGV_JS { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'docker.io/ubuntu:20.04' }" input: tuple val(meta), path(alignment), path(index) diff --git a/modules/nf-core/ilastik/multicut/main.nf b/modules/nf-core/ilastik/multicut/main.nf index 40832d3f37d..dc1d560838d 100644 --- a/modules/nf-core/ilastik/multicut/main.nf +++ b/modules/nf-core/ilastik/multicut/main.nf @@ -7,7 +7,7 @@ process ILASTIK_MULTICUT { if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { exit 1, "ILASTIK_MULTICUT module does not support Conda. Please use Docker / Singularity / Podman instead." } - container "biocontainers/ilastik:1.4.0_cv1" + container "docker.io/biocontainers/ilastik:1.4.0_cv1" input: tuple val(meta), path(h5) diff --git a/modules/nf-core/ilastik/multicut/meta.yml b/modules/nf-core/ilastik/multicut/meta.yml index 9f48a2e72c0..39493df149c 100644 --- a/modules/nf-core/ilastik/multicut/meta.yml +++ b/modules/nf-core/ilastik/multicut/meta.yml @@ -4,13 +4,13 @@ description: Ilastik is a tool that utilizes machine learning algorithms to clas keywords: - multicut - segmentation + - pixel classification tools: - "ilastik": description: "Ilastik is a user friendly tool that enables pixel classification, segmentation and analysis." homepage: "https://www.ilastik.org/" documentation: "https://www.ilastik.org/documentation/" tool_dev_url: "https://github.com/ilastik/ilastik" - doi: "" licence: "GPL3" input: diff --git a/modules/nf-core/ilastik/pixelclassification/main.nf b/modules/nf-core/ilastik/pixelclassification/main.nf index e5529fdce4e..3cea9f6b0dd 100644 --- a/modules/nf-core/ilastik/pixelclassification/main.nf +++ b/modules/nf-core/ilastik/pixelclassification/main.nf @@ -6,7 +6,7 @@ process ILASTIK_PIXELCLASSIFICATION { if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { exit 1, "ILASTIK_PIXELCLASSIFICATION module does not support Conda. Please use Docker / Singularity / Podman instead." } - container "biocontainers/ilastik:1.4.0_cv1" + container "docker.io/biocontainers/ilastik:1.4.0_cv1" input: tuple val(meta), path(input_img) diff --git a/modules/nf-core/ilastik/pixelclassification/meta.yml b/modules/nf-core/ilastik/pixelclassification/meta.yml index 511aacf4da3..017ea842833 100644 --- a/modules/nf-core/ilastik/pixelclassification/meta.yml +++ b/modules/nf-core/ilastik/pixelclassification/meta.yml @@ -11,7 +11,6 @@ tools: homepage: "https://www.ilastik.org/" documentation: "https://www.ilastik.org/documentation/" tool_dev_url: "https://github.com/ilastik/ilastik" - doi: "" licence: "GPL3" input: diff --git a/modules/nf-core/kraken2/kraken2/meta.yml b/modules/nf-core/kraken2/kraken2/meta.yml index 7129fe3a048..4721f45bca5 100644 --- a/modules/nf-core/kraken2/kraken2/meta.yml +++ b/modules/nf-core/kraken2/kraken2/meta.yml @@ -28,12 +28,12 @@ input: type: directory description: Kraken2 database - save_output_fastqs: - type: boolean + type: string description: | If true, optional commands are added to save classified and unclassified reads as fastq files - save_reads_assignment: - type: boolean + type: string description: | If true, an optional command is added to save a file reporting the taxonomic classification of each input read diff --git a/modules/nf-core/mcquant/main.nf b/modules/nf-core/mcquant/main.nf index 507ee3aa06f..bc0eedf6b51 100644 --- a/modules/nf-core/mcquant/main.nf +++ b/modules/nf-core/mcquant/main.nf @@ -3,7 +3,7 @@ process MCQUANT { label 'process_single' // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - container "labsyspharm/quantification:1.5.4" + container "docker.io/labsyspharm/quantification:1.5.4" input: tuple val(meta), path(image) diff --git a/modules/nf-core/mcquant/meta.yml b/modules/nf-core/mcquant/meta.yml index 764dc402129..5400314da6c 100644 --- a/modules/nf-core/mcquant/meta.yml +++ b/modules/nf-core/mcquant/meta.yml @@ -11,7 +11,7 @@ tools: homepage: "https://github.com/labsyspharm/quantification" documentation: "https://github.com/labsyspharm/quantification/blob/master/README.md" tool_dev_url: "https://github.com/labsyspharm/quantification" - doi: "https://doi.org/10.1038/s41592-021-01308-y" + doi: 10.1038/s41592-021-01308-y licence: "" input: diff --git a/modules/nf-core/md5sum/main.nf b/modules/nf-core/md5sum/main.nf index c3f9f893b92..e2ee9bdd0c3 100644 --- a/modules/nf-core/md5sum/main.nf +++ b/modules/nf-core/md5sum/main.nf @@ -5,7 +5,7 @@ process MD5SUM { conda "conda-forge::coreutils=9.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'docker.io/ubuntu:20.04' }" input: tuple val(meta), path(file) diff --git a/modules/nf-core/md5sum/meta.yml b/modules/nf-core/md5sum/meta.yml index d4f1939d0b6..0c9d196f9c2 100644 --- a/modules/nf-core/md5sum/meta.yml +++ b/modules/nf-core/md5sum/meta.yml @@ -2,6 +2,8 @@ name: "md5sum" description: Create an MD5 (128-bit) checksum keywords: - checksum + - MD5 + - 128 bit tools: - "md5sum": description: Create an MD5 (128-bit) checksum diff --git a/modules/nf-core/scimap/mcmicro/main.nf b/modules/nf-core/scimap/mcmicro/main.nf index bc15922e511..e344deda083 100644 --- a/modules/nf-core/scimap/mcmicro/main.nf +++ b/modules/nf-core/scimap/mcmicro/main.nf @@ -7,7 +7,7 @@ process SCIMAP_MCMICRO { exit 1, "Scimap module does not support Conda. Please use Docker / Singularity / Podman instead." } - container "labsyspharm/scimap:0.22.0" + container "docker.io/labsyspharm/scimap:0.22.0" input: tuple val(meta), path(cellbyfeature) diff --git a/modules/nf-core/scimap/mcmicro/meta.yml b/modules/nf-core/scimap/mcmicro/meta.yml index eb86026d9bc..b4b808649c3 100644 --- a/modules/nf-core/scimap/mcmicro/meta.yml +++ b/modules/nf-core/scimap/mcmicro/meta.yml @@ -2,13 +2,14 @@ name: "scimap_mcmicro" description: SCIMAP is a suite of tools that enables spatial single-cell analyses keywords: - sort + - spatial + - single cell tools: - "scimap": description: "Scimap is a scalable toolkit for analyzing spatial molecular data." homepage: "https://scimap.xyz/" documentation: "https://scimap.xyz/All%20Functions/A.%20Pre%20Processing/sm.pp.mcmicro_to_scimap/" tool_dev_url: "https://github.com/labsyspharm/scimap" - doi: "" licence: "MIT License" input: diff --git a/modules/nf-core/sentieon/bwaindex/main.nf b/modules/nf-core/sentieon/bwaindex/main.nf index 0fcf4d5b596..6f4835892b4 100644 --- a/modules/nf-core/sentieon/bwaindex/main.nf +++ b/modules/nf-core/sentieon/bwaindex/main.nf @@ -8,7 +8,7 @@ process SENTIEON_BWAINDEX { exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." } - container 'nfcore/sentieon:202112.06' + container 'docker.io/nfcore/sentieon:202112.06' input: tuple val(meta), path(fasta) diff --git a/modules/nf-core/sentieon/bwamem/main.nf b/modules/nf-core/sentieon/bwamem/main.nf index 734738fa92d..916d089455b 100644 --- a/modules/nf-core/sentieon/bwamem/main.nf +++ b/modules/nf-core/sentieon/bwamem/main.nf @@ -10,7 +10,7 @@ process SENTIEON_BWAMEM { exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." } - container 'nfcore/sentieon:202112.06' + container 'docker.io/nfcore/sentieon:202112.06' input: tuple val(meta), path(reads) diff --git a/modules/nf-core/sentieon/bwamem/meta.yml b/modules/nf-core/sentieon/bwamem/meta.yml index ae3c7cd7883..3d1546c55dd 100644 --- a/modules/nf-core/sentieon/bwamem/meta.yml +++ b/modules/nf-core/sentieon/bwamem/meta.yml @@ -52,6 +52,7 @@ output: description: BAM file. pattern: "*.bam" - bai: + type: file description: BAI file pattern: "*.bai" - versions: diff --git a/modules/nf-core/sentieon/dedup/main.nf b/modules/nf-core/sentieon/dedup/main.nf index 6738b7bd071..57cc399b88b 100644 --- a/modules/nf-core/sentieon/dedup/main.nf +++ b/modules/nf-core/sentieon/dedup/main.nf @@ -10,7 +10,7 @@ process SENTIEON_DEDUP { exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." } - container 'nfcore/sentieon:202112.06' + container 'docker.io/nfcore/sentieon:202112.06' input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/sentieon/dedup/meta.yml b/modules/nf-core/sentieon/dedup/meta.yml index cb1ec3758f6..37ca9c67d56 100644 --- a/modules/nf-core/sentieon/dedup/meta.yml +++ b/modules/nf-core/sentieon/dedup/meta.yml @@ -25,6 +25,7 @@ input: description: BAM file. pattern: "*.bam" - bai: + type: file description: BAI file pattern: "*.bai" - fasta: @@ -54,6 +55,7 @@ output: description: BAM file. pattern: "*.bam" - bai: + type: file description: BAI file pattern: "*.bai" - score: diff --git a/modules/nf-core/sentieon/haplotyper/main.nf b/modules/nf-core/sentieon/haplotyper/main.nf index 256cee50d19..f6904ff6b0c 100644 --- a/modules/nf-core/sentieon/haplotyper/main.nf +++ b/modules/nf-core/sentieon/haplotyper/main.nf @@ -10,7 +10,7 @@ process SENTIEON_HAPLOTYPER { exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." } - container 'nfcore/sentieon:202112.06' + container 'docker.io/nfcore/sentieon:202112.06' input: val(emit_mode) diff --git a/modules/nf-core/sgdemux/meta.yml b/modules/nf-core/sgdemux/meta.yml index 6aea2685d21..977091c798f 100644 --- a/modules/nf-core/sgdemux/meta.yml +++ b/modules/nf-core/sgdemux/meta.yml @@ -3,6 +3,7 @@ description: Demultiplex bgzip'd fastq files keywords: - demultiplex - fastq + - bgzip tools: - "sgdemux": description: "Tool for demultiplexing sequencing data generated on Singular Genomics' sequencing instruments." diff --git a/modules/nf-core/shasum/main.nf b/modules/nf-core/shasum/main.nf index 800322163a3..b38da3646ad 100644 --- a/modules/nf-core/shasum/main.nf +++ b/modules/nf-core/shasum/main.nf @@ -5,7 +5,7 @@ process SHASUM { conda "conda-forge::coreutils=9.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'docker.io/ubuntu:20.04' }" input: tuple val(meta), path(file) diff --git a/modules/nf-core/shasum/meta.yml b/modules/nf-core/shasum/meta.yml index f16e0771668..d2ac8de9930 100644 --- a/modules/nf-core/shasum/meta.yml +++ b/modules/nf-core/shasum/meta.yml @@ -3,6 +3,7 @@ description: Print SHA256 (256-bit) checksums. keywords: - checksum - sha256 + - 256 bit tools: - "md5sum": description: Create an SHA256 (256-bit) checksum. diff --git a/modules/nf-core/snpeff/snpeff/meta.yml b/modules/nf-core/snpeff/snpeff/meta.yml index 28973c78b38..cf00c819ac7 100644 --- a/modules/nf-core/snpeff/snpeff/meta.yml +++ b/modules/nf-core/snpeff/snpeff/meta.yml @@ -2,6 +2,8 @@ name: SNPEFF_SNPEFF description: Genetic variant annotation and functional effect prediction toolbox keywords: - annotation + - variant + - effect prediction tools: - snpeff: description: | @@ -21,7 +23,7 @@ input: description: | vcf to annotate - db: - type: value + type: string description: | which db to annotate with - cache: diff --git a/modules/nf-core/universc/README.md b/modules/nf-core/universc/README.md index 8b6f61446c0..30b6b65e027 100644 --- a/modules/nf-core/universc/README.md +++ b/modules/nf-core/universc/README.md @@ -45,10 +45,10 @@ process { ... withName: CELLRANGER_MKGTF { - container = "nfcore/universc:1.2.5.1" + container = "docker.io/nfcore/universc:1.2.5.1" } withName: CELLRANGER_MKREF{ - container = "nfcore/universc:1.2.5.1" + container = "docker.io/nfcore/universc:1.2.5.1" } ... } @@ -66,7 +66,7 @@ and for singularity use the `--writeable` parameter. These are set as default in universc/main.nf: ``` - container "nfcore/universc:1.2.5.1" + container "docker.io/nfcore/universc:1.2.5.1" if (workflow.containerEngine == 'docker'){ containerOptions = "--privileged" } diff --git a/modules/nf-core/universc/main.nf b/modules/nf-core/universc/main.nf index a23cb05b2b7..2108624d651 100644 --- a/modules/nf-core/universc/main.nf +++ b/modules/nf-core/universc/main.nf @@ -6,7 +6,7 @@ process UNIVERSC { if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { exit 1, "UNIVERSC module does not support Conda. Please use Docker / Singularity / Podman instead." } - container "nfcore/universc:1.2.5.1" + container "docker.io/nfcore/universc:1.2.5.1" if (workflow.containerEngine == 'docker'){ containerOptions = "--privileged" } diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf index 3384847aa53..67f497ee8de 100644 --- a/modules/nf-core/untar/main.nf +++ b/modules/nf-core/untar/main.nf @@ -5,7 +5,7 @@ process UNTAR { conda "conda-forge::sed=4.7 bioconda::grep=3.4 conda-forge::tar=1.34" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'docker.io/ubuntu:20.04' }" input: tuple val(meta), path(archive) diff --git a/modules/nf-core/untar/meta.yml b/modules/nf-core/untar/meta.yml index ea7a3f382aa..db241a6e5e2 100644 --- a/modules/nf-core/untar/meta.yml +++ b/modules/nf-core/untar/meta.yml @@ -3,6 +3,7 @@ description: Extract files. keywords: - untar - uncompress + - extract tools: - untar: description: | diff --git a/modules/nf-core/untarfiles/main.nf b/modules/nf-core/untarfiles/main.nf index 8bca09d02aa..a93e81d4481 100644 --- a/modules/nf-core/untarfiles/main.nf +++ b/modules/nf-core/untarfiles/main.nf @@ -5,7 +5,7 @@ process UNTARFILES { conda "conda-forge::sed=4.7 bioconda::grep=3.4 conda-forge::tar=1.34" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'ubuntu:20.04' }" + 'docker.io/ubuntu:20.04' }" input: tuple val(meta), path(archive) diff --git a/modules/nf-core/untarfiles/meta.yml b/modules/nf-core/untarfiles/meta.yml index e89aa3d6b08..098490faf8b 100644 --- a/modules/nf-core/untarfiles/meta.yml +++ b/modules/nf-core/untarfiles/meta.yml @@ -3,6 +3,7 @@ description: Extract files. keywords: - untar - uncompress + - files tools: - untar: description: | @@ -26,7 +27,7 @@ output: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - files: - type: list + type: string description: A list containing references to individual archive files pattern: "*/**" - versions: diff --git a/tests/config/nextflow.config b/tests/config/nextflow.config index d8477d8f2dc..b6db38865d9 100644 --- a/tests/config/nextflow.config +++ b/tests/config/nextflow.config @@ -21,10 +21,12 @@ if ("$PROFILE" == "singularity") { conda.useMamba = true } else if ("$PROFILE" == "podman") { podman.enabled = true + podman.registry = 'quay.io' podman.userEmulation = true podman.runOptions = "--runtime crun --platform linux/x86_64 --systemd=always" } else { docker.enabled = true + docker.registry = 'quay.io' docker.userEmulation = true docker.runOptions = "--platform linux/x86_64" } diff --git a/tests/modules/nf-core/eido/validate/test.yml b/tests/modules/nf-core/eido/validate/test.yml index 5071faa502c..f185c7fd172 100644 --- a/tests/modules/nf-core/eido/validate/test.yml +++ b/tests/modules/nf-core/eido/validate/test.yml @@ -5,7 +5,6 @@ - eido files: - path: output/eido/validation.log - md5sum: 3a197c21ebf411aac7616bf9b4470de3 - name: eido validate test_eido_validate_on_pep_config command: nextflow run ./tests/modules/nf-core/eido/validate -entry test_eido_validate_on_pep_config -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/eido/validate/nextflow.config @@ -14,4 +13,3 @@ - eido files: - path: output/eido/validation.log - md5sum: 3a197c21ebf411aac7616bf9b4470de3 diff --git a/tests/modules/nf-core/ensemblvep/vep/nextflow.config b/tests/modules/nf-core/ensemblvep/vep/nextflow.config index f9f31e0f45f..32a1029ab26 100644 --- a/tests/modules/nf-core/ensemblvep/vep/nextflow.config +++ b/tests/modules/nf-core/ensemblvep/vep/nextflow.config @@ -3,36 +3,36 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: ENSEMBLVEP_VEP_DEFAULT { - container = 'nfcore/vep:108.2.WBcel235' + container = 'docker.io/nfcore/vep:108.2.WBcel235' } withName: ENSEMBLVEP_VEP_JSON { - container = 'nfcore/vep:108.2.WBcel235' + container = 'docker.io/nfcore/vep:108.2.WBcel235' ext.args = '--json' } withName: ENSEMBLVEP_VEP_TAB { - container = 'nfcore/vep:108.2.WBcel235' + container = 'docker.io/nfcore/vep:108.2.WBcel235' ext.args = '--tab' } withName: ENSEMBLVEP_VEP_VCF { - container = 'nfcore/vep:108.2.WBcel235' + container = 'docker.io/nfcore/vep:108.2.WBcel235' ext.args = '--vcf' } withName: ENSEMBLVEP_VEP_VCF_BGZIP { - container = 'nfcore/vep:108.2.WBcel235' + container = 'docker.io/nfcore/vep:108.2.WBcel235' ext.args = '--vcf --compress_output bgzip' } withName: ENSEMBLVEP_VEP_VCF_GZIP { - container = 'nfcore/vep:108.2.WBcel235' + container = 'docker.io/nfcore/vep:108.2.WBcel235' ext.args = '--vcf --compress_output gzip' } withName: ENSEMBLVEP_VEP_CUSTOM { - container = 'nfcore/vep:108.2.WBcel235' + container = 'docker.io/nfcore/vep:108.2.WBcel235' ext.args = '--custom test2.vcf,,vcf,exact,0,TOPMED --custom test3.vcf,,vcf,exact,0,TOPMED' } } diff --git a/tests/modules/nf-core/snpeff/snpeff/nextflow.config b/tests/modules/nf-core/snpeff/snpeff/nextflow.config index c94f7ee1c37..d761d06bef4 100644 --- a/tests/modules/nf-core/snpeff/snpeff/nextflow.config +++ b/tests/modules/nf-core/snpeff/snpeff/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: SNPEFF_SNPEFF { - container = 'nfcore/snpeff:5.1.WBcel235' + container = 'docker.io/nfcore/snpeff:5.1.WBcel235' } } diff --git a/tests/modules/nf-core/universc/nextflow.config b/tests/modules/nf-core/universc/nextflow.config index 98b8d475da4..feb21534a41 100644 --- a/tests/modules/nf-core/universc/nextflow.config +++ b/tests/modules/nf-core/universc/nextflow.config @@ -4,14 +4,14 @@ process { withName: UNIVERSC { ext.args = '' - container = "nfcore/universc:1.2.5.1" + container = "docker.io/nfcore/universc:1.2.5.1" } withName: CELLRANGER_MKGTF { - container = "nfcore/universc:1.2.5.1" + container = "docker.io/nfcore/universc:1.2.5.1" } withName: CELLRANGER_MKREF{ - container = "nfcore/universc:1.2.5.1" + container = "docker.io/nfcore/universc:1.2.5.1" } } diff --git a/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/nextflow.config b/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/nextflow.config index 3f757bdecdd..a4ec67e803e 100644 --- a/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/nextflow.config +++ b/tests/subworkflows/nf-core/vcf_annotate_ensemblvep/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: ENSEMBLVEP_VEP { - container = 'nfcore/vep:108.2.WBcel235' + container = 'docker.io/nfcore/vep:108.2.WBcel235' } withName: vcf_annotate_ensemblvep_custom:VCF_ANNOTATE_ENSEMBLVEP_CUSTOM:ENSEMBLVEP_VEP { diff --git a/tests/subworkflows/nf-core/vcf_annotate_snpeff/nextflow.config b/tests/subworkflows/nf-core/vcf_annotate_snpeff/nextflow.config index 6e273f03777..3edd9d068ed 100644 --- a/tests/subworkflows/nf-core/vcf_annotate_snpeff/nextflow.config +++ b/tests/subworkflows/nf-core/vcf_annotate_snpeff/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: SNPEFF_SNPEFF { - container = 'nfcore/snpeff:5.0.WBcel235' + container = 'docker.io/nfcore/snpeff:5.0.WBcel235' publishDir = [ path: { "output/snpeff/test/" }, pattern: "*{csv,html,genes.txt}" From 38b16706fa3a9d4ee2bf46fa5805e7397e275cdd Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Tue, 2 May 2023 15:52:06 +0200 Subject: [PATCH 120/120] Use long form docker.io address for Ubuntu (#3358) --- modules/nf-core/cat/fastq/main.nf | 2 +- modules/nf-core/custom/tabulartogseacls/main.nf | 2 +- modules/nf-core/custom/tabulartogseagct/main.nf | 2 +- modules/nf-core/gnu/sort/main.nf | 2 +- modules/nf-core/gunzip/main.nf | 2 +- modules/nf-core/igv/js/main.nf | 2 +- modules/nf-core/md5sum/main.nf | 2 +- modules/nf-core/shasum/main.nf | 2 +- modules/nf-core/untar/main.nf | 2 +- modules/nf-core/untarfiles/main.nf | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index 4bdec89001f..c5359bf93f5 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -5,7 +5,7 @@ process CAT_FASTQ { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'docker.io/ubuntu:20.04' }" + 'docker.io/library/ubuntu:20.04' }" input: tuple val(meta), path(reads, stageAs: "input*/*") diff --git a/modules/nf-core/custom/tabulartogseacls/main.nf b/modules/nf-core/custom/tabulartogseacls/main.nf index 0e1d4d9638a..c117d3c6412 100644 --- a/modules/nf-core/custom/tabulartogseacls/main.nf +++ b/modules/nf-core/custom/tabulartogseacls/main.nf @@ -5,7 +5,7 @@ process CUSTOM_TABULARTOGSEACLS { conda "conda-forge::coreutils=9.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'docker.io/ubuntu:20.04' }" + 'docker.io/library/ubuntu:20.04' }" input: tuple val(meta), path(samples) diff --git a/modules/nf-core/custom/tabulartogseagct/main.nf b/modules/nf-core/custom/tabulartogseagct/main.nf index 62ca8eaf84a..c06816620e2 100644 --- a/modules/nf-core/custom/tabulartogseagct/main.nf +++ b/modules/nf-core/custom/tabulartogseagct/main.nf @@ -5,7 +5,7 @@ process CUSTOM_TABULARTOGSEAGCT { conda "conda-forge::coreutils=9.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'docker.io/ubuntu:20.04' }" + 'docker.io/library/ubuntu:20.04' }" input: tuple val(meta), path(tabular) diff --git a/modules/nf-core/gnu/sort/main.nf b/modules/nf-core/gnu/sort/main.nf index 1c1b9ede824..2f24d33e775 100644 --- a/modules/nf-core/gnu/sort/main.nf +++ b/modules/nf-core/gnu/sort/main.nf @@ -5,7 +5,7 @@ process GNU_SORT { conda "conda-forge::coreutils=9.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'docker.io/ubuntu:20.04' }" + 'docker.io/library/ubuntu:20.04' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/gunzip/main.nf b/modules/nf-core/gunzip/main.nf index 194dfc32263..16e2b83dc73 100644 --- a/modules/nf-core/gunzip/main.nf +++ b/modules/nf-core/gunzip/main.nf @@ -5,7 +5,7 @@ process GUNZIP { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'docker.io/ubuntu:20.04' }" + 'docker.io/library/ubuntu:20.04' }" input: tuple val(meta), path(archive) diff --git a/modules/nf-core/igv/js/main.nf b/modules/nf-core/igv/js/main.nf index 198d6bc047c..f34a67d0da1 100644 --- a/modules/nf-core/igv/js/main.nf +++ b/modules/nf-core/igv/js/main.nf @@ -6,7 +6,7 @@ process IGV_JS { conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'docker.io/ubuntu:20.04' }" + 'docker.io/library/ubuntu:20.04' }" input: tuple val(meta), path(alignment), path(index) diff --git a/modules/nf-core/md5sum/main.nf b/modules/nf-core/md5sum/main.nf index e2ee9bdd0c3..a3843384df4 100644 --- a/modules/nf-core/md5sum/main.nf +++ b/modules/nf-core/md5sum/main.nf @@ -5,7 +5,7 @@ process MD5SUM { conda "conda-forge::coreutils=9.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'docker.io/ubuntu:20.04' }" + 'docker.io/library/ubuntu:20.04' }" input: tuple val(meta), path(file) diff --git a/modules/nf-core/shasum/main.nf b/modules/nf-core/shasum/main.nf index b38da3646ad..4f53c050e66 100644 --- a/modules/nf-core/shasum/main.nf +++ b/modules/nf-core/shasum/main.nf @@ -5,7 +5,7 @@ process SHASUM { conda "conda-forge::coreutils=9.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'docker.io/ubuntu:20.04' }" + 'docker.io/library/ubuntu:20.04' }" input: tuple val(meta), path(file) diff --git a/modules/nf-core/untar/main.nf b/modules/nf-core/untar/main.nf index 67f497ee8de..a4488c3595d 100644 --- a/modules/nf-core/untar/main.nf +++ b/modules/nf-core/untar/main.nf @@ -5,7 +5,7 @@ process UNTAR { conda "conda-forge::sed=4.7 bioconda::grep=3.4 conda-forge::tar=1.34" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'docker.io/ubuntu:20.04' }" + 'docker.io/library/ubuntu:20.04' }" input: tuple val(meta), path(archive) diff --git a/modules/nf-core/untarfiles/main.nf b/modules/nf-core/untarfiles/main.nf index a93e81d4481..55d483719a8 100644 --- a/modules/nf-core/untarfiles/main.nf +++ b/modules/nf-core/untarfiles/main.nf @@ -5,7 +5,7 @@ process UNTARFILES { conda "conda-forge::sed=4.7 bioconda::grep=3.4 conda-forge::tar=1.34" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'docker.io/ubuntu:20.04' }" + 'docker.io/library/ubuntu:20.04' }" input: tuple val(meta), path(archive)