Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Janis is not creating secondary output in WDL for array of outputs in tool #62

Open
illusional opened this issue Jan 29, 2021 · 0 comments

Comments

@illusional
Copy link
Member

Consider the tool with some GenericFile with secondaries [".csv"] (eg: base.txt w/ sec: base.txt.csv:

import janis_core as j

dt = j.GenericFileWithSecondaries(secondaries=[".csv"])
ToolWithSecondaryFiles = j.CommandToolBuilder(
    tool="secondary_files",
    version="v0.1.0",
    container="ubuntu:latest",
    base_command="echo",
    inputs=[
        j.ToolInput("inp", dt, position=0)
    ],
    outputs=[
        j.ToolOutput("out", j.Array(dt), selector=j.WildcardSelector("*.txt"))
    ],
)

This gives the approx WDL translation:

task secondary_files {
  input {
    File inp
    File inp_csv
  }
  command <<<
    set -e
    echo ~{inp}
  >>>
  output {
    Array[File] out = glob("*.txt")
    # Expect to see 
    # Array[File] out_csv = ...
  }
}

It's missing the output:

Array[File] out_csv = ...

This is probably pretty tricky without a map function in WDL. It might not even be strictly possible. Just thought it be better documented that this is an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant