Skip to content

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

@illusional

Description

@illusional

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions