-
Notifications
You must be signed in to change notification settings - Fork 13
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
documentation: subworkflows #13
Comments
You can add them to the registry in the exact same way as a command tool (by declaring it and importing it in the provider’s init. There’s an example here: https://github.com/PMCC-BioinformaticsCore/janis-bioinformatics/blob/master/janis_bioinformatics/tools/common/bwaaligner.py You can use them interchangeably with a command tool. Here’s an example where subworkflows are used, and also another sub workflow is declared in the method “ self.process_subpipeline”: Same if you use a workflow builder: subwf = WorkflowBuilder(...)
# build subwf here
wf = WorkflowBuilder(...)
wf.step(“subWfStepId”, subwf(**inputMap))
wf.output(‘outFromSubWf”, source=wf. subWfStepId.nameOfOutput) I’ll leave this open as I still need to document it. |
Great! Thanks for the quick reply! Cheers |
No worries! Keep feeling free to raise issues on here, very happy to answer them! It’s actually amazing that planes have WIFI. |
Talk about "over the air" updates 😉 |
Unrelated question: Practically, I need something along the lines of
I'm thinking about creating a python tool that parses the list of
but I'm unsure on how to correctly implement this as something that'll make sense in janis. Any idea's? Advice? Thanks already. |
Yes you could build a PythonTool that returned an object:
Which could map to the outputs:
Ultimately, it would be useful in Janis to refer to the first index of an output (eg: |
Great, thanks!
|
Ah I see I see. We don’t support these custom structures. I’d recommend making each return type an array:
(And changing your python code to suit) Then when you use the result from this, you can dot scatter on all three fields: https://github.com/PMCC-BioinformaticsCore/janis-workshops/blob/master/workshop2/6-scatter.md |
Awesome, thanks for the help
which outputs roughly as
and is ideal for a dotproduct as you said! Thanks! |
Hi,
Would it be possible to add a quick comment on how to use subworkflows?
Do I just add them as in a "master" workflow?
Thanks
M
The text was updated successfully, but these errors were encountered: