Skip to content

Commit

Permalink
Merge pull request #630 from nf-core/nf-core-template-merge-3.0.2
Browse files Browse the repository at this point in the history
Important! Template update for nf-core/tools v3.0.2
  • Loading branch information
ramprasadn authored Oct 14, 2024
2 parents 3374172 + d3c51a6 commit dbb3e8f
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 53 deletions.
43 changes: 27 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ on:

env:
NXF_ANSI_LOG: false
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity

concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true

jobs:
test:
name: Run pipeline with test data
name: "Run pipeline with test data (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})"
# Only run on push if this is the nf-core dev branch (merged PRs)
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/raredisease') }}"
runs-on: ubuntu-latest
Expand All @@ -27,31 +29,40 @@ jobs:
NXF_VER:
- "24.04.2"
- "latest-everything"
parameters:
- "-profile test"
- "-profile test_one_sample"
profile:
- "docker"
- "singularity"
test_name:
- "test"
- "test_one_sample"
isMaster:
- ${{ github.base_ref == 'master' }}
# Exclude conda and singularity on dev
exclude:
- isMaster: false
profile: "singularity"
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Install Nextflow
- name: Set up Nextflow
uses: nf-core/setup-nextflow@v2
with:
version: "${{ matrix.NXF_VER }}"

- name: Disk space cleanup
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
- name: Set up Apptainer
if: matrix.profile == 'singularity'
uses: eWaterCycle/setup-apptainer@main

- name: Run pipeline with test data (docker)
- name: Set up Singularity
if: matrix.profile == 'singularity'
run: |
nextflow run ${GITHUB_WORKSPACE} ${{ matrix.parameters }},docker -stub --outdir ./results
mkdir -p $NXF_SINGULARITY_CACHEDIR
mkdir -p $NXF_SINGULARITY_LIBRARYDIR
- name: Run pipeline with test data (singularity)
run: |
nextflow run ${GITHUB_WORKSPACE} ${{ matrix.parameters }},singularity -stub --outdir ./results
if: "${{ github.base_ref == 'master' }}"
- name: Clean up Disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1

- name: Run pipeline with test data (conda)
- name: "Run pipeline with test data ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}"
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,conda --outdir ./results
if: "${{ github.base_ref == 'master' }}"
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} -stub --outdir ./results
21 changes: 12 additions & 9 deletions .github/workflows/template_version_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ jobs:
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Read template version from .nf-core.yml
uses: pietrobolcato/action-read-yaml@1.0.0
uses: nichmor/minimal-read-yaml@v0.0.2
id: read_yml
with:
config: ${{ github.workspace }}/.nf-core.yml
Expand All @@ -24,20 +26,21 @@ jobs:
- name: Check nf-core outdated
id: nf_core_outdated
run: pip list --outdated | grep nf-core
run: echo "OUTPUT=$(pip list --outdated | grep nf-core)" >> ${GITHUB_ENV}

- name: Post nf-core template version comment
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
if: |
${{ steps.nf_core_outdated.outputs.stdout }} =~ 'nf-core'
contains(env.OUTPUT, 'nf-core')
with:
repo-token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }}
allow-repeats: false
message: |
## :warning: Newer version of the nf-core template is available.
Your pipeline is using an old version of the nf-core template: ${{ steps.read_yml.outputs['nf_core_version'] }}.
Please update your pipeline to the latest version.
For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync).
> [!WARNING]
> Newer version of the nf-core template is available.
>
> Your pipeline is using an old version of the nf-core template: ${{ steps.read_yml.outputs['nf_core_version'] }}.
> Please update your pipeline to the latest version.
>
> For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync).
#
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ results/
testing/
testing*
*.pyc
null/
.prettierignore
2 changes: 1 addition & 1 deletion .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ lint:
- docs/images/nf-core-raredisease_logo_light.png
- assets/nf-core-raredisease_logo_light.png
modules_config: false
nf_core_version: 3.0.1
nf_core_version: 3.0.2
org_path: null
repository_type: pipeline
template:
Expand Down
6 changes: 3 additions & 3 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
},
"multiqc": {
"branch": "master",
"git_sha": "b8d36829fa84b6e404364abff787e8b07f6d058c",
"git_sha": "cf17ca47590cc578dfb47db1c2a44ef86f89976d",
"installed_by": ["modules"]
},
"ngsbits/samplegender": {
Expand Down Expand Up @@ -518,12 +518,12 @@
"nf-core": {
"utils_nextflow_pipeline": {
"branch": "master",
"git_sha": "9d05360da397692321d377b6102d2fb22507c6ef",
"git_sha": "3aa0aec1d52d492fe241919f0c6100ebf0074082",
"installed_by": ["subworkflows"]
},
"utils_nfcore_pipeline": {
"branch": "master",
"git_sha": "772684d9d66f37b650c8ba5146ac1ee3ecba2acb",
"git_sha": "1b6b9a3338d011367137808b49b923515080e3ba",
"installed_by": ["subworkflows"]
},
"utils_nfschema_plugin": {
Expand Down
11 changes: 11 additions & 0 deletions modules/local/get_chrom_sizes.nf
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,15 @@ process GET_CHROM_SIZES {
cut: \$(echo \$(cut --help 2>&1 | head -n 1 | cut -f1,2 -d' '))
END_VERSIONS
"""

stub:
"""
touch ${fai}.sizes
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cut: \$(echo \$(cut --help 2>&1 | head -n 1 | cut -f1,2 -d' '))
END_VERSIONS
"""

}
10 changes: 10 additions & 0 deletions modules/local/rename_align_files.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,14 @@ process RENAME_ALIGN_FILES {
ln: \$(echo \$(ln --version 2>&1 | head -n 1 | cut -d ' ' -f4))
END_VERSIONS
"""

stub:
"""
ln -s $input ${meta.sample}.${extension}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
ln: \$(echo \$(ln --version 2>&1 | head -n 1 | cut -d ' ' -f4))
END_VERSIONS
"""
}
2 changes: 1 addition & 1 deletion modules/nf-core/multiqc/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions subworkflows/local/utils_nfcore_raredisease_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ workflow PIPELINE_INITIALISATION {
workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1
)


//
// Validate parameters and generate parameter summary to stdout
//
Expand All @@ -57,13 +56,13 @@ workflow PIPELINE_INITIALISATION {
null
)


//
// Check config provided to the pipeline
//
UTILS_NFCORE_PIPELINE (
nextflow_cli_args
)

//
// Custom validation for pipeline parameters
//
Expand Down Expand Up @@ -120,7 +119,6 @@ workflow PIPELINE_COMPLETION {
email // string: email address
email_on_fail // string: email address sent on pipeline failure
plaintext_email // boolean: Send plain-text email instead of HTML

outdir // path: Path to output directory where results will be published
monochrome_logs // boolean: Disable ANSI colour codes in log output
hook_url // string: hook URL for notifications
Expand Down
30 changes: 16 additions & 14 deletions subworkflows/nf-core/utils_nextflow_pipeline/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions subworkflows/nf-core/utils_nfcore_pipeline/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion workflows/raredisease.nf
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@ workflow RAREDISEASE {
ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params))
ch_multiqc_files = ch_multiqc_files.mix(
ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml'))

ch_multiqc_custom_methods_description = params.multiqc_methods_description ?
file(params.multiqc_methods_description, checkIfExists: true) :
file("$projectDir/assets/methods_description_template.yml", checkIfExists: true)
Expand Down

0 comments on commit dbb3e8f

Please sign in to comment.