mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-21 18:36:05 +00:00
Template update for nf-core/tools version 2.7.2
This commit is contained in:
parent
36f3b5723b
commit
ab591e01ff
12 changed files with 75 additions and 81 deletions
4
.github/workflows/fix-linting.yml
vendored
4
.github/workflows/fix-linting.yml
vendored
|
@ -34,9 +34,9 @@ jobs:
|
||||||
id: prettier_status
|
id: prettier_status
|
||||||
run: |
|
run: |
|
||||||
if prettier --check ${GITHUB_WORKSPACE}; then
|
if prettier --check ${GITHUB_WORKSPACE}; then
|
||||||
echo "name=result::pass" >> $GITHUB_OUTPUT
|
echo "result=pass" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "name=result::fail" >> $GITHUB_OUTPUT
|
echo "result=fail" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Run 'prettier --write'
|
- name: Run 'prettier --write'
|
||||||
|
|
2
.github/workflows/linting_comment.yml
vendored
2
.github/workflows/linting_comment.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
||||||
|
|
||||||
- name: Get PR number
|
- name: Get PR number
|
||||||
id: pr_number
|
id: pr_number
|
||||||
run: echo "name=pr_number::$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT
|
run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Post PR comment
|
- name: Post PR comment
|
||||||
uses: marocchino/sticky-pull-request-comment@v2
|
uses: marocchino/sticky-pull-request-comment@v2
|
||||||
|
|
|
@ -72,7 +72,7 @@ class WorkflowMain {
|
||||||
NfcoreTemplate.checkConfigProvided(workflow, log)
|
NfcoreTemplate.checkConfigProvided(workflow, log)
|
||||||
|
|
||||||
// Check that conda channels are set-up correctly
|
// Check that conda channels are set-up correctly
|
||||||
if (params.enable_conda) {
|
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
|
||||||
Utils.checkCondaChannels(log)
|
Utils.checkCondaChannels(log)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,17 +7,17 @@
|
||||||
"nf-core": {
|
"nf-core": {
|
||||||
"custom/dumpsoftwareversions": {
|
"custom/dumpsoftwareversions": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
|
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
|
||||||
"installed_by": ["modules"]
|
"installed_by": ["modules"]
|
||||||
},
|
},
|
||||||
"fastqc": {
|
"fastqc": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
|
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
|
||||||
"installed_by": ["modules"]
|
"installed_by": ["modules"]
|
||||||
},
|
},
|
||||||
"multiqc": {
|
"multiqc": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
|
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
|
||||||
"installed_by": ["modules"]
|
"installed_by": ["modules"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ process SAMPLESHEET_CHECK {
|
||||||
tag "$samplesheet"
|
tag "$samplesheet"
|
||||||
label 'process_single'
|
label 'process_single'
|
||||||
|
|
||||||
conda (params.enable_conda ? "conda-forge::python=3.8.3" : null)
|
conda "conda-forge::python=3.8.3"
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/python:3.8.3' :
|
'https://depot.galaxyproject.org/singularity/python:3.8.3' :
|
||||||
'quay.io/biocontainers/python:3.8.3' }"
|
'quay.io/biocontainers/python:3.8.3' }"
|
||||||
|
|
|
@ -2,7 +2,7 @@ process CUSTOM_DUMPSOFTWAREVERSIONS {
|
||||||
label 'process_single'
|
label 'process_single'
|
||||||
|
|
||||||
// Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container
|
// Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container
|
||||||
conda (params.enable_conda ? 'bioconda::multiqc=1.13' : null)
|
conda "bioconda::multiqc=1.13"
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' :
|
||||||
'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }"
|
'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }"
|
||||||
|
|
87
modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py
generated
Normal file → Executable file
87
modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py
generated
Normal file → Executable file
|
@ -1,5 +1,9 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
|
||||||
|
"""Provide functions to merge multiple versions.yml files."""
|
||||||
|
|
||||||
|
|
||||||
import platform
|
import platform
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
||||||
|
@ -7,6 +11,7 @@ import yaml
|
||||||
|
|
||||||
|
|
||||||
def _make_versions_html(versions):
|
def _make_versions_html(versions):
|
||||||
|
"""Generate a tabular HTML output of all versions for MultiQC."""
|
||||||
html = [
|
html = [
|
||||||
dedent(
|
dedent(
|
||||||
"""\\
|
"""\\
|
||||||
|
@ -45,47 +50,53 @@ def _make_versions_html(versions):
|
||||||
return "\\n".join(html)
|
return "\\n".join(html)
|
||||||
|
|
||||||
|
|
||||||
versions_this_module = {}
|
def main():
|
||||||
versions_this_module["${task.process}"] = {
|
"""Load all version files and generate merged output."""
|
||||||
"python": platform.python_version(),
|
versions_this_module = {}
|
||||||
"yaml": yaml.__version__,
|
versions_this_module["${task.process}"] = {
|
||||||
}
|
"python": platform.python_version(),
|
||||||
|
"yaml": yaml.__version__,
|
||||||
|
}
|
||||||
|
|
||||||
with open("$versions") as f:
|
with open("$versions") as f:
|
||||||
versions_by_process = yaml.load(f, Loader=yaml.BaseLoader) | versions_this_module
|
versions_by_process = yaml.load(f, Loader=yaml.BaseLoader) | versions_this_module
|
||||||
|
|
||||||
# aggregate versions by the module name (derived from fully-qualified process name)
|
# aggregate versions by the module name (derived from fully-qualified process name)
|
||||||
versions_by_module = {}
|
versions_by_module = {}
|
||||||
for process, process_versions in versions_by_process.items():
|
for process, process_versions in versions_by_process.items():
|
||||||
module = process.split(":")[-1]
|
module = process.split(":")[-1]
|
||||||
try:
|
try:
|
||||||
if versions_by_module[module] != process_versions:
|
if versions_by_module[module] != process_versions:
|
||||||
raise AssertionError(
|
raise AssertionError(
|
||||||
"We assume that software versions are the same between all modules. "
|
"We assume that software versions are the same between all modules. "
|
||||||
"If you see this error-message it means you discovered an edge-case "
|
"If you see this error-message it means you discovered an edge-case "
|
||||||
"and should open an issue in nf-core/tools. "
|
"and should open an issue in nf-core/tools. "
|
||||||
)
|
)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
versions_by_module[module] = process_versions
|
versions_by_module[module] = process_versions
|
||||||
|
|
||||||
versions_by_module["Workflow"] = {
|
versions_by_module["Workflow"] = {
|
||||||
"Nextflow": "$workflow.nextflow.version",
|
"Nextflow": "$workflow.nextflow.version",
|
||||||
"$workflow.manifest.name": "$workflow.manifest.version",
|
"$workflow.manifest.name": "$workflow.manifest.version",
|
||||||
}
|
}
|
||||||
|
|
||||||
versions_mqc = {
|
versions_mqc = {
|
||||||
"id": "software_versions",
|
"id": "software_versions",
|
||||||
"section_name": "${workflow.manifest.name} Software Versions",
|
"section_name": "${workflow.manifest.name} Software Versions",
|
||||||
"section_href": "https://github.com/${workflow.manifest.name}",
|
"section_href": "https://github.com/${workflow.manifest.name}",
|
||||||
"plot_type": "html",
|
"plot_type": "html",
|
||||||
"description": "are collected at run time from the software output.",
|
"description": "are collected at run time from the software output.",
|
||||||
"data": _make_versions_html(versions_by_module),
|
"data": _make_versions_html(versions_by_module),
|
||||||
}
|
}
|
||||||
|
|
||||||
with open("software_versions.yml", "w") as f:
|
with open("software_versions.yml", "w") as f:
|
||||||
yaml.dump(versions_by_module, f, default_flow_style=False)
|
yaml.dump(versions_by_module, f, default_flow_style=False)
|
||||||
with open("software_versions_mqc.yml", "w") as f:
|
with open("software_versions_mqc.yml", "w") as f:
|
||||||
yaml.dump(versions_mqc, f, default_flow_style=False)
|
yaml.dump(versions_mqc, f, default_flow_style=False)
|
||||||
|
|
||||||
with open("versions.yml", "w") as f:
|
with open("versions.yml", "w") as f:
|
||||||
yaml.dump(versions_this_module, f, default_flow_style=False)
|
yaml.dump(versions_this_module, f, default_flow_style=False)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
38
modules/nf-core/fastqc/main.nf
generated
38
modules/nf-core/fastqc/main.nf
generated
|
@ -2,7 +2,7 @@ process FASTQC {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::fastqc=0.11.9" : null)
|
conda "bioconda::fastqc=0.11.9"
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0' :
|
'https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0' :
|
||||||
'quay.io/biocontainers/fastqc:0.11.9--0' }"
|
'quay.io/biocontainers/fastqc:0.11.9--0' }"
|
||||||
|
@ -20,30 +20,22 @@ process FASTQC {
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
// Add soft-links to original FastQs for consistent naming in pipeline
|
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
if (meta.single_end) {
|
// Make list of old name and new name pairs to use for renaming in the bash while loop
|
||||||
"""
|
def old_new_pairs = reads instanceof Path || reads.size() == 1 ? [[ reads, "${prefix}.${reads.extension}" ]] : reads.withIndex().collect { entry, index -> [ entry, "${prefix}_${index + 1}.${entry.extension}" ] }
|
||||||
[ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz
|
def rename_to = old_new_pairs*.join(' ').join(' ')
|
||||||
fastqc $args --threads $task.cpus ${prefix}.fastq.gz
|
def renamed_files = old_new_pairs.collect{ old_name, new_name -> new_name }.join(' ')
|
||||||
|
"""
|
||||||
|
printf "%s %s\\n" $rename_to | while read old_name new_name; do
|
||||||
|
[ -f "\${new_name}" ] || ln -s \$old_name \$new_name
|
||||||
|
done
|
||||||
|
fastqc $args --threads $task.cpus $renamed_files
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" )
|
fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" )
|
||||||
END_VERSIONS
|
END_VERSIONS
|
||||||
"""
|
"""
|
||||||
} else {
|
|
||||||
"""
|
|
||||||
[ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz
|
|
||||||
[ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz
|
|
||||||
fastqc $args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz
|
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
|
||||||
"${task.process}":
|
|
||||||
fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" )
|
|
||||||
END_VERSIONS
|
|
||||||
"""
|
|
||||||
}
|
|
||||||
|
|
||||||
stub:
|
stub:
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
|
|
2
modules/nf-core/multiqc/main.nf
generated
2
modules/nf-core/multiqc/main.nf
generated
|
@ -1,7 +1,7 @@
|
||||||
process MULTIQC {
|
process MULTIQC {
|
||||||
label 'process_single'
|
label 'process_single'
|
||||||
|
|
||||||
conda (params.enable_conda ? 'bioconda::multiqc=1.13' : null)
|
conda "bioconda::multiqc=1.13"
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' :
|
'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' :
|
||||||
'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }"
|
'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }"
|
||||||
|
|
|
@ -39,7 +39,6 @@ params {
|
||||||
validate_params = true
|
validate_params = true
|
||||||
show_hidden_params = false
|
show_hidden_params = false
|
||||||
schema_ignore_params = 'genomes'
|
schema_ignore_params = 'genomes'
|
||||||
enable_conda = false
|
|
||||||
|
|
||||||
|
|
||||||
// Config options
|
// Config options
|
||||||
|
@ -81,7 +80,6 @@ try {
|
||||||
profiles {
|
profiles {
|
||||||
debug { process.beforeScript = 'echo $HOSTNAME' }
|
debug { process.beforeScript = 'echo $HOSTNAME' }
|
||||||
conda {
|
conda {
|
||||||
params.enable_conda = true
|
|
||||||
conda.enabled = true
|
conda.enabled = true
|
||||||
docker.enabled = false
|
docker.enabled = false
|
||||||
singularity.enabled = false
|
singularity.enabled = false
|
||||||
|
@ -90,7 +88,6 @@ profiles {
|
||||||
charliecloud.enabled = false
|
charliecloud.enabled = false
|
||||||
}
|
}
|
||||||
mamba {
|
mamba {
|
||||||
params.enable_conda = true
|
|
||||||
conda.enabled = true
|
conda.enabled = true
|
||||||
conda.useMamba = true
|
conda.useMamba = true
|
||||||
docker.enabled = false
|
docker.enabled = false
|
||||||
|
|
|
@ -263,12 +263,6 @@
|
||||||
"description": "Show all params when using `--help`",
|
"description": "Show all params when using `--help`",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters."
|
"help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters."
|
||||||
},
|
|
||||||
"enable_conda": {
|
|
||||||
"type": "boolean",
|
|
||||||
"description": "Run this workflow with Conda. You can also use '-profile conda' instead of providing this parameter.",
|
|
||||||
"hidden": true,
|
|
||||||
"fa_icon": "fas fa-bacon"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ workflow TAXPROFILER {
|
||||||
ch_versions = ch_versions.mix(FASTQC.out.versions.first())
|
ch_versions = ch_versions.mix(FASTQC.out.versions.first())
|
||||||
|
|
||||||
CUSTOM_DUMPSOFTWAREVERSIONS (
|
CUSTOM_DUMPSOFTWAREVERSIONS (
|
||||||
ch_versions.unique{ it.text }.collectFile(name: 'collated_versions.yml')
|
ch_versions.unique().collectFile(name: 'collated_versions.yml')
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue