Skip to content

Commit e231431

Browse files
authored
Merge pull request #209 from drpatelh/fixes
Minor pre-release tweaks and bug fixes
2 parents 1436b69 + ec4c8fe commit e231431

File tree

10 files changed

+59
-43
lines changed

10 files changed

+59
-43
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,29 @@ Special thanks to the following for their contributions to the release:
1212
- [Adam Talbot](https://github.com/adamrtalbot)
1313
- [Harshil Patel](https://github.com/drpatelh)
1414
- [Maxime Garcia](https://github.com/maxulysse)
15+
- [Rob Syme](https://github.com/robsyme)
1516

1617
Thank you to everyone else that has contributed by reporting bugs, enhancements or in any other way, shape or form.
1718

1819
### Enhancements & fixes
1920

21+
- [#173](https://github.com/nf-core/fetchngs/issues/173) - Add compatibility for sralite files
2022
- [PR #205](https://github.com/nf-core/fetchngs/pull/205) - Rename all local modules, workflows and remove `public_aws_ecr profile`
2123
- [PR #206](https://github.com/nf-core/fetchngs/pull/206) - CI improvments and code cleanup
2224
- [PR #208](https://github.com/nf-core/fetchngs/pull/208) - Template update with nf-core/tools 2.10
2325

26+
### Software dependencies
27+
28+
| Dependency | Old version | New version |
29+
| ----------- | ----------- | ----------- |
30+
| `sra-tools` | 2.11.0 | 3.0.8 |
31+
32+
> **NB:** Dependency has been **updated** if both old and new version information is present.
33+
>
34+
> **NB:** Dependency has been **added** if just the new version information is present.
35+
>
36+
> **NB:** Dependency has been **removed** if new version information isn't present.
37+
2438
## [[1.10.0](https://github.com/nf-core/fetchngs/releases/tag/1.10.0)] - 2023-05-16
2539

2640
### Credits

lib/WorkflowSra.groovy

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ class WorkflowSra {
99
//
1010
// Check and validate parameters
1111
//
12-
public static void initialise(params, valid_params) {
12+
public static void initialise(params) {
1313
// Check minimal ENA fields are provided to download FastQ files
14-
def ena_metadata_fields = params.ena_metadata_fields ? params.ena_metadata_fields.split(',').collect{ it.trim().toLowerCase() } : valid_params['ena_metadata_fields']
15-
if (!ena_metadata_fields.containsAll(valid_params['ena_metadata_fields'])) {
16-
Nextflow.error("Invalid option: '${params.ena_metadata_fields}'. Minimally required fields for '--ena_metadata_fields': '${valid_params['ena_metadata_fields'].join(',')}'")
14+
def valid_ena_metadata_fields = ['run_accession', 'experiment_accession', 'library_layout', 'fastq_ftp', 'fastq_md5']
15+
def ena_metadata_fields = params.ena_metadata_fields ? params.ena_metadata_fields.split(',').collect{ it.trim().toLowerCase() } : valid_ena_metadata_fields
16+
if (!ena_metadata_fields.containsAll(valid_ena_metadata_fields)) {
17+
Nextflow.error("Invalid option: '${params.ena_metadata_fields}'. Minimally required fields for '--ena_metadata_fields': '${valid_ena_metadata_fields.join(',')}'")
1718
}
1819
}
1920

main.nf

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,25 @@ nextflow.enable.dsl = 2
1919

2020
include { paramsHelp; paramsSummaryLog; validateParameters } from 'plugin/nf-validation'
2121

22+
// Print parameter summary log to screen
2223
def logo = NfcoreTemplate.logo(workflow, params.monochrome_logs)
2324
def citation = '\n' + WorkflowMain.citation(workflow) + '\n'
24-
25-
// Print parameter summary log to screen
26-
log.info logo + paramsSummaryLog(workflow) + citation
27-
28-
// Print help message if needed
25+
def String command = "nextflow run ${workflow.manifest.name} --input id.csv -profile docker"
2926
if (params.help) {
30-
def String command = "nextflow run ${workflow.manifest.name} --input id.csv -profile docker"
3127
log.info logo + paramsHelp(command) + citation + NfcoreTemplate.dashedLine(params.monochrome_logs)
3228
System.exit(0)
33-
}
34-
35-
// Validate input parameters
36-
if (params.validate_params) {
37-
validateParameters()
29+
} else {
30+
log.info logo + paramsSummaryLog(workflow) + citation + NfcoreTemplate.dashedLine(params.monochrome_logs)
3831
}
3932

4033
// Check if --input file is empty
4134
ch_input = file(params.input, checkIfExists: true)
4235
if (ch_input.isEmpty()) { error("File provided with --input is empty: ${ch_input.getName()}!") }
4336

44-
// Read in ids from --input file
45-
Channel
46-
.from(file(params.input, checkIfExists: true))
47-
.splitCsv(header:false, sep:'', strip:true)
48-
.map { it[0] }
49-
.unique()
50-
.set { ch_ids }
37+
// Validate input parameters
38+
if (params.validate_params) {
39+
validateParameters()
40+
}
5141

5242
// Auto-detect input id type
5343
def input_type = ''
@@ -58,10 +48,19 @@ if (WorkflowMain.isSraId(ch_input)) {
5848
} else {
5949
error('Ids provided via --input not recognised please make sure they are either SRA / ENA / GEO / DDBJ or Synapse ids!')
6050
}
51+
6152
if (params.input_type != input_type) {
6253
error("Ids auto-detected as ${input_type}. Please provide '--input_type ${input_type}' as a parameter to the pipeline!")
6354
}
6455

56+
// Read in ids from --input file
57+
Channel
58+
.from(file(params.input, checkIfExists: true))
59+
.splitCsv(header:false, sep:'', strip:true)
60+
.map { it[0] }
61+
.unique()
62+
.set { ch_ids }
63+
6564
/*
6665
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6766
IMPORT WORKFLOWS
@@ -71,6 +70,12 @@ if (params.input_type != input_type) {
7170
if (params.input_type == 'sra') include { SRA } from './workflows/sra'
7271
if (params.input_type == 'synapse') include { SYNAPSE } from './workflows/synapse'
7372

73+
/*
74+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75+
NAMED WORKFLOWS FOR PIPELINE
76+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77+
*/
78+
7479
//
7580
// WORKFLOW: Run main nf-core/fetchngs analysis pipeline depending on type of identifier provided
7681
//

modules.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
},
1818
"sratools/fasterqdump": {
1919
"branch": "master",
20-
"git_sha": "6712754854ae2832abfff3f0800cdb4a6a60bfca",
20+
"git_sha": "4d9951c6c9c4c19ea944bb73149caf9d3cb1f2fc",
2121
"installed_by": ["fastq_download_prefetch_fasterqdump_sratools"]
2222
},
2323
"sratools/prefetch": {
2424
"branch": "master",
25-
"git_sha": "6712754854ae2832abfff3f0800cdb4a6a60bfca",
25+
"git_sha": "4d9951c6c9c4c19ea944bb73149caf9d3cb1f2fc",
2626
"installed_by": ["fastq_download_prefetch_fasterqdump_sratools"]
2727
}
2828
}
@@ -31,7 +31,7 @@
3131
"nf-core": {
3232
"fastq_download_prefetch_fasterqdump_sratools": {
3333
"branch": "master",
34-
"git_sha": "6712754854ae2832abfff3f0800cdb4a6a60bfca",
34+
"git_sha": "dedc0e31087f3306101c38835d051bf49789445a",
3535
"installed_by": ["subworkflows"]
3636
}
3737
}

modules/nf-core/sratools/fasterqdump/main.nf

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/sratools/prefetch/main.nf

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/nf-core/sratools/prefetch/templates/retry_with_backoff.sh

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/meta.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

workflows/sra/main.nf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
*/
66

7-
include { paramsSummaryLog; paramsSummaryMap } from 'plugin/nf-validation'
7+
include { paramsSummaryMap } from 'plugin/nf-validation'
88

9-
def logo = NfcoreTemplate.logo(workflow, params.monochrome_logs)
10-
def citation = '\n' + WorkflowMain.citation(workflow) + '\n'
119
def summary_params = paramsSummaryMap(workflow)
1210

13-
// Print parameter summary log to screen
14-
log.info logo + paramsSummaryLog(workflow) + citation
11+
WorkflowSra.initialise(params)
1512

1613
/*
1714
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -33,7 +30,6 @@ include { MULTIQC_MAPPINGS_CONFIG } from '../../modules/local/multiqc_mappings_c
3330
*/
3431

3532
include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../../modules/nf-core/custom/dumpsoftwareversions/main'
36-
3733
include { FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS } from '../../subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/main'
3834

3935
/*

workflows/synapse/main.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
*/
66

7-
def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params)
7+
include { paramsSummaryMap } from 'plugin/nf-validation'
8+
9+
def summary_params = paramsSummaryMap(workflow)
810

911
// Create channel for synapse config
1012
if (params.synapse_config) {

0 commit comments

Comments
 (0)