Skip to content

Commit 2da9eb4

Browse files
committed
Merge branch 'TEMPLATE' of https://github.com/nf-core/chipseq into merge_temp_2.10
2 parents e64e11c + 1ae46c8 commit 2da9eb4

15 files changed

+229
-65
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/chipseq then the best place to ask is on the nf-core Slack [#chipseq](https://nfcore.slack.com/channels/chipseq) channel ([join our Slack here](https://nf-co.re/join/slack)).
12+
:::info
13+
If you need help using or modifying nf-core/chipseq then the best place to ask is on the nf-core Slack [#chipseq](https://nfcore.slack.com/channels/chipseq) 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+
#

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/chipseq](docs/images/nf-core-chipseq_logo_light.png#gh-light-mode-only) ![nf-core/chipseq](docs/images/nf-core-chipseq_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/chipseq/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.3240506-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.3240506)
3+
[![GitHub Actions CI Status](https://github.com/nf-core/chipseq/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/chipseq/actions?query=workflow%3A%22nf-core+CI%22)
4+
[![GitHub Actions Linting Status](https://github.com/nf-core/chipseq/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/chipseq/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/chipseq/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/)
@@ -64,10 +65,11 @@ You can find numerous talks on the [nf-core events page](https://nf-co.re/events
6465

6566
## Usage
6667

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

7274
To run on your data, prepare a tab-separated samplesheet with your input data. Please follow the [documentation on samplesheets](https://nf-co.re/chipseq/usage#samplesheet-input) for more details. An example samplesheet for running the pipeline looks as follows:
7375

@@ -92,10 +94,11 @@ nextflow run nf-core/chipseq --input samplesheet.csv --outdir <OUTDIR> --genome
9294

9395
See [usage docs](https://nf-co.re/chipseq/usage) for all of the available options when running the pipeline.
9496

95-
> **Warning:**
96-
> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those
97-
> provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;
98-
> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).
97+
:::warning
98+
Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those
99+
provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;
100+
see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).
101+
:::
99102

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

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/chipseq/2.1.0dev" target="_blank">nf-core/chipseq</a>
2+
This report has been generated by the <a href="https://github.com/nf-core/chipseq/releases/tag/dev" target="_blank">nf-core/chipseq</a>
33
analysis pipeline. For information about how to interpret these results, please see the
4-
<a href="https://nf-co.re/chipseq/2.1.0dev/output" target="_blank">documentation</a>.
4+
<a href="https://nf-co.re/chipseq/dev/docs/output" target="_blank">documentation</a>.
55
66
data_format: "yaml"
77

docs/output.md

+1
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ Reference genome-specific files can be useful to keep for the downstream process
343343
- Reports generated by Nextflow: `execution_report.html`, `execution_timeline.html`, `execution_trace.txt` and `pipeline_dag.dot`/`pipeline_dag.svg`.
344344
- 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.
345345
- Reformatted samplesheet files used as input to the pipeline: `samplesheet.valid.csv`.
346+
- Parameters used by the pipeline run: `params.json`.
346347

347348
</details>
348349

docs/usage.md

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

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

154-
> ⚠️ 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).
154+
:::warning
155+
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).
156+
:::
155157

156158
The above pipeline run specified with a params file in yaml format:
157159

@@ -188,19 +190,25 @@ This version number will be logged in reports when you run the pipeline, so that
188190

189191
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.
190192

191-
> 💡 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.
193+
:::tip
194+
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.
195+
:::
192196

193197
## Core Nextflow arguments
194198

195-
> **NB:** These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen).
199+
:::note
200+
These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen).
201+
:::
196202

197203
### `-profile`
198204

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

201207
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.
202208

203-
> We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported.
209+
:::info
210+
We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported.
211+
:::
204212

205213
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).
206214

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/WorkflowChipseq.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class WorkflowChipseq {
7777

7878
public static String toolCitationText(params) {
7979

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

modules/nf-core/fastqc/main.nf

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

nextflow.config

+4-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ params {
104104
// Schema validation default options
105105
validationFailUnrecognisedParams = false
106106
validationLenientMode = false
107-
validationSchemaIgnoreParams = 'genomes'
107+
validationSchemaIgnoreParams = 'genomes,igenomes_base'
108108
validationShowHiddenParams = false
109109
validate_params = true
110110

@@ -205,6 +205,7 @@ profiles {
205205
}
206206
apptainer {
207207
apptainer.enabled = true
208+
apptainer.autoMounts = true
208209
conda.enabled = false
209210
docker.enabled = false
210211
singularity.enabled = false
@@ -214,8 +215,8 @@ profiles {
214215
}
215216
gitpod {
216217
executor.name = 'local'
217-
executor.cpus = 16
218-
executor.memory = 60.GB
218+
executor.cpus = 4
219+
executor.memory = 8.GB
219220
}
220221
test { includeConfig 'conf/test.config' }
221222
test_full { includeConfig 'conf/test_full.config' }

nextflow_schema.json

-7
Original file line numberDiff line numberDiff line change
@@ -484,14 +484,12 @@
484484
"type": "boolean",
485485
"description": "Display help text.",
486486
"fa_icon": "fas fa-question-circle",
487-
"default": false,
488487
"hidden": true
489488
},
490489
"version": {
491490
"type": "boolean",
492491
"description": "Display version and exit.",
493492
"fa_icon": "fas fa-question-circle",
494-
"default": false,
495493
"hidden": true
496494
},
497495
"publish_dir_mode": {
@@ -522,7 +520,6 @@
522520
"type": "boolean",
523521
"description": "Send plain-text email instead of HTML.",
524522
"fa_icon": "fas fa-remove-format",
525-
"default": false,
526523
"hidden": true
527524
},
528525
"max_multiqc_email_size": {
@@ -537,7 +534,6 @@
537534
"type": "boolean",
538535
"description": "Do not use coloured log outputs.",
539536
"fa_icon": "fas fa-palette",
540-
"default": false,
541537
"hidden": true
542538
},
543539
"hook_url": {
@@ -576,23 +572,20 @@
576572
"type": "boolean",
577573
"fa_icon": "far fa-eye-slash",
578574
"description": "Show all params when using `--help`",
579-
"default": false,
580575
"hidden": true,
581576
"help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters."
582577
},
583578
"validationFailUnrecognisedParams": {
584579
"type": "boolean",
585580
"fa_icon": "far fa-check-circle",
586581
"description": "Validation of parameters fails when an unrecognised parameter is found.",
587-
"default": false,
588582
"hidden": true,
589583
"help_text": "By default, when an unrecognised parameter is found, it returns a warinig."
590584
},
591585
"validationLenientMode": {
592586
"type": "boolean",
593587
"fa_icon": "far fa-check-circle",
594588
"description": "Validation of parameters in lenient more.",
595-
"default": false,
596589
"hidden": true,
597590
"help_text": "Allows string values that are parseable as numbers or booleans. For further information see [JSONSchema docs](https://github.com/everit-org/json-schema#lenient-mode)."
598591
}

workflows/chipseq.nf

+1-5
Original file line numberDiff line numberDiff line change
@@ -777,11 +777,7 @@ workflow.onComplete {
777777
if (params.email || params.email_on_fail) {
778778
NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report)
779779
}
780-
781-
if (params.hook_url) {
782-
NfcoreTemplate.adaptivecard(workflow, params, summary_params, projectDir, log)
783-
}
784-
780+
NfcoreTemplate.dump_parameters(workflow, params)
785781
NfcoreTemplate.summary(workflow, params, log)
786782
if (params.hook_url) {
787783
NfcoreTemplate.IM_notification(workflow, params, summary_params, projectDir, log)

0 commit comments

Comments
 (0)