Skip to content

Commit

Permalink
Merge branch 'dev' into longread_only
Browse files Browse the repository at this point in the history
  • Loading branch information
muabnezor authored Jan 24, 2025
2 parents d95b501 + 95120cb commit 855a299
Show file tree
Hide file tree
Showing 18 changed files with 401 additions and 316 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ indent_size = unset
# ignore python and markdown
[*.{py,md}]
indent_style = unset

# ignore ro-crate metadata files
[**/ro-crate-metadata.json]
insert_final_newline = unset
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ body:
- [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting)
- [nf-core/mag pipeline documentation](https://nf-co.re/mag/usage)
- type: textarea
id: description
attributes:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
- name: Check out pipeline code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0

- name: Set up Nextflow
uses: nf-core/setup-nextflow@v2
Expand Down
51 changes: 32 additions & 19 deletions .github/workflows/download_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,23 @@ env:
NXF_ANSI_LOG: false

jobs:
configure:
runs-on: ubuntu-latest
outputs:
REPO_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPO_LOWERCASE }}
REPOTITLE_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPOTITLE_LOWERCASE }}
REPO_BRANCH: ${{ steps.get_repo_properties.outputs.REPO_BRANCH }}
steps:
- name: Get the repository name and current branch
id: get_repo_properties
run: |
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT"
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT"
download:
runs-on: ubuntu-latest
needs: configure
steps:
- name: Install Nextflow
uses: nf-core/setup-nextflow@v2
Expand All @@ -52,12 +67,6 @@ jobs:
python -m pip install --upgrade pip
pip install git+https://github.com/nf-core/tools.git@dev
- name: Get the repository name and current branch set as environment variable
run: |
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV}
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV}
- name: Make a cache directory for the container images
run: |
mkdir -p ./singularity_container_images
Expand All @@ -66,55 +75,59 @@ jobs:
env:
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
run: |
nf-core pipelines download ${{ env.REPO_LOWERCASE }} \
--revision ${{ env.REPO_BRANCH }} \
--outdir ./${{ env.REPOTITLE_LOWERCASE }} \
nf-core pipelines download ${{ needs.configure.outputs.REPO_LOWERCASE }} \
--revision ${{ needs.configure.outputs.REPO_BRANCH }} \
--outdir ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }} \
--compress "none" \
--container-system 'singularity' \
--container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io/library/" \
--container-cache-utilisation 'amend' \
--download-configuration 'yes'
- name: Inspect download
run: tree ./${{ env.REPOTITLE_LOWERCASE }}
run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}

- name: Inspect container images
run: tree ./singularity_container_images | tee ./container_initial

