diff --git a/README.md b/README.md index fcdd3ce..f54169d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # nf-prov -Nextflow plugin to render provenance reports for pipeline runs. Now supporting [BioCompute Objects](https://biocomputeobject.org/)! +Nextflow plugin to render provenance reports for pipeline runs. Now supporting [BioCompute Object](https://biocomputeobject.org/)! ## Getting Started @@ -95,6 +95,17 @@ mv -f settings.gradle.bkp settings.gradle ./launch.sh run test.nf -plugins nf-prov ``` +An alternative method to build and test the plugin for development purposes: + +```bash +# builds the plugin .zip and copies it to the local ${HOME}/.nextflow/plugins, +# removing any pre-existing version +make install + +# run with an externally installed nextflow using the included test workflow & config +nextflow run tests/test.nf +``` + ## Package, Upload, and Publish The project should hosted in a GitHub repository whose name should match the name of the plugin, @@ -122,6 +133,6 @@ Following these step to package, upload and publish the plugin: ./gradlew :plugins:nf-prov:upload ``` -4. Create a pull request against the [nextflow-io/plugins](https://github.com/nextflow-io/plugins/blob/main/plugins.json) - project to make the plugin public accessible to Nextflow app. +4. Create a pull request against the [nextflow-io/plugins](https://github.com/nextflow-io/plugins/blob/main/plugins.json) + project to make the plugin public accessible to Nextflow app. diff --git a/nextflow.config b/nextflow.config deleted file mode 100644 index 6219b1b..0000000 --- a/nextflow.config +++ /dev/null @@ -1,24 +0,0 @@ -plugins { - id 'nf-prov' -} - -params { - outdir = 'results' -} - -prov { - formats { - bco { - file = "${params.outdir}/bco.json" - overwrite = true - } - dag { - file = "${params.outdir}/dag.html" - overwrite = true - } - legacy { - file = "${params.outdir}/manifest.json" - overwrite = true - } - } -} diff --git a/tests/nextflow.config b/tests/nextflow.config index 3044716..c18d0bb 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -1,3 +1,29 @@ +plugins { + id 'nf-prov' +} + +params { + outdir = "results" + constant = "foo" +} + +prov { + formats { + bco { + file = "${params.outdir}/bco.json" + overwrite = true + } + dag { + file = "${params.outdir}/dag.html" + overwrite = true + } + legacy { + file = "${params.outdir}/manifest.json" + overwrite = true + } + } +} + manifest { name = "nf-prov-test" author = "Bruno Grande" diff --git a/tests/test.nf b/tests/test.nf index 4e050cd..dc3d37a 100644 --- a/tests/test.nf +++ b/tests/test.nf @@ -1,10 +1,8 @@ nextflow.enable.dsl=2 -params.constant = "foo" - process RNG { - - publishDir "results", mode: 'copy' + tag "${prefix}" + publishDir "${params.outdir}", mode: 'copy' input: tuple val(prefix), val(constant) @@ -21,10 +19,27 @@ process RNG { } +// shows nf-prov behavior with exec tasks +process EXEC_FOO { + tag "${prefix}" + publishDir "${params.outdir}", mode: 'copy' + + input: + tuple val(prefix), val(constant) + + output: + path(outputfile), emit: "txt" + + exec: + outputfile = task.workDir.resolve("${prefix}.exec_foo.txt") + outputfile.write(prefix) +} + workflow { prefixes_ch = channel.from('r1', 'r2', 'r3') constant_ch = channel.of(params.constant) inputs_ch = prefixes_ch.combine(constant_ch) RNG(inputs_ch) RNG.output.values.view() + EXEC_FOO(inputs_ch) }