Skip to content

Commit

Permalink
Merge pull request #9 from Sage-Bionetworks-Workflows/dev
Browse files Browse the repository at this point in the history
[IBCDPE-589] Catch up `main` with `dev`
  • Loading branch information
BWMac authored Jul 11, 2023
2 parents 52ea579 + 26b9c53 commit 76694ae
Show file tree
Hide file tree
Showing 48 changed files with 540 additions and 373 deletions.
16 changes: 8 additions & 8 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# sage/dcqc: Contributing Guidelines
# sage-bionetworks-workflows/nf-dcqc: Contributing Guidelines

Hi there!
Many thanks for taking an interest in improving sage/dcqc.
Many thanks for taking an interest in improving sage-bionetworks-workflows/nf-dcqc.

We try to manage the required tasks for sage/dcqc using GitHub issues, you probably came to this page when creating one.
We try to manage the required tasks for sage-bionetworks-workflows/nf-dcqc using GitHub issues, you probably came to this page when creating one.
Please use the pre-filled template to save time.

However, don't be put off by this template - other more general issues and suggestions are welcome!
Contributions to the code are even more welcome ;)

## Contribution workflow

If you'd like to write some code for sage/dcqc, the standard workflow is as follows:
If you'd like to write some code for sage-bionetworks-workflows/nf-dcqc, the standard workflow is as follows:

1. Check that there isn't already an issue about your idea in the [sage/dcqc issues](https://github.com/sage/dcqc/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this
2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [sage/dcqc repository](https://github.com/sage/dcqc) to your GitHub account
1. Check that there isn't already an issue about your idea in the [sage-bionetworks-workflows/nf-dcqc issues](https://github.com/sage-bionetworks-workflows/nf-dcqc/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this
2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [sage-bionetworks-workflows/nf-dcqc repository](https://github.com/sage-bionetworks-workflows/nf-dcqc) to your GitHub account
3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions)
4. Use `nf-core schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10).
5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
Expand Down Expand Up @@ -52,7 +52,7 @@ These tests are run both with the latest available version of `Nextflow` and als

## Pipeline contribution conventions

To make the sage/dcqc code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written.
To make the sage-bionetworks-workflows/nf-dcqc code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written.

### Adding a new step

Expand Down Expand Up @@ -102,7 +102,7 @@ This repo includes a devcontainer configuration which will create a GitHub Codes

To get started:

- Open the repo in [Codespaces](https://github.com/sage/dcqc/codespaces)
- Open the repo in [Codespaces](https://github.com/sage-bionetworks-workflows/nf-dcqc/codespaces)
- Tools installed
- nf-core
- Nextflow
Expand Down
98 changes: 49 additions & 49 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,52 @@ name: Bug report
description: Report something that is broken or incorrect
labels: bug
body:
- type: textarea
id: description
attributes:
label: Description of the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: command_used
attributes:
label: Command used and terminal output
description: Steps to reproduce the behaviour. Please paste the command you used
to launch the pipeline and the output from your terminal.
render: console
placeholder: '$ nextflow run ...
Some output where something broke
'
- type: textarea
id: files
attributes:
label: Relevant files
description: 'Please drag and drop the relevant files here. Create a `.zip` archive
if the extension is not allowed.
Your verbose log file `.nextflow.log` is often useful _(this is a hidden file
in the directory where you launched the pipeline)_ as well as custom Nextflow
configuration files.
'
- type: textarea
id: system
attributes:
label: System information
description: '* Nextflow version _(eg. 22.10.1)_
* Hardware _(eg. HPC, Desktop, Cloud)_
* Executor _(eg. slurm, local, awsbatch)_
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_
* OS _(eg. CentOS Linux, macOS, Linux Mint)_
* Version of sage/dcqc _(eg. 1.1, 1.5, 1.8.2)_
'
- type: textarea
id: description
attributes:
label: Description of the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: command_used
attributes:
label: Command used and terminal output
description: Steps to reproduce the behaviour. Please paste the command you used
to launch the pipeline and the output from your terminal.
render: console
placeholder: "$ nextflow run ...
Some output where something broke
"
- type: textarea
id: files
attributes:
label: Relevant files
description: "Please drag and drop the relevant files here. Create a `.zip` archive
if the extension is not allowed.
Your verbose log file `.nextflow.log` is often useful _(this is a hidden file
in the directory where you launched the pipeline)_ as well as custom Nextflow
configuration files.
"
- type: textarea
id: system
attributes:
label: System information
description: "* Nextflow version _(eg. 22.10.1)_
* Hardware _(eg. HPC, Desktop, Cloud)_
* Executor _(eg. slurm, local, awsbatch)_
* Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_
* OS _(eg. CentOS Linux, macOS, Linux Mint)_
* Version of sage-bionetworks-workflows/nf-dcqc _(eg. 1.1, 1.5, 1.8.2)_
"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature request
description: Suggest an idea for the sage/dcqc pipeline
description: Suggest an idea for the sage-bionetworks-workflows/nf-dcqc pipeline
labels: enhancement
body:
- type: textarea
Expand Down
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<!--
# sage/dcqc pull request
# sage-bionetworks-workflows/nf-dcqc pull request
Many thanks for contributing to sage/dcqc!
Many thanks for contributing to sage-bionetworks-workflows/nf-dcqc!
Please fill in the appropriate checklist below (delete whatever is not relevant).
These are the most common things requested on pull requests (PRs).
Remember that PRs should be made against the dev branch, unless you're preparing a pipeline release.
Learn more about contributing: [CONTRIBUTING.md](https://github.com/sage/dcqc/tree/master/.github/CONTRIBUTING.md)
Learn more about contributing: [CONTRIBUTING.md](https://github.com/sage-bionetworks-workflows/nf-dcqc/tree/master/.github/CONTRIBUTING.md)
-->

## PR checklist

- [ ] This comment contains a description of changes (with reason).
- [ ] If you've fixed a bug or added code that should be tested, add tests!
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/sage/dcqc/tree/master/.github/CONTRIBUTING.md)
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/sage-bionetworks-workflows/nf-dcqc/tree/master/.github/CONTRIBUTING.md)
- [ ] Make sure your code lints (`nf-core lint`).
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
- [ ] Usage Documentation in `docs/usage.md` is updated.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
steps:
# PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
- name: Check PRs
if: github.repository == 'sage/dcqc'
if: github.repository == 'sage-bionetworks-workflows/nf-dcqc'
run: |
{ [[ ${{github.event.pull_request.head.repo.full_name }} == sage/dcqc ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
{ [[ ${{github.event.pull_request.head.repo.full_name }} == sage-bionetworks-workflows/nf-dcqc ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
# If the above check failed, post a comment on the PR explaining the failure
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
matrix:
NXF_VER:
- "22.10.1"
- "22.10.4"
- "latest-everything"
steps:
- name: Check out pipeline code
Expand All @@ -36,8 +36,8 @@ jobs:
version: "${{ matrix.NXF_VER }}"

- name: Run pipeline with test data
# TODO nf-core: You can customise CI pipeline run tests as required
# For example: adding multiple test runs with different parameters
# Remember that you can parallelise this by using strategy.matrix
env:
SYNAPSE_AUTH_TOKEN: ${{ secrets.SYNAPSE_AUTH_TOKEN }}
run: |
nextflow secrets set SYNAPSE_AUTH_TOKEN "${SYNAPSE_AUTH_TOKEN}"
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
20 changes: 10 additions & 10 deletions .nf-core.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
repository_type: pipeline
lint:
files_exist:
- CODE_OF_CONDUCT.md
- assets/nf-core-dcqc_logo_light.png
- docs/images/nf-core-dcqc_logo_light.png
- docs/images/nf-core-dcqc_logo_dark.png
- .github/ISSUE_TEMPLATE/config.yml
- .github/workflows/awstest.yml
- .github/workflows/awsfulltest.yml
- CODE_OF_CONDUCT.md
- assets/nf-core-dcqc_logo_light.png
- docs/images/nf-core-dcqc_logo_light.png
- docs/images/nf-core-dcqc_logo_dark.png
- .github/ISSUE_TEMPLATE/config.yml
- .github/workflows/awstest.yml
- .github/workflows/awsfulltest.yml
nextflow_config:
- manifest.name
- manifest.homePage
- manifest.name
- manifest.homePage
multiqc_config:
- report_comment
- report_comment
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)

[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A522.10.1-23aa62.svg)](https://www.nextflow.io/)
[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A522.10.4-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/)
[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)
[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)
Expand All @@ -27,7 +27,7 @@ On release, automated continuous integration tests run the pipeline on a full-si

## Quick Start

1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=22.10.1`)
1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=22.10.4`)

2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/) (you can follow [this tutorial](https://singularity-tutorial.github.io/01-installation/)), [`Podman`](https://podman.io/), [`Shifter`](https://nersc.gitlab.io/development/shifter/how-to-use/) or [`Charliecloud`](https://hpc.github.io/charliecloud/) for full pipeline reproducibility _(you can use [`Conda`](https://conda.io/miniconda.html) both to install Nextflow itself and also to manage software within pipelines. Please only use it within pipelines as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_.

Expand All @@ -52,6 +52,16 @@ On release, automated continuous integration tests run the pipeline on a full-si
nextflow run sage/dcqc --input samplesheet.csv --outdir <OUTDIR> --genome GRCh37 -profile <docker/singularity/podman/shifter/charliecloud/conda/institute>
```

## Special Considerations for Running `nf-dcqc` on Nextflow Tower

`nf-dcqc` leverages the reports feature when executed on Tower. This is done by pointing Tower to the generated `output.csv` file which is saved to `params.outdir` after a successful run. By default, the `outdir` for the workflow is set to a local directory called `results`. This does not work on Nextflow Tower runs, as you will not have access to the `results` directory once the job has completed. Thus, the `outdir` should be set to an S3 bucket location that the Tower workspace you are using has access to. For example, in the `pipeline parameters` for a Tower run, you can provide YAML such as:

```yaml
outdir: s3://example-project-tower-bucket/dcqc_output
```

From the reports tab within your workflow run, you can view and download the generated `output.csv` file.

## Credits

sage/dcqc was originally written by Bruno Grande <bruno.grande@sagebionetworks.org>.
Expand Down
14 changes: 7 additions & 7 deletions assets/email_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<meta name="description" content="sage/dcqc: Nextflow Workflow for Data Coordination Quality Control">
<title>sage/dcqc Pipeline Report</title>
<meta name="description" content="sage-bionetworks-workflows/nf-dcqc: Nextflow Workflow for Data Coordination Quality Control">
<title>sage-bionetworks-workflows/nf-dcqc Pipeline Report</title>
</head>
<body>
<div style="font-family: Helvetica, Arial, sans-serif; padding: 30px; max-width: 800px; margin: 0 auto;">

<img src="cid:nfcorepipelinelogo">

<h1>sage/dcqc v${version}</h1>
<h1>sage-bionetworks-workflows/nf-dcqc v${version}</h1>
<h2>Run Name: $runName</h2>

<% if (!success){
out << """
<div style="color: #a94442; background-color: #f2dede; border-color: #ebccd1; padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px;">
<h4 style="margin-top:0; color: inherit;">sage/dcqc execution completed unsuccessfully!</h4>
<h4 style="margin-top:0; color: inherit;">sage-bionetworks-workflows/nf-dcqc execution completed unsuccessfully!</h4>
<p>The exit status of the task that caused the workflow execution to fail was: <code>$exitStatus</code>.</p>
<p>The full error message was:</p>
<pre style="white-space: pre-wrap; overflow: visible; margin-bottom: 0;">${errorReport}</pre>
Expand All @@ -27,7 +27,7 @@ <h4 style="margin-top:0; color: inherit;">sage/dcqc execution completed unsucces
} else {
out << """
<div style="color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px;">
sage/dcqc execution completed successfully!
sage-bionetworks-workflows/nf-dcqc execution completed successfully!
</div>
"""
}
Expand All @@ -44,8 +44,8 @@ <h3>Pipeline Configuration:</h3>
</tbody>
</table>

<p>sage/dcqc</p>
<p><a href="https://github.com/sage/dcqc">https://github.com/sage/dcqc</a></p>
<p>sage-bionetworks-workflows/nf-dcqc</p>
<p><a href="https://github.com/sage-bionetworks-workflows/nf-dcqc">https://github.com/sage-bionetworks-workflows/nf-dcqc</a></p>

</div>

Expand Down
8 changes: 4 additions & 4 deletions assets/email_template.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Run Name: $runName

<% if (success){
out << "## sage/dcqc execution completed successfully! ##"
out << "## sage-bionetworks-workflows/nf-dcqc execution completed successfully! ##"
} else {
out << """####################################################
## sage/dcqc execution completed unsuccessfully! ##
## sage-bionetworks-workflows/nf-dcqc execution completed unsuccessfully! ##
####################################################
The exit status of the task that caused the workflow execution to fail was: $exitStatus.
The full error message was:
Expand All @@ -27,5 +27,5 @@ Pipeline Configuration:
<% out << summary.collect{ k,v -> " - $k: $v" }.join("\n") %>

--
sage/dcqc
https://github.com/sage/dcqc
sage-bionetworks-workflows/nf-dcqc
https://github.com/sage-bionetworks-workflows/nf-dcqc
12 changes: 0 additions & 12 deletions assets/multiqc_config.yml

This file was deleted.

Binary file added assets/nf-core-nf-dcqc_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions assets/sendmail_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Content-Type: text/html; charset=utf-8
$email_html

--nfcoremimeboundary
Content-Type: image/png;name="sage-dcqc_logo.png"
Content-Type: image/png;name="sage-bionetworks-workflows-nf-dcqc_logo.png"
Content-Transfer-Encoding: base64
Content-ID: <nfcorepipelinelogo>
Content-Disposition: inline; filename="sage-dcqc_logo_light.png"
Content-Disposition: inline; filename="sage-bionetworks-workflows-nf-dcqc_logo_light.png"

<% out << new File("$projectDir/assets/sage-dcqc_logo_light.png").
<% out << new File("$projectDir/assets/sage-bionetworks-workflows-nf-dcqc_logo_light.png").
bytes.
encodeBase64().
toString().
Expand Down
8 changes: 6 additions & 2 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

process {

// TODO nf-core: Check the defaults for all processes
cpus = { check_max( 1 * task.attempt, 'cpus' ) }
memory = { check_max( 6.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
Expand All @@ -24,7 +23,6 @@ process {
// These labels are used and recognised by default in DSL2 files hosted on nf-core/modules.
// If possible, it would be nice to keep the same label naming convention when
// adding in your local modules too.
// TODO nf-core: Customise requirements for specific processes.
// See https://www.nextflow.io/docs/latest/config.html#config-process-selectors
withLabel:process_single {
cpus = { check_max( 1 , 'cpus' ) }
Expand Down Expand Up @@ -59,6 +57,12 @@ process {
errorStrategy = 'retry'
maxRetries = 2
}
withLabel:dcqc {
container = 'ghcr.io/sage-bionetworks-workflows/py-dcqc:latest'
secret = [
'SYNAPSE_AUTH_TOKEN'
]
}
withName:CUSTOM_DUMPSOFTWAREVERSIONS {
cache = false
}
Expand Down
Loading

0 comments on commit 76694ae

Please sign in to comment.