famosab / nf-prov

Apache License 2.0
0 stars 0 forks source link

Issue with `getIntermediateOutputFiles` #17

Open famosab opened 1 day ago

famosab commented 1 day ago

Now there is an error thrown (and no crate created) when trying to use the function getIntermediateOutputFiles:

Dec-03 14:13:47.950 [main] DEBUG nextflow.Session - Failed to invoke observer completion handler: nextflow.prov.ProvObserver@5f233f9
java.lang.IllegalArgumentException: 'other' is different type of Path
    at java.base/sun.nio.fs.UnixPath.relativize(UnixPath.java:406)
    at java.base/sun.nio.fs.UnixPath.relativize(UnixPath.java:51)
    at nextflow.prov.WrrocRenderer$_getIntermediateOutputFiles_closure27.doCall(WrrocRenderer.groovy:571)
    at nextflow.prov.WrrocRenderer$_getIntermediateOutputFiles_closure27.call(WrrocRenderer.groovy)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3661)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3646)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3692)
    at nextflow.prov.WrrocRenderer.getIntermediateOutputFiles(WrrocRenderer.groovy:562)
    at nextflow.prov.WrrocRenderer.render(WrrocRenderer.groovy:84)
    at nextflow.prov.ProvObserver.onFlowComplete(ProvObserver.groovy:121)
    at nextflow.Session.notifyFlowComplete(Session.groovy:1155)
    at nextflow.Session.shutdown0(Session.groovy:749)
    at nextflow.Session.destroy(Session.groovy:694)
    at nextflow.script.ScriptRunner.shutdown(ScriptRunner.groovy:260)
    at nextflow.script.ScriptRunner.execute(ScriptRunner.groovy:146)
    at nextflow.cli.CmdRun.run(CmdRun.groovy:376)
    at nextflow.cli.Launcher.run(Launcher.groovy:503)
    at nextflow.cli.Launcher.main(Launcher.groovy:658)

This seems to be the offending part in the code:

                        // Find the relative path from workdir
                        Path relativePath = workdir.relativize(taskOutputFilePath)
famosab commented 1 day ago

Adding this line of code:

                        taskOutputFilePath = taskOutputFilePath.toAbsolutePath()

                        // Find the relative path from workdir
                        Path relativePath = workdir.relativize(taskOutputFilePath)

Leads to the following statements being printed:

Failed to copy /Users/famke/04_other/BioHackathon24/testdata/Users to /Users/famke/04_other/BioHackathon24/testdata/results/work/../Users: /Users/famke/04_other/BioHackathon24/testdata/Users
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/famke to /Users/famke/04_other/BioHackathon24/testdata/results/work/../famke: /Users/famke/04_other/BioHackathon24/testdata/famke
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/04_other to /Users/famke/04_other/BioHackathon24/testdata/results/work/../04_other: /Users/famke/04_other/BioHackathon24/testdata/04_other
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/BioHackathon24 to /Users/famke/04_other/BioHackathon24/testdata/results/work/../BioHackathon24: /Users/famke/04_other/BioHackathon24/testdata/BioHackathon24
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/testdata to /Users/famke/04_other/BioHackathon24/testdata/results/work/../testdata: /Users/famke/04_other/BioHackathon24/testdata/testdata
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/5f to /Users/famke/04_other/BioHackathon24/testdata/results/work/../5f: /Users/famke/04_other/BioHackathon24/testdata/5f
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/c2fc15f2436dff14a3257a2494d68c to /Users/famke/04_other/BioHackathon24/testdata/results/work/../c2fc15f2436dff14a3257a2494d68c: /Users/famke/04_other/BioHackathon24/testdata/c2fc15f2436dff14a3257a2494d68c
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/test.fastp.json to /Users/famke/04_other/BioHackathon24/testdata/results/work/../test.fastp.json: /Users/famke/04_other/BioHackathon24/testdata/test.fastp.json
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/test.fastp.html to /Users/famke/04_other/BioHackathon24/testdata/results/work/../test.fastp.html: /Users/famke/04_other/BioHackathon24/testdata/test.fastp.html
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/test.fastp.log to /Users/famke/04_other/BioHackathon24/testdata/results/work/../test.fastp.log: /Users/famke/04_other/BioHackathon24/testdata/test.fastp.log
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/versions.yml to /Users/famke/04_other/BioHackathon24/testdata/results/work/../versions.yml: /Users/famke/04_other/BioHackathon24/testdata/versions.yml
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/6e to /Users/famke/04_other/BioHackathon24/testdata/results/work/../6e: /Users/famke/04_other/BioHackathon24/testdata/6e
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/23950aa0898d107955ab4ec9c55ce7 to /Users/famke/04_other/BioHackathon24/testdata/results/work/../23950aa0898d107955ab4ec9c55ce7: /Users/famke/04_other/BioHackathon24/testdata/23950aa0898d107955ab4ec9c55ce7
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/test.contigs.fa.gz to /Users/famke/04_other/BioHackathon24/testdata/results/work/../test.contigs.fa.gz: /Users/famke/04_other/BioHackathon24/testdata/test.contigs.fa.gz
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/intermediate_contigs to /Users/famke/04_other/BioHackathon24/testdata/results/work/../intermediate_contigs: /Users/famke/04_other/BioHackathon24/testdata/intermediate_contigs
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/k51.local.fa.gz to /Users/famke/04_other/BioHackathon24/testdata/results/work/../k51.local.fa.gz: /Users/famke/04_other/BioHackathon24/testdata/k51.local.fa.gz
Failed to copy /Users/famke/04_other/BioHackathon24/testdata/test.log to /Users/famke/04_other/BioHackathon24/testdata/results/work/../test.log: /Users/famke/04_other/BioHackathon24/testdata/test.log