Skip to content

Commit 3bfe31c

Browse files
authored
Merge pull request #134 from nf-core/fixes
Add '--nf_core_rnaseq_strandedness' parameter and support for nf-core/atacseq
2 parents b9f7d5c + 4f84832 commit 3bfe31c

File tree

9 files changed

+64
-39
lines changed

9 files changed

+64
-39
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
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-
## [Unpublished Version / DEV]
6+
## [[1.9](https://github.com/nf-core/rnaseq/releases/tag/1.9)] - 2022-12-21
77

88
### Enhancements & fixes
99

10+
- Bumped minimum Nextflow version from `21.10.3` -> `22.10.1`
1011
- Updated pipeline template to [nf-core/tools 2.7.2](https://github.com/nf-core/tools/releases/tag/2.7.2)
12+
- Added support for generating nf-core/atacseq compatible samplesheets
13+
- Added `--nf_core_rnaseq_strandedness` parameter to specify value for `strandedness` entry added to samplesheet created when using `--nf_core_pipeline rnaseq`. The default is `auto` which can be used with nf-core/rnaseq v3.10 onwards to auto-detect strandedness during the pipeline execution.
1114

1215
## [[1.8](https://github.com/nf-core/fetchngs/releases/tag/1.8)] - 2022-11-08
1316

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ This downloads a text file called `SRR_Acc_List.txt` that can be directly provid
5555
The columns in the auto-created samplesheet can be tailored to be accepted out-of-the-box by selected nf-core pipelines, these currently include:
5656

5757
- [nf-core/rnaseq](https://nf-co.re/rnaseq/usage#samplesheet-input)
58+
- [nf-core/atacseq](https://nf-co.re/atacseq/usage#samplesheet-input)
5859
- Ilumina processing mode of [nf-core/viralrecon](https://nf-co.re/viralrecon/usage#illumina-samplesheet-format)
5960
- [nf-core/taxprofiler](https://nf-co.re/nf-core/taxprofiler)
6061

61-
You can use the `--nf_core_pipeline` parameter to customise this behaviour e.g. `--nf_core_pipeline rnaseq`. More pipelines will be supported in due course as we adopt and standardise samplesheet input across nf-core.
62+
See [usage docs](https://nf-co.re/fetchngs/1.8/usage#samplesheet-format) for more details.
6263

6364
## Quick Start
6465

docs/usage.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ The final sample information for the FastQ files used for samplesheet generation
5858
As a bonus, the columns in the auto-created samplesheet can be tailored to be accepted out-of-the-box by selected nf-core pipelines, these currently include:
5959

6060
- [nf-core/rnaseq](https://nf-co.re/rnaseq/usage#samplesheet-input)
61+
- [nf-core/atacseq](https://nf-co.re/atacseq/usage#samplesheet-input)
6162
- Ilumina processing mode of [nf-core/viralrecon](https://nf-co.re/viralrecon/usage#illumina-samplesheet-format)
6263
- [nf-core/taxprofiler](https://nf-co.re/nf-core/taxprofiler)
6364

64-
You can use the `--nf_core_pipeline` parameter to customise this behaviour e.g. `--nf_core_pipeline rnaseq`. More pipelines will be supported in due course as we adopt and standardise samplesheet input across nf-core. It is highly recommended that you double-check that all of the identifiers you defined using `--input` are represented in the samplesheet. Also, public databases don't reliably hold information such as strandedness information so you may need to amend these entries too if for example your samplesheet was created by providing `--nf_core_pipeline rnaseq`.
65+
You can use the `--nf_core_pipeline` parameter to customise this behaviour e.g. `--nf_core_pipeline rnaseq`. More pipelines will be supported in due course as we adopt and standardise samplesheet input across nf-core. It is highly recommended that you double-check that all of the identifiers required by the downstream nf-core pipeline are accurately represented in the samplesheet. For example, the nf-core/atacseq pipeline requires a `replicate` column to be provided in it's input samplehsheet, however, public databases don't reliably hold information regarding replicates so you may need to amend these entries if your samplesheet was created by providing `--nf_core_pipeline atacseq`.
66+
67+
From v1.9 of this pipeline the default `strandedness` in the output samplesheet will be set to `auto` when using `--nf_core_pipeline rnaseq`. This will only work with v3.10 onwards of nf-core/rnaseq which permits the auto-detection of strandedness during the pipeline execution. You can change this behaviour with the `--nf_core_rnaseq_strandedness` parameter which is set to `auto` by default.
6568

6669
### Bypass `FTP` data download
6770

modules/local/sra_to_samplesheet.nf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ process SRA_TO_SAMPLESHEET {
88
input:
99
val meta
1010
val pipeline
11+
val strandedness
1112
val mapping_fields
1213

1314
output:
@@ -38,7 +39,9 @@ process SRA_TO_SAMPLESHEET {
3839
// Add nf-core pipeline specific entries
3940
if (pipeline) {
4041
if (pipeline == 'rnaseq') {
41-
pipeline_map << [ strandedness: 'unstranded' ]
42+
pipeline_map << [ strandedness: strandedness ]
43+
} else if (pipeline == 'atacseq') {
44+
pipeline_map << [ replicate: 1 ]
4245
} else if (pipeline == 'taxprofiler') {
4346
pipeline_map << [ fasta: '' ]
4447
}

modules/local/synapse_to_samplesheet.nf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ process SYNAPSE_TO_SAMPLESHEET {
88
input:
99
tuple val(meta), path(fastq)
1010
val pipeline
11+
val strandedness
1112

1213
output:
1314
tuple val(meta), path("*.csv"), emit: samplesheet
@@ -35,7 +36,11 @@ process SYNAPSE_TO_SAMPLESHEET {
3536
// Add nf-core pipeline specific entries
3637
if (pipeline) {
3738
if (pipeline == 'rnaseq') {
38-
pipeline_map << [ strandedness: 'unstranded' ]
39+
pipeline_map << [ strandedness: strandedness ]
40+
} else if (pipeline == 'atacseq') {
41+
pipeline_map << [ replicate: 1 ]
42+
} else if (pipeline == 'taxprofiler') {
43+
pipeline_map << [ fasta: '' ]
3944
}
4045
}
4146
pipeline_map << meta_map

nextflow.config

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,44 @@
1010
params {
1111

1212
// Input options
13-
input = null
14-
input_type = 'sra'
15-
nf_core_pipeline = null
16-
ena_metadata_fields = null
17-
sample_mapping_fields = 'experiment_accession,run_accession,sample_accession,experiment_alias,run_alias,sample_alias,experiment_title,sample_title,sample_description,description'
18-
synapse_config = null
19-
force_sratools_download = false
20-
skip_fastq_download = false
13+
input = null
14+
input_type = 'sra'
15+
nf_core_pipeline = null
16+
nf_core_rnaseq_strandedness = 'auto'
17+
ena_metadata_fields = null
18+
sample_mapping_fields = 'experiment_accession,run_accession,sample_accession,experiment_alias,run_alias,sample_alias,experiment_title,sample_title,sample_description,description'
19+
synapse_config = null
20+
force_sratools_download = false
21+
skip_fastq_download = false
2122

2223
// Boilerplate options
23-
outdir = null
24-
tracedir = "${params.outdir}/pipeline_info"
25-
publish_dir_mode = 'copy'
26-
email = null
27-
email_on_fail = null
28-
plaintext_email = false
29-
monochrome_logs = false
30-
hook_url = null
31-
help = false
32-
version = false
33-
validate_params = true
34-
show_hidden_params = false
35-
schema_ignore_params = 'genomes,igenomes_base'
24+
outdir = null
25+
tracedir = "${params.outdir}/pipeline_info"
26+
publish_dir_mode = 'copy'
27+
email = null
28+
email_on_fail = null
29+
plaintext_email = false
30+
monochrome_logs = false
31+
hook_url = null
32+
help = false
33+
version = false
34+
validate_params = true
35+
show_hidden_params = false
36+
schema_ignore_params = 'genomes,igenomes_base'
3637

3738
// Config options
38-
custom_config_version = 'master'
39-
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
40-
config_profile_description = null
41-
config_profile_contact = null
42-
config_profile_url = null
43-
config_profile_name = null
39+
custom_config_version = 'master'
40+
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
41+
config_profile_description = null
42+
config_profile_contact = null
43+
config_profile_url = null
44+
config_profile_name = null
4445

4546
// Max resource options
4647
// Defaults only, expecting to be overwritten
47-
max_memory = '128.GB'
48-
max_cpus = 16
49-
max_time = '240.h'
48+
max_memory = '128.GB'
49+
max_cpus = 16
50+
max_time = '240.h'
5051

5152
}
5253

@@ -176,7 +177,7 @@ manifest {
176177
description = """Pipeline to fetch metadata and raw FastQ files from public databases"""
177178
mainScript = 'main.nf'
178179
nextflowVersion = '!>=22.10.1'
179-
version = '1.9dev'
180+
version = '1.9'
180181
doi = 'https://doi.org/10.5281/zenodo.5070524'
181182
}
182183

nextflow_schema.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,15 @@
4343
"nf_core_pipeline": {
4444
"type": "string",
4545
"fa_icon": "fab fa-apple",
46-
"description": "Name of supported nf-core pipeline e.g. 'rnaseq'. A samplesheet for direct use with the pipeline will be created with the appropriate columns.",
47-
"enum": ["rnaseq", "viralrecon", "taxprofiler"]
46+
"description": "Name of supported nf-core pipeline e.g. 'rnaseq'. A samplesheet for direct use with the pipeline will be created with the appropriate columns.",
47+
"enum": ["rnaseq", "atacseq", "viralrecon", "taxprofiler"]
48+
},
49+
"nf_core_rnaseq_strandedness": {
50+
"type": "string",
51+
"fa_icon": "fas fa-car",
52+
"description": "Value for 'strandedness' entry added to samplesheet created when using '--nf_core_pipeline rnaseq'.",
53+
"help_text": "The default is 'auto' which can be used with nf-core/rnaseq v3.10 onwards to auto-detect strandedness during the pipeline execution.",
54+
"default": "auto"
4855
},
4956
"force_sratools_download": {
5057
"type": "boolean",

workflows/sra.nf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ workflow SRA {
138138
SRA_TO_SAMPLESHEET (
139139
ch_sra_metadata,
140140
params.nf_core_pipeline ?: '',
141+
params.nf_core_rnaseq_strandedness ?: 'auto',
141142
params.sample_mapping_fields
142143
)
143144

workflows/synapse.nf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ workflow SYNAPSE {
115115
//
116116
SYNAPSE_TO_SAMPLESHEET (
117117
ch_fastq,
118-
params.nf_core_pipeline ?: ''
118+
params.nf_core_pipeline ?: '',
119+
params.nf_core_rnaseq_strandedness ?: 'auto'
119120
)
120121

121122
//

0 commit comments

Comments
 (0)