@@ -24,7 +24,6 @@ include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin'
2424*/
2525
2626workflow PIPELINE_INITIALISATION {
27-
2827 take :
2928 version // boolean: Display version and exit
3029 validate_params // boolean: Boolean whether to validate parameters against the schema at runtime
@@ -58,7 +57,7 @@ workflow PIPELINE_INITIALISATION {
5857 //
5958 // Check config provided to the pipeline
6059 //
61- UTILS_NFCORE_PIPELINE (
60+ UTILS_NFCORE_PIPELINE (
6261 nextflow_cli_args
6362 )
6463
@@ -68,14 +67,14 @@ workflow PIPELINE_INITIALISATION {
6867 ch_input = file(input)
6968 if (isSraId(ch_input)) {
7069 sraCheckENAMetadataFields(ena_metadata_fields)
71- } else {
70+ }
71+ else {
7272 error(' Ids provided via --input not recognised please make sure they are either SRA / ENA / GEO / DDBJ ids!' )
7373 }
7474
7575 // Read in ids from --input file
76- Channel
77- .from(ch_input)
78- .splitCsv(header :false , sep :' ' , strip :true )
76+ Channel . from(ch_input)
77+ .splitCsv(header : false , sep : ' ' , strip : true )
7978 .map { it[0 ] }
8079 .unique()
8180 .set { ch_ids }
@@ -91,7 +90,6 @@ workflow PIPELINE_INITIALISATION {
9190*/
9291
9392workflow PIPELINE_COMPLETION {
94-
9593 take :
9694 email // string: email address
9795 email_on_fail // string: email address sent on pipeline failure
@@ -115,7 +113,7 @@ workflow PIPELINE_COMPLETION {
115113 plaintext_email,
116114 outdir,
117115 monochrome_logs,
118- []
116+ [],
119117 )
120118 }
121119
@@ -128,7 +126,7 @@ workflow PIPELINE_COMPLETION {
128126 }
129127
130128 workflow. onError {
131- log. error " Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting"
129+ log. error( " Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting" )
132130 }
133131}
134132
@@ -157,7 +155,8 @@ def isSraId(input) {
157155 if (num_match > 0 ) {
158156 if (num_match == total_ids) {
159157 is_sra = true
160- } else {
158+ }
159+ else {
161160 error(" Mixture of ids provided via --input: ${ no_match_ids.join(', ')} \n Please provide either SRA / ENA / GEO / DDBJ ids!" )
162161 }
163162 }
@@ -170,7 +169,7 @@ def isSraId(input) {
170169def sraCheckENAMetadataFields(ena_metadata_fields) {
171170 // Check minimal ENA fields are provided to download FastQ files
172171 def valid_ena_metadata_fields = [' run_accession' , ' experiment_accession' , ' library_layout' , ' fastq_ftp' , ' fastq_md5' ]
173- def actual_ena_metadata_fields = ena_metadata_fields ? ena_metadata_fields. split(' ,' ). collect{ it. trim(). toLowerCase() } : valid_ena_metadata_fields
172+ def actual_ena_metadata_fields = ena_metadata_fields ? ena_metadata_fields. split(' ,' ). collect { it. trim(). toLowerCase() } : valid_ena_metadata_fields
174173 if (! actual_ena_metadata_fields. containsAll(valid_ena_metadata_fields)) {
175174 error(" Invalid option: '${ ena_metadata_fields} '. Minimally required fields for '--ena_metadata_fields': '${ valid_ena_metadata_fields.join(',')} '" )
176175 }
@@ -179,12 +178,16 @@ def sraCheckENAMetadataFields(ena_metadata_fields) {
179178// Print a warning after pipeline has completed
180179//
181180def sraCurateSamplesheetWarn() {
182- log. warn " =============================================================================\n " +
183- " Please double-check the samplesheet that has been auto-created by the pipeline.\n\n " +
184- " Public databases don't reliably hold information such as strandedness\n " +
185- " information, controls etc\n\n " +
186- " All of the sample metadata obtained from the ENA has been appended\n " +
187- " as additional columns to help you manually curate the samplesheet before\n " +
188- " running nf-core/other pipelines.\n " +
189- " ==================================================================================="
181+ log. warn(
182+ """ =============================================================================
183+ Please double-check the samplesheet that has been auto-created by the pipeline.
184+
185+ Public databases don't reliably hold information such as strandedness
186+ information, controls etc
187+
188+ All of the sample metadata obtained from the ENA has been appended
189+ as additional columns to help you manually curate the samplesheet before
190+ running nf-core/other pipelines.
191+ ============================================================================="""
192+ )
190193}
0 commit comments