diff --git a/modules.json b/modules.json index 56ce0b4a..dd1ca986 100644 --- a/modules.json +++ b/modules.json @@ -3,14 +3,11 @@ "homePage": "https://github.com/nf-core/blobtoolkit", "repos": { "nf-core/modules": { - "busco": { - "git_sha": "9fa6b6c1fc930830c1d819a9273b4ec12ffacb0a" - }, "custom/dumpsoftwareversions": { "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" }, - "mosdepth": { - "git_sha": "72a31b76eb1b58879e0d91fb1d992e0118693098" + "multiqc": { + "git_sha": "5138acca0985ca01c38a1c4fba917d83772b1106" } } } diff --git a/modules/nf-core/modules/busco/main.nf b/modules/nf-core/modules/busco/main.nf deleted file mode 100644 index f0713862..00000000 --- a/modules/nf-core/modules/busco/main.nf +++ /dev/null @@ -1,84 +0,0 @@ -process BUSCO { - tag "$meta.id" - label 'process_medium' - - conda (params.enable_conda ? "bioconda::busco=5.3.2" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/busco:5.3.2--pyhdfd78af_0': - 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" - - input: - tuple val(meta), path('tmp_input/*') - each lineage // Required: lineage to check against, "auto" enables --auto-lineage instead - path busco_lineages_path // Recommended: path to busco lineages - downloads if not set - path config_file // Optional: busco configuration file - - output: - tuple val(meta), path("*-busco.batch_summary.txt"), emit: batch_summary - tuple val(meta), path("short_summary.*.txt") , emit: short_summaries_txt, optional: true - tuple val(meta), path("short_summary.*.json") , emit: short_summaries_json, optional: true - tuple val(meta), path("*-busco") , emit: busco_dir - 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}-${lineage}" - def busco_config = config_file ? "--config $config_file" : '' - def busco_lineage = lineage.equals('auto') ? '--auto-lineage' : "--lineage_dataset ${lineage}" - def busco_lineage_dir = busco_lineages_path ? "--offline --download_path ${busco_lineages_path}" : '' - """ - # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) - # Check for container variable initialisation script and source it. - if [ -f "/usr/local/env-activate.sh" ]; then - set +u # Otherwise, errors out because of various unbound variables - . "/usr/local/env-activate.sh" - set -u - fi - - # If the augustus config directory is not writable, then copy to writeable area - if [ ! -w "\${AUGUSTUS_CONFIG_PATH}" ]; then - # Create writable tmp directory for augustus - AUG_CONF_DIR=\$( mktemp -d -p \$PWD ) - cp -r \$AUGUSTUS_CONFIG_PATH/* \$AUG_CONF_DIR - export AUGUSTUS_CONFIG_PATH=\$AUG_CONF_DIR - echo "New AUGUSTUS_CONFIG_PATH=\${AUGUSTUS_CONFIG_PATH}" - fi - - # Ensure the input is uncompressed - INPUT_SEQS=input_seqs - mkdir "\$INPUT_SEQS" - cd "\$INPUT_SEQS" - for FASTA in ../tmp_input/*; do - if [ "\${FASTA##*.}" == 'gz' ]; then - gzip -cdf "\$FASTA" > \$( basename "\$FASTA" .gz ) - else - ln -s "\$FASTA" . - fi - done - cd .. - - busco \\ - --cpu $task.cpus \\ - --in "\$INPUT_SEQS" \\ - --out ${prefix}-busco \\ - $busco_lineage \\ - $busco_lineage_dir \\ - $busco_config \\ - $args - - # clean up - rm -rf "\$INPUT_SEQS" - - # Move files to avoid staging/publishing issues - mv ${prefix}-busco/batch_summary.txt ${prefix}-busco.batch_summary.txt - mv ${prefix}-busco/*/short_summary.*.{json,txt} . || echo "Short summaries were not available: No genes were found." - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/modules/busco/meta.yml b/modules/nf-core/modules/busco/meta.yml deleted file mode 100644 index ef8c5245..00000000 --- a/modules/nf-core/modules/busco/meta.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: busco -description: Benchmarking Universal Single Copy Orthologs -keywords: - - quality control - - genome - - transcriptome - - proteome -tools: - - busco: - description: BUSCO provides measures for quantitative assessment of genome assembly, gene set, and transcriptome completeness based on evolutionarily informed expectations of gene content from near-universal single-copy orthologs selected from OrthoDB. - homepage: https://busco.ezlab.org/ - documentation: https://busco.ezlab.org/busco_userguide.html - tool_dev_url: https://gitlab.com/ezlab/busco - doi: "10.1007/978-1-4939-9173-0_14" - licence: ["MIT"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Nucleic or amino acid sequence file in FASTA format. - pattern: "*.{fasta,fna,fa,fasta.gz,fna.gz,fa.gz}" - - lineage: - type: value - description: The BUSCO lineage to use, or "auto" to automatically select lineage - - busco_lineages_path: - type: directory - description: Path to local BUSCO lineages directory. - - config_file: - type: file - description: Path to BUSCO config file. - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - batch_summary: - type: file - description: Summary of all sequence files analyzed - pattern: "*-busco.batch_summary.txt" - - short_summaries_txt: - type: file - description: Short Busco summary in plain text format - pattern: "short_summary.*.txt" - - short_summaries_json: - type: file - description: Short Busco summary in JSON format - pattern: "short_summary.*.json" - - busco_dir: - type: directory - description: BUSCO lineage specific output - pattern: "*-busco" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - -authors: - - "@priyanka-surana" - - "@charles-plessy" - - "@mahesh-panchal" - - "@muffato" - - "@jvhagey" diff --git a/modules/nf-core/modules/mosdepth/main.nf b/modules/nf-core/modules/mosdepth/main.nf deleted file mode 100644 index d7e3c929..00000000 --- a/modules/nf-core/modules/mosdepth/main.nf +++ /dev/null @@ -1,81 +0,0 @@ -process MOSDEPTH { - tag "$meta.id" - label 'process_medium' - - conda (params.enable_conda ? 'bioconda::mosdepth=0.3.3' : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mosdepth:0.3.3--hdfd78af_1' : - 'quay.io/biocontainers/mosdepth:0.3.3--hdfd78af_1'}" - - input: - tuple val(meta), path(bam), path(bai) - path bed - path fasta - - output: - tuple val(meta), path('*.global.dist.txt') , emit: global_txt - tuple val(meta), path('*.summary.txt') , emit: summary_txt - tuple val(meta), path('*.region.dist.txt') , optional:true, emit: regions_txt - tuple val(meta), path('*.per-base.d4') , optional:true, emit: per_base_d4 - tuple val(meta), path('*.per-base.bed.gz') , optional:true, emit: per_base_bed - tuple val(meta), path('*.per-base.bed.gz.csi') , optional:true, emit: per_base_csi - tuple val(meta), path('*.regions.bed.gz') , optional:true, emit: regions_bed - tuple val(meta), path('*.regions.bed.gz.csi') , optional:true, emit: regions_csi - tuple val(meta), path('*.quantized.bed.gz') , optional:true, emit: quantized_bed - tuple val(meta), path('*.quantized.bed.gz.csi') , optional:true, emit: quantized_csi - tuple val(meta), path('*.thresholds.bed.gz') , optional:true, emit: thresholds_bed - tuple val(meta), path('*.thresholds.bed.gz.csi'), optional:true, emit: thresholds_csi - 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 = fasta ? "--fasta ${fasta}" : "" - def interval = bed ? "--by ${bed}" : "" - if (bed && args.contains("--by")) { - exit 1, "'--by' can only be specified once when running mosdepth! Either remove input BED file definition or remove '--by' from 'ext.args' definition" - } - if (!bed && args.contains("--thresholds")) { - exit 1, "'--thresholds' can only be specified in conjunction with '--by'" - } - - """ - mosdepth \\ - --threads $task.cpus \\ - $interval \\ - $reference \\ - $args \\ - $prefix \\ - $bam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - mosdepth: \$(mosdepth --version 2>&1 | sed 's/^.*mosdepth //; s/ .*\$//') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.global.dist.txt - touch ${prefix}.region.dist.txt - touch ${prefix}.summary.txt - touch ${prefix}.per-base.d4 - touch ${prefix}.per-base.bed.gz - touch ${prefix}.per-base.bed.gz.csi - touch ${prefix}.regions.bed.gz - touch ${prefix}.regions.bed.gz.csi - touch ${prefix}.quantized.bed.gz - touch ${prefix}.quantized.bed.gz.csi - touch ${prefix}.thresholds.bed.gz - touch ${prefix}.thresholds.bed.gz.csi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - mosdepth: \$(mosdepth --version 2>&1 | sed 's/^.*mosdepth //; s/ .*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/modules/mosdepth/meta.yml b/modules/nf-core/modules/mosdepth/meta.yml deleted file mode 100644 index d1e33447..00000000 --- a/modules/nf-core/modules/mosdepth/meta.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: mosdepth -description: Calculates genome-wide sequencing coverage. -keywords: - - mosdepth - - bam - - cram - - coverage -tools: - - mosdepth: - description: | - Fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing. - documentation: https://github.com/brentp/mosdepth - doi: 10.1093/bioinformatics/btx699 - licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Input BAM/CRAM file - pattern: "*.{bam,cram}" - - bai: - type: file - description: Index for BAM/CRAM file - pattern: "*.{bai,crai}" - - bed: - type: file - description: BED file with intersected intervals - pattern: "*.{bed}" - - fasta: - type: file - description: Reference genome FASTA file - pattern: "*.{fa,fasta}" -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - global_txt: - type: file - description: Text file with global cumulative coverage distribution - pattern: "*.{global.dist.txt}" - - regions_txt: - type: file - description: Text file with region cumulative coverage distribution - pattern: "*.{region.dist.txt}" - - summary_txt: - type: file - description: Text file with summary mean depths per chromosome and regions - pattern: "*.{summary.txt}" - - per_base_bed: - type: file - description: BED file with per-base coverage - pattern: "*.{per-base.bed.gz}" - - per_base_csi: - type: file - description: Index file for BED file with per-base coverage - pattern: "*.{per-base.bed.gz.csi}" - - per_base_d4: - type: file - description: D4 file with per-base coverage - pattern: "*.{per-base.d4}" - - regions_bed: - type: file - description: BED file with per-region coverage - pattern: "*.{regions.bed.gz}" - - regions_csi: - type: file - description: Index file for BED file with per-region coverage - pattern: "*.{regions.bed.gz.csi}" - - quantized_bed: - type: file - description: BED file with binned coverage - pattern: "*.{quantized.bed.gz}" - - quantized_csi: - type: file - description: Index file for BED file with binned coverage - pattern: "*.{quantized.bed.gz.csi}" - - thresholds_bed: - type: file - description: BED file with the number of bases in each region that are covered at or above each threshold - pattern: "*.{thresholds.bed.gz}" - - thresholds_csi: - type: file - description: Index file for BED file with threshold coverage - pattern: "*.{thresholds.bed.gz.csi}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@joseespinosa" - - "@drpatelh" - - "@ramprasadn" - - "@matthdsm" diff --git a/modules/nf-core/modules/multiqc/main.nf b/modules/nf-core/modules/multiqc/main.nf new file mode 100644 index 00000000..1e7d6afe --- /dev/null +++ b/modules/nf-core/modules/multiqc/main.nf @@ -0,0 +1,49 @@ +process MULTIQC { + label 'process_medium' + + conda (params.enable_conda ? 'bioconda::multiqc=1.13a' : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/multiqc:1.13a--pyhdfd78af_1' : + 'quay.io/biocontainers/multiqc:1.13a--pyhdfd78af_1' }" + + input: + path multiqc_files, stageAs: "?/*" + tuple path(multiqc_config), path(multiqc_logo) + + output: + path "*multiqc_report.html", emit: report + path "*_data" , emit: data + path "*_plots" , optional:true, emit: plots + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def config = multiqc_config ? "--config $multiqc_config" : '' + """ + multiqc \\ + --force \\ + $config \\ + $args \\ + . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) + END_VERSIONS + """ + + stub: + """ + touch multiqc_data + touch multiqc_plots + touch multiqc_report.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/modules/multiqc/meta.yml b/modules/nf-core/modules/multiqc/meta.yml new file mode 100644 index 00000000..bf3a27fe --- /dev/null +++ b/modules/nf-core/modules/multiqc/meta.yml @@ -0,0 +1,48 @@ +name: MultiQC +description: Aggregate results from bioinformatics analyses across many samples into a single report +keywords: + - QC + - bioinformatics tools + - Beautiful stand-alone HTML report +tools: + - multiqc: + description: | + MultiQC searches a given directory for analysis logs and compiles a HTML report. + It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. + homepage: https://multiqc.info/ + documentation: https://multiqc.info/docs/ + licence: ["GPL-3.0-or-later"] +input: + - multiqc_files: + type: file + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC + - multiqc_config: + type: file + description: Config yml for MultiQC + pattern: "*.{yml,yaml}" + - multiqc_logo: + type: file + description: Logo file for MultiQC + pattern: "*.{png}" +output: + - report: + type: file + description: MultiQC report file + pattern: "multiqc_report.html" + - data: + type: dir + description: MultiQC data dir + pattern: "multiqc_data" + - plots: + type: file + description: Plots created by MultiQC + pattern: "*_data" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@abhi18av" + - "@bunop" + - "@drpatelh"