Skip to content

Commit

Permalink
prepare to use workflow publish
Browse files Browse the repository at this point in the history
without output {}, nothing is publishded (see
nextflow-io/nextflow#5460 )

if output block is defined, nextflow errors out with
unclear error. leaving like this for now.
  • Loading branch information
alpae committed Dec 18, 2024
1 parent 6b77e7a commit 708fdc7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 24 deletions.
58 changes: 35 additions & 23 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,44 @@ workflow OMA_browser_build {
def vps_base = params.pairwise_orthologs_folder
OMA_BROWSER_BUILD(genomes_dir, matrix_file, hog_orthoxml, vps_base)

publish:
OMA_BROWSER_BUILD.out.db >> "main_db"
OMA_BROWSER_BUILD.out.seqidx_h5 >> "data"
emit:
db = OMA_BROWSER_BUILD.out.db
seqidx = OMA_BROWSER_BUILD.out.seqidx_h5
downloads = OMA_BROWSER_BUILD.out.downloads
}

output {
'main_db' {
path { db ->
{ file -> "data/OmaServer.h5" }
}
}
workflow {
main:
OMA_browser_build()

publish:
OMA_browser_build.out.db >> 'main_db'
OMA_browser_build.out.seqidx >> 'data'
OMA_browser_build.out.downloads >> 'downloads'

'data' { mode 'copy'}
}

workflow {
OMA_browser_build()

workflow.onComplete {
println "Pipeline completed at: ${workflow.complete}"
println "Time to complete workflow execution: ${workflow.duration}"
println "Execution status: ${workflow.success ? 'Successful' : 'Failed'}"
println "Reports stored in ${params.outputDir}/reports/nextflow"
}

workflow.onError {
println "Error... Pipeline execution stopped with the following message: $workflow.errorMessage"
}
workflow.onComplete {
println "Pipeline completed at: ${workflow.complete}"
println "Time to complete workflow execution: ${workflow.duration}"
println "Execution status: ${workflow.success ? 'Successful' : 'Failed'}"
println "Reports stored in ${params.outputDir}/reports/nextflow"
}

workflow.onError {
println "Error... Pipeline execution stopped with the following message: $workflow.errorMessage"
}


//output {
// main_db {
// path { db ->
// { file -> "data/OmaServer.h5" }
// }
// }
//
// data { mode 'copy' }
// downloads { mode 'copy' }
//}


2 changes: 2 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
nextflow.enable.moduleBinaries = true // Enables the use of modules with binary scripts
nextflow.preview.output = true // Enables publish/output section for workflows

outputDir = "./res-new"

// Global default params
params {
// input output parameters
Expand Down
3 changes: 2 additions & 1 deletion workflows/oma_browser_build.nf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ workflow OMA_BROWSER_BUILD {
}
CACHE_BUILDER(IMPORT_HDF5.out.db_h5)
GEN_BROWSER_AUX_FILES(IMPORT_HDF5.out.db_h5)
download_files = GEN_BROWSER_AUX_FILES.out.genomes_json.mix(GEN_BROWSER_AUX_FILES.out.speciestree)

// create crossreferences
GENERATE_XREFS(EXTRACT_DARWIN.out.gs_file,
Expand Down Expand Up @@ -66,7 +67,7 @@ workflow OMA_BROWSER_BUILD {
emit:
db = COMBINE_HDF.out.combined_h5
seqidx_h5 = IMPORT_HDF5.out.seqidx_h5

downloads = download_files

}

Expand Down

0 comments on commit 708fdc7

Please sign in to comment.