Skip to content

Commit b2ad76f

Browse files
committed
Template update for nf-core/tools version 2.10
1 parent 6ed1161 commit b2ad76f

22 files changed

+253
-78
lines changed

.devcontainer/devcontainer.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "nfcore",
33
"image": "nfcore/gitpod:latest",
44
"remoteUser": "gitpod",
5+
"runArgs": ["--privileged"],
56

67
// Configure tool-specific properties.
78
"customizations": {

.github/CONTRIBUTING.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Please use the pre-filled template to save time.
99
However, don't be put off by this template - other more general issues and suggestions are welcome!
1010
Contributions to the code are even more welcome ;)
1111

12-
> If you need help using or modifying nf-core/funcscan then the best place to ask is on the nf-core Slack [#funcscan](https://nfcore.slack.com/channels/funcscan) channel ([join our Slack here](https://nf-co.re/join/slack)).
12+
:::info
13+
If you need help using or modifying nf-core/funcscan then the best place to ask is on the nf-core Slack [#funcscan](https://nfcore.slack.com/channels/funcscan) channel ([join our Slack here](https://nf-co.re/join/slack)).
14+
:::
1315

1416
## Contribution workflow
1517

.github/workflows/linting.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878

7979
- uses: actions/setup-python@v4
8080
with:
81-
python-version: "3.8"
81+
python-version: "3.11"
8282
architecture: "x64"
8383

8484
- name: Install dependencies
+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: release-announcements
2+
# Automatic release toot and tweet anouncements
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
toot:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: rzr/fediverse-action@master
13+
with:
14+
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
15+
host: "mstdn.science" # custom host if not "mastodon.social" (default)
16+
# GitHub event payload
17+
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
18+
message: |
19+
Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}!
20+
21+
Please see the changelog: ${{ github.event.release.html_url }}
22+
23+
send-tweet:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/setup-python@v4
28+
with:
29+
python-version: "3.10"
30+
- name: Install dependencies
31+
run: pip install tweepy==4.14.0
32+
- name: Send tweet
33+
shell: python
34+
run: |
35+
import os
36+
import tweepy
37+
38+
client = tweepy.Client(
39+
access_token=os.getenv("TWITTER_ACCESS_TOKEN"),
40+
access_token_secret=os.getenv("TWITTER_ACCESS_TOKEN_SECRET"),
41+
consumer_key=os.getenv("TWITTER_CONSUMER_KEY"),
42+
consumer_secret=os.getenv("TWITTER_CONSUMER_SECRET"),
43+
)
44+
tweet = os.getenv("TWEET")
45+
client.create_tweet(text=tweet)
46+
env:
47+
TWEET: |
48+
Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}!
49+
50+
Please see the changelog: ${{ github.event.release.html_url }}
51+
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
52+
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
53+
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
54+
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
55+
56+
bsky-post:
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: zentered/[email protected]
60+
with:
61+
post: |
62+
Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}!
63+
64+
Please see the changelog: ${{ github.event.release.html_url }}
65+
env:
66+
BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }}
67+
BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }}
68+
#

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6-
## v1.1.2 - [date]
6+
## v1.1.4dev - [date]
77

88
Initial release of nf-core/funcscan, created with the [nf-core](https://nf-co.re/) template.
99

CITATIONS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
- [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)
1414

15-
> Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. Available online https://www.bioinformatics.babraham.ac.uk/projects/fastqc/.
15+
> Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online].
1616
1717
- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/)
1818

CODE_OF_CONDUCT.md

+102-31
Large diffs are not rendered by default.

README.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# ![nf-core/funcscan](docs/images/nf-core-funcscan_logo_light.png#gh-light-mode-only) ![nf-core/funcscan](docs/images/nf-core-funcscan_logo_dark.png#gh-dark-mode-only)
22

3-
[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/funcscan/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)
3+
[![GitHub Actions CI Status](https://github.com/nf-core/funcscan/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/funcscan/actions?query=workflow%3A%22nf-core+CI%22)
4+
[![GitHub Actions Linting Status](https://github.com/nf-core/funcscan/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/funcscan/actions?query=workflow%3A%22nf-core+linting%22)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/funcscan/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)
45

56
[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/)
67
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
@@ -29,10 +30,11 @@
2930

3031
## Usage
3132

32-
> **Note**
33-
> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how
34-
> to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline)
35-
> with `-profile test` before running the workflow on actual data.
33+
:::note
34+
If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how
35+
to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline)
36+
with `-profile test` before running the workflow on actual data.
37+
:::
3638

3739
<!-- TODO nf-core: Describe the minimum required steps to execute the pipeline, e.g. how to prepare samplesheets.
3840
Explain what rows and columns represent. For instance (please edit as appropriate):
@@ -61,10 +63,11 @@ nextflow run nf-core/funcscan \
6163
--outdir <OUTDIR>
6264
```
6365

64-
> **Warning:**
65-
> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those
66-
> provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;
67-
> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).
66+
:::warning
67+
Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those
68+
provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;
69+
see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).
70+
:::
6871

6972
For more details and further functionality, please refer to the [usage documentation](https://nf-co.re/funcscan/usage) and the [parameter documentation](https://nf-co.re/funcscan/parameters).
7073

assets/multiqc_config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
report_comment: >
2-
This report has been generated by the <a href="https://github.com/nf-core/funcscan/1.1.2" target="_blank">nf-core/funcscan</a>
2+
This report has been generated by the <a href="https://github.com/nf-core/funcscan/releases/tag/dev" target="_blank">nf-core/funcscan</a>
33
analysis pipeline. For information about how to interpret these results, please see the
4-
<a href="https://nf-co.re/funcscan/1.1.2/output" target="_blank">documentation</a>.
4+
<a href="https://nf-co.re/funcscan/dev/docs/output" target="_blank">documentation</a>.
55
report_section_order:
66
"nf-core-funcscan-methods-description":
77
order: -1000

conf/modules.config

+9
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,13 @@ process {
3838
]
3939
}
4040

41+
withName: 'MULTIQC' {
42+
ext.args = params.multiqc_title ? "--title \"$params.multiqc_title\"" : ''
43+
publishDir = [
44+
path: { "${params.outdir}/multiqc" },
45+
mode: params.publish_dir_mode,
46+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
47+
]
48+
}
49+
4150
}

docs/output.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d
3535

3636
![MultiQC - FastQC adapter content plot](images/mqc_fastqc_adapter.png)
3737

38-
> **NB:** The FastQC plots displayed in the MultiQC report shows _untrimmed_ reads. They may contain adapter sequence and potentially regions with low quality.
38+
:::note
39+
The FastQC plots displayed in the MultiQC report shows _untrimmed_ reads. They may contain adapter sequence and potentially regions with low quality.
40+
:::
3941

4042
### MultiQC
4143

@@ -62,6 +64,7 @@ Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQ
6264
- Reports generated by Nextflow: `execution_report.html`, `execution_timeline.html`, `execution_trace.txt` and `pipeline_dag.dot`/`pipeline_dag.svg`.
6365
- Reports generated by the pipeline: `pipeline_report.html`, `pipeline_report.txt` and `software_versions.yml`. The `pipeline_report*` files will only be present if the `--email` / `--email_on_fail` parameter's are used when running the pipeline.
6466
- Reformatted samplesheet files used as input to the pipeline: `samplesheet.valid.csv`.
67+
- Parameters used by the pipeline run: `params.json`.
6568

6669
</details>
6770

docs/usage.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ If you wish to repeatedly use the same parameters for multiple runs, rather than
7575

7676
Pipeline settings can be provided in a `yaml` or `json` file via `-params-file <file>`.
7777

78-
> ⚠️ Do not use `-c <file>` to specify parameters as this will result in errors. Custom config files specified with `-c` must only be used for [tuning process resource specifications](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources), other infrastructural tweaks (such as output directories), or module arguments (args).
78+
:::warning
79+
Do not use `-c <file>` to specify parameters as this will result in errors. Custom config files specified with `-c` must only be used for [tuning process resource specifications](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources), other infrastructural tweaks (such as output directories), or module arguments (args).
80+
:::
7981

8082
The above pipeline run specified with a params file in yaml format:
8183

@@ -112,19 +114,25 @@ This version number will be logged in reports when you run the pipeline, so that
112114

113115
To further assist in reproducbility, you can use share and re-use [parameter files](#running-the-pipeline) to repeat pipeline runs with the same settings without having to write out a command with every single parameter.
114116

115-
> 💡 If you wish to share such profile (such as upload as supplementary material for academic publications), make sure to NOT include cluster specific paths to files, nor institutional specific profiles.
117+
:::tip
118+
If you wish to share such profile (such as upload as supplementary material for academic publications), make sure to NOT include cluster specific paths to files, nor institutional specific profiles.
119+
:::
116120

117121
## Core Nextflow arguments
118122

119-
> **NB:** These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen).
123+
:::note
124+
These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen).
125+
:::
120126

121127
### `-profile`
122128

123129
Use this parameter to choose a configuration profile. Profiles can give configuration presets for different compute environments.
124130

125131
Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Shifter, Charliecloud, Apptainer, Conda) - see below.
126132

127-
> We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported.
133+
:::info
134+
We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported.
135+
:::
128136

129137
The pipeline also dynamically loads configurations from [https://github.com/nf-core/configs](https://github.com/nf-core/configs) when it runs, making multiple config profiles for various institutional clusters available at run time. For more information and to see if your system is available in these configs please see the [nf-core/configs documentation](https://github.com/nf-core/configs#documentation).
130138

lib/NfcoreTemplate.groovy

+16
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//
44

55
import org.yaml.snakeyaml.Yaml
6+
import groovy.json.JsonOutput
67

78
class NfcoreTemplate {
89

@@ -222,6 +223,21 @@ class NfcoreTemplate {
222223
}
223224
}
224225

226+
//
227+
// Dump pipeline parameters in a json file
228+
//
229+
public static void dump_parameters(workflow, params) {
230+
def output_d = new File("${params.outdir}/pipeline_info/")
231+
if (!output_d.exists()) {
232+
output_d.mkdirs()
233+
}
234+
235+
def timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
236+
def output_pf = new File(output_d, "params_${timestamp}.json")
237+
def jsonStr = JsonOutput.toJson(params)
238+
output_pf.text = JsonOutput.prettyPrint(jsonStr)
239+
}
240+
225241
//
226242
// Print pipeline summary on completion
227243
//

lib/WorkflowFuncscan.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class WorkflowFuncscan {
5353

5454
public static String toolCitationText(params) {
5555

56-
// TODO Optionally add in-text citation tools to this list.
56+
// TODO nf-core: Optionally add in-text citation tools to this list.
5757
// Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "Tool (Foo et al. 2023)" : "",
5858
// Uncomment function in methodsDescriptionText to render in MultiQC report
5959
def citation_text = [

main.nf

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ nextflow.enable.dsl = 2
1717
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1818
*/
1919

20+
// TODO nf-core: Remove this line if you don't need a FASTA file
21+
// This is an example of how to use getGenomeAttribute() to fetch parameters
22+
// from igenomes.config using `--genome`
2023
params.fasta = WorkflowMain.getGenomeAttribute(params, 'fasta')
2124

2225
/*

modules.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
"nf-core": {
88
"custom/dumpsoftwareversions": {
99
"branch": "master",
10-
"git_sha": "76cc4938c1f6ea5c7d83fed1eeffc146787f9543",
10+
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
1111
"installed_by": ["modules"]
1212
},
1313
"fastqc": {
1414
"branch": "master",
15-
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
15+
"git_sha": "bd8092b67b5103bdd52e300f75889442275c3117",
1616
"installed_by": ["modules"]
1717
},
1818
"multiqc": {
1919
"branch": "master",
20-
"git_sha": "f2d63bd5b68925f98f572eed70993d205cc694b7",
20+
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
2121
"installed_by": ["modules"]
2222
}
2323
}

modules/nf-core/custom/dumpsoftwareversions/main.nf

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/fastqc/main.nf

+6-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/multiqc/main.nf

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nextflow.config

+5-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ params {
5454
// Schema validation default options
5555
validationFailUnrecognisedParams = false
5656
validationLenientMode = false
57-
validationSchemaIgnoreParams = 'genomes'
57+
validationSchemaIgnoreParams = 'genomes,igenomes_base'
5858
validationShowHiddenParams = false
5959
validate_params = true
6060

@@ -154,6 +154,7 @@ profiles {
154154
}
155155
apptainer {
156156
apptainer.enabled = true
157+
apptainer.autoMounts = true
157158
conda.enabled = false
158159
docker.enabled = false
159160
singularity.enabled = false
@@ -163,8 +164,8 @@ profiles {
163164
}
164165
gitpod {
165166
executor.name = 'local'
166-
executor.cpus = 16
167-
executor.memory = 60.GB
167+
executor.cpus = 4
168+
executor.memory = 8.GB
168169
}
169170
test { includeConfig 'conf/test.config' }
170171
test_full { includeConfig 'conf/test_full.config' }
@@ -228,7 +229,7 @@ manifest {
228229
description = """Pipeline for screening for functional components of assembled contigs"""
229230
mainScript = 'main.nf'
230231
nextflowVersion = '!>=23.04.0'
231-
version = '1.1.2'
232+
version = '1.1.4dev'
232233
doi = ''
233234
}
234235

0 commit comments

Comments
 (0)