nextflow-io / nf-prov

Apache License 2.0
23 stars 11 forks source link

Add Workflow Run RO-crate format #19

Open bentsherman opened 10 months ago

bentsherman commented 10 months ago

Close #6

cc @stain @simleo

Happy to receive any feedback, it's far from complete but wanted to share what I have so far.

simleo commented 10 months ago

I've built the plugin and ran:

nextflow run tests/test.nf

with the following (top level) nextflow.config:

plugins {
    id 'nf-prov'
}

params {
    outdir = 'results'
}

prov {
    enabled = true
    formats {
        wrroc {
            file = "${params.outdir}/ro-crate-metadata.json"
            overwrite = true
        }
    }
}

And got this ro-crate-metadata.json. For a first commit it's looking pretty good already! Runcrate reads the resulting ro-crate (runcrate report results) and does not break. However, there are several issues. Here is a list of what I've found:

I know next to nothing about Nextflow, but my impression is that the outputs are copied to the results directory because of the line:

    publishDir "results", mode: 'copy'

However, to export as RO-Crate, the relevant files (input, output, workflow, ...) should always be inside the crate's directory tree. This should not depend on the specific workflow, so the plugin needs to take care of this.

stain commented 4 months ago

Hi, let us know if you would like some help looking at this.

bentsherman commented 4 months ago

Thank you guys for your feedback. It's exactly what I needed to make sure I'm going in the right direction

I thought I was going to get to this sooner which is why I didn't respond at the time, but that never happened. Sorry for the radio silence

I've been too busy with other priorities to put any time into this, so this will likely not move until I get some free time or someone else picks it up. If you know anyone who would like to work on it, I would be happy to work with them

I believe there is also a parallel effort to implement the workflow run crate in the nf-core tooling, might be worth checking in on them

stain commented 3 months ago

See also https://github.com/nf-core/tools/pull/2680

@fbartusch may be able to have a look at this

fbartusch commented 2 months ago

I worked on most issues @simleo pointed out. @bentsherman How can I add my changes to this pull request? Can you somehow give me the permission to commit my changes to the PR?

bentsherman commented 2 months ago

@fbartusch I suggest that you fork the repo, push a new branch with your changes, then you should be able to make a PR for it.

fbartusch commented 2 months ago

@fbartusch I suggest that you fork the repo, push a new branch with your changes, then you should be able to make a PR for it.

@bentsherman I created a PR: https://github.com/nextflow-io/nf-prov/pull/33 @simleo: I think i fixed most of the issues you mentioned here: https://github.com/nextflow-io/nf-prov/pull/19#issuecomment-1775410835). Can you check if information for a valid Workflow Run RO-crate is still missing?

simleo commented 2 months ago

@fbartusch I've posted my comment on #33