Skip to content

Commit 818a962

Browse files
committed
updating
1 parent e3120bc commit 818a962

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

workflow/workflow.nf

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,23 @@ params.extractnaming = 'condensed' //condensed means it is mangled, original mea
1010
params.maxfilesize = "3000" // Default 3000 MB
1111

1212
TOOL_FOLDER = "$baseDir/bin"
13-
params.publishdir = "nf_output"
13+
params.publishdir = "$launchDir"
1414
params.PYTHONRUNTIME = "python" // this is a hack because CCMS cluster does not have python installed
1515

16+
17+
// COMPATIBILITY NOTE: The following might be necessary if this workflow is being deployed in a slightly different environemnt
18+
// checking if outdir is defined,
19+
// if so, then set publishdir to outdir
20+
if (params.outdir) {
21+
_publishdir = params.outdir
22+
}
23+
else{
24+
_publishdir = params.publishdir
25+
}
26+
27+
// Augmenting with nf_output
28+
_publishdir = "${_publishdir}/nf_output"
29+
1630
// This is the parallel run that will run on the cluster
1731
process queryData {
1832
errorStrategy 'ignore'
@@ -77,7 +91,7 @@ process queryData2 {
7791

7892
// Merging the results, 100 results at a time, and then doing a full merge
7993
process formatResultsMergeRounds {
80-
publishDir "$params.publishdir/msql", mode: 'copy'
94+
publishDir "$_publishdir/msql", mode: 'copy'
8195
cache false
8296

8397
//errorStrategy 'ignore'
@@ -102,7 +116,7 @@ process formatResultsMergeRounds {
102116

103117
// Merging the JSON in rounds, 100 files at a time
104118
process formatExtractedSpectraRounds {
105-
publishDir "$params.publishdir/extracted", mode: 'copy'
119+
publishDir "$_publishdir/extracted", mode: 'copy'
106120
cache false
107121
errorStrategy 'ignore'
108122

@@ -183,7 +197,7 @@ process formatExtractedSpectraRounds {
183197

184198

185199
process summarizeResults {
186-
publishDir "$params.publishdir/summary", mode: 'copy'
200+
publishDir "$_publishdir/summary", mode: 'copy'
187201
cache false
188202
errorStrategy 'ignore'
189203

@@ -227,14 +241,14 @@ workflow {
227241

228242
_merged_temp_summary_ch = formatResultsMergeRounds(_query_results_ch.collate( 100 ))
229243

230-
_query_results_merged_ch = _merged_temp_summary_ch.collectFile(name: "merged_query_results.tsv", storeDir: "$params.publishdir/msql", keepHeader: true)
244+
_query_results_merged_ch = _merged_temp_summary_ch.collectFile(name: "merged_query_results.tsv", storeDir: "$_publishdir/msql", keepHeader: true)
231245

232246

233247
if(params.extract == "YES"){
234248
(_, _, _, _extracted_summary_ch) = formatExtractedSpectraRounds(_query_extract_results_ch.collate( 100 ))
235249

236250
// Once we've done this, then we'lll do the actual merge
237-
_extracted_summary_ch.collectFile(name: "extracted.tsv", storeDir: "$params.publishdir/extracted", keepHeader: true)
251+
_extracted_summary_ch.collectFile(name: "extracted.tsv", storeDir: "$_publishdir/extracted", keepHeader: true)
238252
}
239253

240254
summarizeResults(_query_results_merged_ch)

workflow/workflowdisplay.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Views:
2424
data: mslevel
2525
- title: "query_index"
2626
data: query_index
27-
columnDefs: '[ {"targets": 0,"data": null,"render": function ( data, type, row, meta ) {
28-
return `
29-
<a target="_blank" href="/dashboards/lcms?usi=mzspec:GNPS2-${task}-${encodeURIComponent(row["filename"])}">None</a>
30-
`;}}]'
27+
# columnDefs: '[ {"targets": 0,"data": null,"render": function ( data, type, row, meta ) {
28+
# return `
29+
# <a target="_blank" href="/dashboards/lcms?usi=mzspec:GNPS2-${task}-${encodeURIComponent(row["filename"])}">None</a>
30+
# `;}}]'
3131

3232
# TODO: Show the extraction results
3333

workflow/workflowinput.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
workflowname: massql_workflow
22
workflowdescription: massql_workflow
33
workflowlongdescription: This is a MassQL Workflow
4-
workflowversion: "2025.08.08"
4+
workflowversion: "2025.08.15"
55
workflowfile: workflow.nf
66
workflowautohide: false
77
adminonly: false

0 commit comments

Comments
 (0)