- name: Count the downloaded number of container images
id: count_initial
run: |
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs)
echo "Initial container image count: $image_count"
echo "IMAGE_COUNT_INITIAL=$image_count" >> ${GITHUB_ENV}
echo "IMAGE_COUNT_INITIAL=$image_count" >> "$GITHUB_OUTPUT"
- name: Run the downloaded pipeline (stub)
id: stub_run_pipeline
continue-on-error: true
env:
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
NXF_SINGULARITY_HOME_MOUNT: true
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
run: nextflow run ./${{needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
- name: Run the downloaded pipeline (stub run not supported)
id: run_pipeline
if: ${{ job.steps.stub_run_pipeline.status == failure() }}
if: ${{ steps.stub_run_pipeline.outcome == 'failure' }}
env:
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images
NXF_SINGULARITY_HOME_MOUNT: true
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results
run: nextflow run ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -profile test,singularity --outdir ./results

- name: Count the downloaded number of container images
id: count_afterwards
run: |
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs)
echo "Post-pipeline run container image count: $image_count"
echo "IMAGE_COUNT_AFTER=$image_count" >> ${GITHUB_ENV}
echo "IMAGE_COUNT_AFTER=$image_count" >> "$GITHUB_OUTPUT"
- name: Compare container image counts
run: |
if [ "${{ env.IMAGE_COUNT_INITIAL }}" -ne "${{ env.IMAGE_COUNT_AFTER }}" ]; then
initial_count=${{ env.IMAGE_COUNT_INITIAL }}
final_count=${{ env.IMAGE_COUNT_AFTER }}
if [ "${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}" -ne "${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}" ]; then
initial_count=${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}
final_count=${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}
difference=$((final_count - initial_count))
echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!"
tree ./singularity_container_images
tree ./singularity_container_images > ./container_afterwards
diff ./container_initial ./container_afterwards
exit 1
else
echo "The pipeline can be downloaded successfully!"
Expand Down
2 changes: 1 addition & 1 deletion .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ lint:
- config_defaults:
- params.phix_reference
- params.lambda_reference
nf_core_version: 3.1.0
nf_core_version: 3.1.2
repository_type: pipeline
template:
author: "Hadrien Gourlé, Daniel Straub, Sabrina Krakau, James A. Fellows Yates,
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ testing/
testing*
*.pyc
bin/
ro-crate-metadata.json
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## dev [unreleased]
## v3.3.1dev - [unreleased]

### `Added`

### `Changed`

- [#731](https://github.com/nf-core/mag/pull/747) - Updated to nf-core 3.1.2 `TEMPLATE` (by @jfy133)

### `Fixed`

### `Dependencies`
- [#748](https://github.com/nf-core/mag/pull/748) - Fix broken phix reference channel when skipping phix removal (reported by @amizeranschi, fix by @muabnezor)
- [#752](https://github.com/nf-core/mag/pull/752) - Fix QUAST results not being displayed when skipping certain steps (reported by @amizeranschi, fix by @jfy133)
- [#753](https://github.com/nf-core/mag/pull/753) - Fix iGenomes reference support for host removal reference genome (reported by @Thomieh73, fix by @jfy133)

### `Dependencies`
### `Deprecated`

### `Deprecated`

## 3.3.0 [2024-12-19]

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Hadrien Gourlé, Daniel Straub, Sabrina Krakau, James A. Fellows Yates, Maxime Borry
Copyright (c) The nf-core/mag team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

[![GitHub Actions CI Status](https://github.com/nf-core/mag/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-core/mag/actions/workflows/ci.yml)
[![GitHub Actions Linting Status](https://github.com/nf-core/mag/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/mag/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/mag/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.3589527-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.3589527)
[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)[![Cite Publication](https://img.shields.io/badge/Cite%20Us!-Cite%20Publication-orange)](https://doi.org/10.1093/nargab/lqac007)
[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)
[![Cite Publication](https://img.shields.io/badge/Cite%20Us!-Cite%20Publication-orange)](https://doi.org/10.1093/nargab/lqac007)

[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A524.04.2-23aa62.svg)](https://www.nextflow.io/)
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
Expand All @@ -27,6 +28,11 @@

## Pipeline summary

## Usage

> [!NOTE]
> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.
By default, the pipeline currently performs the following: it supports both short and long reads, quality trims the reads and adapters with [fastp](https://github.com/OpenGene/fastp) and [Porechop](https://github.com/rrwick/Porechop), and performs basic QC with [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/), and merge multiple sequencing runs.

The pipeline then:
Expand Down
15 changes: 7 additions & 8 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/mag/tree/dev"
target="_blank">nf-core/mag</a> analysis pipeline. For information about how to
interpret these results, please see the <a href="https://nf-co.re/mag/dev/docs/output"
target="_blank">documentation</a>.
This report has been generated by the <a href="https://github.com/nf-core/mag/tree/dev" target="_blank">nf-core/mag</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/mag/dev/docs/output" target="_blank">documentation</a>.
report_section_order:
"nf-core-mag-methods-description":
order: -1000
Expand All @@ -19,7 +18,7 @@ data_format: "yaml"
run_modules:
- fastqc
- fastp
- adapterRemoval
- adapterremoval
- custom_content
- bowtie2
- busco
Expand All @@ -36,7 +35,7 @@ top_modules:
path_filters_exclude:
- "*trimmed*"
- "fastp"
- "adapterRemoval"
- "adapterremoval"
- "porechop"
- "filtlong"
- "fastqc":
Expand Down Expand Up @@ -119,12 +118,12 @@ custom_data:
sp:
host_removal:
fn: "host_removal_metrics.tsv"
adapterRemoval:
adapterremoval:
fn: "*_ar2.settings"
kraken:
fn_re: ".*[kraken2|centrifuge].*report.txt"
quast:
fn_re: "report.*.tsv"
fn: "report*.tsv"
filtlong:
num_lines: 20
fn_re: ".*_filtlong.log"
Expand Down
Loading

0 comments on commit 855a299

Please sign in to comment.