Print workflow outputs on run completion#6875
Conversation
✅ Deploy Preview for nextflow-docs-staging canceled.
|
d9fa5cd to
d752bc2
Compare
|
This could be useful in several scenarios. Could not make sense to print it by default in human readable manner and use an output format flag to switch to json, similarly to module run? |
|
Yes I would be happy to always print something for the output. The |
|
@jorgee if I add an |
This will fit perfect for module run. |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
142f8dd to
31e5f90
Compare
-print-output option to print workflow outputs JSON|
Updated to print human-readable output by default.
|
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
|
Refining the output: Outputs:
/home/bent/projects/nextflow-io/nextflow/tests/checks/output-dsl.nf/results
samples:
- {id: sample9, fastqc: log/sample9.fastqc.log, bam: null, bai: null, quant: quant/sample9}
- {id: sample4, fastqc: log/sample4.fastqc.log, bam: null, bai: null, quant: quant/sample4}
- {id: sample5, fastqc: log/sample5.fastqc.log, bam: null, bai: null, quant: quant/sample5}
- {id: sample15, fastqc: log/sample15.fastqc.log, bam: null, bai: null, quant: quant/sample15}
- {id: sample8, fastqc: log/sample8.fastqc.log, bam: null, bai: null, quant: quant/sample8}
- {id: sample11, fastqc: log/sample11.fastqc.log, bam: null, bai: null, quant: quant/sample11}
- {id: sample1, fastqc: log/sample1.fastqc.log, bam: null, bai: null, quant: quant/sample1}
- {id: sample14, fastqc: log/sample14.fastqc.log, bam: null, bai: null, quant: quant/sample14}
- {id: sample6, fastqc: log/sample6.fastqc.log, bam: null, bai: null, quant: quant/sample6}
- {id: sample3, fastqc: log/sample3.fastqc.log, bam: null, bai: null, quant: quant/sample3}
- ... (90 more items)
summary:
- summary_report.html
- summary_data/data.json
- summary_data/fastqc.txt |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
|
it looks nice! is it aligned with modules output? or the other way around? |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
|
It is now 😄 $ nextflow -q module run test/my-test-module --meta.id 42 --id 42 --text input.txt --reads sample.fastq
Outputs:
/home/bent/projects/sketches/module-system-example/results
txt:
- {id: '42'}
- out-42.txt
id: '42'
$ nextflow -q module run test/my-test-module --meta.id 42 --id 42 --text input.txt --reads sample.fastq -output-format json
{
"txt": [
{
"id": "42"
},
"/home/bent/projects/sketches/module-system-example/results/out-42.txt"
],
"id": "42"
} |
|
Cool, i'll play hard with modules this w-e |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Spun off from #6574
This PR updates OutputDsl to print the workflow outputs at the end of a run.
By default it prints a human-readable summary. You can set
-output-format jsonto output JSON instead.It has no effect when there is no output block
When combined with
-q, it is useful for printing a comprehensive pipeline output that can be passed to downstream operations