You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
convert to WDL: force co-localization of secondary_files #90
@illusional Huh, I'm not seeing that behaviour for either a single File input with a secondary file specifier, nor an array of Files with a secondary file specifier:
from datetime import datetime
from typing import List, Optional, Dict, Any
from janis_core import *
from janis_core.types.common_data_types import GenericFileWithSecondaries, File
Secondary_Files_V0_1_0 = CommandToolBuilder(tool="secondary_files", base_command=None, inputs=[ToolInput(tag="inp", input_type=GenericFileWithSecondaries(secondaries=["^.tar"]), doc=InputDocumentation(doc=None))], outputs=[ToolOutput(tag="outp", output_type=File(), selector=WildcardSelector(wildcard="lsout"), doc=OutputDocumentation(doc=None))], container="ubuntu:latest", version="v0.1.0", arguments=[ToolArgument(value="ls | grep -v lsout", position=None, doc=InputDocumentation(doc=None), shell_quote=False)])
if __name__ == "__main__":
# or "cwl"
Secondary_Files_V0_1_0().translate("wdl")
$ janis translate secondary_files_v0_1_0.py wdl -o .
2021-08-29T11:13:34 [INFO]: The command tool ({'tool': CommandTool<secondary_files>, 'toolid': 'secondary_files'}).outp' used a star-bind (*) glob to find the output, but the return type was not an array. For WDL, the first element will be used, ie: 'glob("lsout")[0]'
$ janisdk fromcwl array_secondary_files.cwl -o .
$ janis translate array_secondary_files_v0_1_0.py wdl -o .
2021-08-29T11:09:55 [INFO]: The command tool ({'tool': CommandTool<array_secondary_files>, 'toolid': 'array_secondary_files'}).outp' used a star-bind (*) glob to find the output, but the return type was not an array. For WDL, the first element will be used, ie: 'glob("lsout")[0]'
Activity
illusional commentedon Aug 27, 2021
Thanks @mr-c, Janis should already do this on translation to WDL:
janis-core/janis_core/translations/wdl.py
Line 2079 in 0b5b79f
(Because I saw the same problems haha)
mr-c commentedon Aug 29, 2021
@illusional Huh, I'm not seeing that behaviour for either a single
Fileinput with a secondary file specifier, nor an array ofFiles with a secondary file specifier: