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

Translation for array of array of file #67

Open
junyk opened this issue Feb 16, 2021 · 3 comments
Open

Translation for array of array of file #67

junyk opened this issue Feb 16, 2021 · 3 comments

Comments

@junyk
Copy link
Member

junyk commented Feb 16, 2021

For some Bioinformatics tool, we may want to pass more than one pair of FASTQ files.
In Janis, it is declared like this:

ToolInput(
    "readFilesIn",
    Array(FastqGzPair(optional=True)),
    prefix="--readFilesIn"
)

In wdl, this input was translated into:

 Array[Array[File]] reads

The command argument looked like this:

 ~{if length(reads) > 0 then sep(" ", reads) else ""}

When running this, cromwell threw the following errors:

Cannot invoke 'sep' on type 'Array[Array[_]]'. Expected an Array[String]
@junyk
Copy link
Member Author

junyk commented Feb 16, 2021

Hi @illusional, just want to double check that this is something we have not implemented yet (or could it be just incorrect Janis syntax in declaring the ToolInput). Thanks!

@illusional
Copy link
Member

illusional commented Feb 16, 2021

Hey @junyk, the closest think you can do is .flatten() the input selector and then .join('separator'). In CWL you could implement a JS .map(el => func), and this is a relevant issue for WDL: openwdl/wdl#203

@junyk
Copy link
Member Author

junyk commented Feb 16, 2021

@illusional Good tip. Thanks Michael! : )

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

2 participants