Skip to content

Commit

Permalink
Merge branch 'dev' into fix-cache-path
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol authored Nov 21, 2024
2 parents 656aa6e + 41b4516 commit 538bf2c
Show file tree
Hide file tree
Showing 21 changed files with 426 additions and 357 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/create-test-lint-wf-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ jobs:
run: nf-core --log-file log.txt --hide-progress pipelines lint --dir my-prefix-testpipeline --fail-warned
working-directory: create-test-lint-wf

# Run code style linting
- name: run pre-commit
shell: bash
run: pre-commit run --all-files
working-directory: create-test-lint-wf

# Run bump-version
- name: nf-core pipelines bump-version
run: nf-core --log-file log.txt pipelines bump-version --dir my-prefix-testpipeline/ 1.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
coverage report
coverage xml
- uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4
- uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # v5
with:
files: coverage.xml
env:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ ENV/
# Jetbrains IDEs
.idea
pip-wheel-metadata
.vscode
.*.sw?

# Textual
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.1
rev: v0.7.4
hooks:
- id: ruff # linter
args: [--fix, --exit-non-zero-on-fix] # sort imports and fix
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

### Linting

- General: Run pre-commit when testing linting the template pipeline ([#3280](https://github.com/nf-core/tools/pull/3280))

### Modules

- add a panel around diff previews when updating ([#3246](https://github.com/nf-core/tools/pull/3246))
Expand All @@ -36,6 +38,13 @@
- add `--dir/-d` option to schema commands ([#3247](https://github.com/nf-core/tools/pull/3247))
- Update pre-commit hook astral-sh/ruff-pre-commit to v0.7.1 ([#3250](https://github.com/nf-core/tools/pull/3250))
- Fix usage of cache path and implement parallized testing ([#3291](https://github.com/nf-core/tools/pull/3291))
- handle new schema structure in `nf-core pipelines create-params-file` ([#3276](https://github.com/nf-core/tools/pull/3276))
- Update Gitpod image to use Miniforge instead of Miniconda([#3274](https://github.com/nf-core/tools/pull/3274))
- Update pre-commit hook astral-sh/ruff-pre-commit to v0.7.3 ([#3275](https://github.com/nf-core/tools/pull/3275))
- Add hint to solve git errors with a synced repo ([#3279](https://github.com/nf-core/tools/pull/3279))
- Update pre-commit hook astral-sh/ruff-pre-commit to v0.7.4 ([#3282](https://github.com/nf-core/tools/pull/3282))
- Update codecov/codecov-action action to v5 ([#3283](https://github.com/nf-core/tools/pull/3283))
- Update python:3.12-slim Docker digest to 2a6386a ([#3284](https://github.com/nf-core/tools/pull/3284))

## [v3.0.2 - Titanium Tapir Patch](https://github.com/nf-core/tools/releases/tag/3.0.2) - [2024-10-11]

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-slim@sha256:032c52613401895aa3d418a4c563d2d05f993bc3ecc065c8f4e2280978acd249
FROM python:3.12-slim@sha256:2a6386ad2db20e7f55073f69a98d6da2cf9f168e05e7487d2670baeb9b7601c5
LABEL authors="phil.ewels@seqera.io,erik.danielsson@scilifelab.se" \
description="Docker image containing requirements for nf-core/tools"

Expand Down
6 changes: 3 additions & 3 deletions nf_core/gitpod/gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ RUN apt-get update --quiet && \
add-apt-repository -y ppa:apptainer/ppa && \
apt-get update --quiet && \
apt-get install --quiet --yes apptainer && \
wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && \
rm Miniconda3-latest-Linux-x86_64.sh && \
wget --quiet https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh && \
bash Miniforge3-Linux-x86_64.sh -b -p /opt/conda && \
rm Miniforge3-Linux-x86_64.sh && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
3 changes: 3 additions & 0 deletions nf_core/pipeline-template/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"markdown.styles": ["public/vscode_markdown.css"]
}
4 changes: 3 additions & 1 deletion nf_core/pipeline-template/conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]

{% if fastqc -%}
{%- if fastqc %}

withName: FASTQC {
ext.args = '--quiet'
}
{%- endif %}

{%- if multiqc %}

withName: 'MULTIQC' {
ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' }
publishDir = [
Expand Down
6 changes: 4 additions & 2 deletions nf_core/pipeline-template/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ workflow {
{%- endif %}
params.outdir,
params.monochrome_logs,
{% if adaptivecard or slackreport %}params.hook_url,{% endif %}
{% if multiqc %}{{ prefix_nodash|upper }}_{{ short_name|upper }}.out.multiqc_report{% endif %}
{%- if adaptivecard or slackreport %}
params.hook_url,{% endif %}
{%- if multiqc %}
{{ prefix_nodash|upper }}_{{ short_name|upper }}.out.multiqc_report{% endif %}
)
{%- endif %}
}
Expand Down
33 changes: 21 additions & 12 deletions nf_core/pipeline-template/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,47 @@ params {
// Input options
input = null

{% if igenomes -%}
{%- if igenomes %}

// References
genome = null
igenomes_base = 's3://ngi-igenomes/igenomes/'
igenomes_ignore = false
{%- endif %}

{% if multiqc -%}
{%- if multiqc %}

// MultiQC options
multiqc_config = null
multiqc_title = null
multiqc_logo = null
max_multiqc_email_size = '25.MB'
{% if citations %}multiqc_methods_description = null{% endif %}
{%- if citations %}
multiqc_methods_description = null{% endif %}
{%- endif %}

// Boilerplate options
outdir = null
{% if modules %}publish_dir_mode = 'copy'{% endif %}
{%- if modules %}
publish_dir_mode = 'copy'{% endif %}
{%- if email %}
email = null
email_on_fail = null
plaintext_email = false
{%- endif %}
{% if modules %}monochrome_logs = false{% endif %}
{% if slackreport or adaptivecard %}hook_url = null{% endif %}
{% if nf_schema %}help = false
{%- if modules %}
monochrome_logs = false{% endif %}
{%- if slackreport or adaptivecard %}
hook_url = null{% endif %}
{%- if nf_schema %}
help = false
help_full = false
show_hidden = false{% endif %}
version = false
{% if test_config %}pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/'{% endif %}
{%- if test_config %}
pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/'{% endif %}

{% if nf_core_configs -%}
{%- if nf_core_configs -%}
// Config options
config_profile_name = null
config_profile_description = null
Expand All @@ -56,7 +64,8 @@ params {
config_profile_url = null
{%- endif %}

{% if nf_schema -%}
{%- if nf_schema %}

// Schema validation default options
validate_params = true
{%- endif %}
Expand Down Expand Up @@ -173,7 +182,7 @@ profiles {
wave.freeze = true
wave.strategy = 'conda,container'
}
{% if gitpod -%}
{%- if gitpod %}
gitpod {
executor.name = 'local'
executor.cpus = 4
Expand All @@ -187,7 +196,7 @@ profiles {
}
}
{%- endif %}
{% if test_config -%}
{%- if test_config %}
test { includeConfig 'conf/test.config' }
test_full { includeConfig 'conf/test_full.config' }
{%- endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ workflow PIPELINE_COMPLETION {
{%- endif %}
outdir // path: Path to output directory where results will be published
monochrome_logs // boolean: Disable ANSI colour codes in log output
{% if adaptivecard or slackreport %}hook_url // string: hook URL for notifications{% endif %}
{% if multiqc %}multiqc_report // string: Path to MultiQC report{% endif %}
{%- if adaptivecard or slackreport %}
hook_url // string: hook URL for notifications{% endif %}
{%- if multiqc %}
multiqc_report // string: Path to MultiQC report{% endif %}

main:
{%- if nf_schema %}
Expand Down Expand Up @@ -237,8 +239,10 @@ def toolCitationText() {
// Uncomment function in methodsDescriptionText to render in MultiQC report
def citation_text = [
"Tools used in the workflow included:",
{% if fastqc %}"FastQC (Andrews 2010),",{% endif %}
{% if multiqc %}"MultiQC (Ewels et al. 2016)",{% endif %}
{%- if fastqc %}
"FastQC (Andrews 2010),",{% endif %}
{%- if multiqc %}
"MultiQC (Ewels et al. 2016)",{% endif %}
"."
].join(' ').trim()

Expand All @@ -250,8 +254,10 @@ def toolBibliographyText() {
// Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "<li>Author (2023) Pub name, Journal, DOI</li>" : "",
// Uncomment function in methodsDescriptionText to render in MultiQC report
def reference_text = [
{% if fastqc %}"<li>Andrews S, (2010) FastQC, URL: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/).</li>",{% endif %}
{% if multiqc %}"<li>Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354</li>"{% endif %}
{%- if fastqc %}
"<li>Andrews S, (2010) FastQC, URL: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/).</li>",{% endif %}
{%- if multiqc %}
"<li>Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354</li>"{% endif %}
].join(' ').trim()

return reference_text
Expand Down
18 changes: 12 additions & 6 deletions nf_core/pipeline-template/workflows/pipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
*/

{%- if modules %}
{% if fastqc %}include { FASTQC } from '../modules/nf-core/fastqc/main'{% endif %}
{% if multiqc %}include { MULTIQC } from '../modules/nf-core/multiqc/main'{% endif %}
{% if nf_schema %}include { paramsSummaryMap } from 'plugin/nf-schema'{% endif %}
{% if multiqc %}include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline'{% endif %}
{%- if fastqc %}
include { FASTQC } from '../modules/nf-core/fastqc/main'{% endif %}
{%- if multiqc %}
include { MULTIQC } from '../modules/nf-core/multiqc/main'{% endif %}
{%- if nf_schema %}
include { paramsSummaryMap } from 'plugin/nf-schema'{% endif %}
{%- if multiqc %}
include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline'{% endif %}
include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline'
{% if citations or multiqc %}include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_{{ short_name }}_pipeline'{% endif %}
{%- if citations or multiqc %}
include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_{{ short_name }}_pipeline'{% endif %}
{%- endif %}

/*
Expand All @@ -28,7 +33,8 @@ workflow {{ short_name|upper }} {
main:

ch_versions = Channel.empty()
{% if multiqc %}ch_multiqc_files = Channel.empty(){% endif %}
{%- if multiqc %}
ch_multiqc_files = Channel.empty(){% endif %}

{%- if fastqc %}
//
Expand Down
11 changes: 11 additions & 0 deletions nf_core/pipelines/create/template_features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,3 +432,14 @@ seqera_platform:
You can extend this file adding any other desired configuration.
nfcore_pipelines: False
custom_pipelines: True
vscode:
skippable_paths:
- ".vscode"
short_description: "Render website admonitions in VSCode"
description: "Add a VSCode configuration to render website admonitions"
help_text: |
This will add a VSCode configuration file to render the admonitions in markdown files with the same style as the nf-core website.
Adds the `.vscode` directory to the pipelinerepository.
nfcore_pipelines: False
custom_pipelines: True
Loading

0 comments on commit 538bf2c

Please sign in to comment.