@@ -53,9 +53,9 @@ if (params.help) {
5353}
5454
5555/*
56- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5757 IMPORT MODULES/SUBWORKFLOWS
58- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5959*/
6060
6161include { RESOLVI_PREPROCESS } from ' ./modules/local/resolvi_preprocess'
@@ -85,8 +85,6 @@ if (workflow.profile.contains('awsbatch')) {
8585}
8686
8787// Stage config files
88- ch_multiqc_config = file(" $baseDir /assets/multiqc_config.yaml" , checkIfExists : true )
89- ch_multiqc_custom_config = params. multiqc_config ? Channel . fromPath(params. multiqc_config, checkIfExists : true ) : Channel . empty()
9088ch_output_docs = file(" $baseDir /docs/output.md" , checkIfExists : true )
9189
9290/*
@@ -156,26 +154,10 @@ log.info "-\033[2m--------------------------------------------------\033[0m-"
156154// Check the hostnames against configured profiles
157155checkHostname()
158156
159- Channel . from(summary. collect{ [it. key, it. value] })
160- .map { k,v -> " <dt>$k </dt><dd><samp>${ v ?: '<span style=\"color:#999999;\">N/A</a>'} </samp></dd>" }
161- .reduce { a, b -> return [a, b]. join(" \n " ) }
162- .map { x -> """
163- id: 'nf-core-resolvinf-summary'
164- description: " - this information is collected when the pipeline is started."
165- section_name: 'nf-core/resolvinf Workflow Summary'
166- section_href: 'https://github.com/nf-core/resolvinf'
167- plot_type: 'html'
168- data: |
169- <dl class=\" dl-horizontal\" >
170- $x
171- </dl>
172- """ . stripIndent() }
173- .set { ch_workflow_summary }
174-
175157/*
176- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177159 MAIN WORKFLOW
178- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
179161*/
180162
181163workflow RESOLVINF {
@@ -187,7 +169,6 @@ workflow RESOLVINF {
187169 main :
188170
189171 ch_versions = Channel . empty()
190- ch_multiqc_files = Channel . empty()
191172
192173 // Preprocess spatialdata zarr stores
193174 RESOLVI_PREPROCESS (
@@ -218,15 +199,10 @@ workflow RESOLVINF {
218199 )
219200 ch_versions = ch_versions. mix(RESOLVI_VISUALIZE . out. versions. first())
220201
221- // Collect files for MultiQC
222- ch_multiqc_files = ch_multiqc_files. mix(RESOLVI_TRAIN . out. logs. collect{it[1 ]}. ifEmpty([]))
223- ch_multiqc_files = ch_multiqc_files. mix(RESOLVI_ANALYZE . out. reports. collect{it[1 ]}. ifEmpty([]))
224-
225202 emit :
226203 adata_final = RESOLVI_ANALYZE . out. adata_final
227204 model = RESOLVI_TRAIN . out. model
228205 plots = RESOLVI_VISUALIZE . out. plots
229- multiqc_files = ch_multiqc_files
230206 versions = ch_versions
231207}
232208
@@ -254,33 +230,6 @@ process get_software_versions {
254230 """
255231}
256232
257- /*
258- * MultiQC
259- */
260- process multiqc {
261- publishDir " ${ params.outdir} /MultiQC" , mode: ' copy'
262-
263- input:
264- path (multiqc_config)
265- path (mqc_custom_config)
266- path (' software_versions/*' )
267- path workflow_summary
268- path (' resolvi_logs/*' )
269-
270- output:
271- path " *multiqc_report.html" , emit: report
272- path " *_data"
273- path " multiqc_plots" , optional: true
274-
275- script:
276- rtitle = custom_runName ? " --title \" $custom_runName \" " : ' '
277- rfilename = custom_runName ? " --filename " + custom_runName. replaceAll(' \\ W' ,' _' ). replaceAll(' _+' ,' _' ) + " _multiqc_report" : ' '
278- custom_config_file = mqc_custom_config. name != ' OPTIONAL_FILE' ? " --config $mqc_custom_config " : ' '
279- """
280- multiqc -f $rtitle $rfilename $custom_config_file .
281- """
282- }
283-
284233/*
285234 * Output Description HTML
286235 */
@@ -300,9 +249,9 @@ process output_documentation {
300249}
301250
302251/*
303- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
252+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
304253 RUN MAIN WORKFLOW
305- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
254+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
306255*/
307256
308257workflow {
@@ -316,15 +265,6 @@ workflow {
316265 // Get software versions
317266 get_software_versions()
318267
319- // MultiQC
320- multiqc (
321- ch_multiqc_config,
322- ch_multiqc_custom_config. collect(). ifEmpty([]),
323- get_software_versions. out. yaml. collect(),
324- ch_workflow_summary. collectFile(name : " workflow_summary_mqc.yaml" ),
325- RESOLVINF . out. multiqc_files. collect(). ifEmpty([])
326- )
327-
328268 // Output documentation
329269 output_documentation(
330270 ch_output_docs
@@ -364,20 +304,6 @@ workflow.onComplete {
364304 email_fields[' summary' ][' Nextflow Build' ] = workflow. nextflow. build
365305 email_fields[' summary' ][' Nextflow Compile Timestamp' ] = workflow. nextflow. timestamp
366306
367- // On success try attach the multiqc report
368- def mqc_report = null
369- try {
370- if (workflow. success) {
371- mqc_report = multiqc. out. report. getVal()
372- if (mqc_report. getClass() == ArrayList ) {
373- log. warn " [nf-core/resolvinf] Found multiple reports from process 'multiqc', will use only one"
374- mqc_report = mqc_report[0 ]
375- }
376- }
377- } catch (all) {
378- log. warn " [nf-core/resolvinf] Could not attach MultiQC report to summary email"
379- }
380-
381307 // Check if we are only sending emails on failure
382308 email_address = params. email
383309 if (! params. email && params. email_on_fail && ! workflow. success) {
@@ -396,7 +322,7 @@ workflow.onComplete {
396322 def email_html = html_template. toString()
397323
398324 // Render the sendmail template
399- def smail_fields = [ email : email_address, subject : subject, email_txt : email_txt, email_html : email_html, baseDir : " $baseDir " , mqcFile : mqc_report , mqcMaxSize : params. max_multiqc_email_size ]
325+ def smail_fields = [ email : email_address, subject : subject, email_txt : email_txt, email_html : email_html, baseDir : " $baseDir " , mqcFile : null , mqcMaxSize : params. max_multiqc_email_size ]
400326 def sf = new File (" $baseDir /assets/sendmail_template.txt" )
401327 def sendmail_template = engine. createTemplate(sf). make(smail_fields)
402328 def sendmail_html = sendmail_template. toString()
@@ -487,3 +413,4 @@ def checkHostname() {
487413 }
488414 }
489415}
416+
0 commit comments