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

Add select_all miniwdl Stdlib function #161

Merged
merged 5 commits into from
Feb 11, 2022

Conversation

kinow
Copy link
Member

@kinow kinow commented Feb 7, 2022

No description provided.

@codecov
Copy link

codecov bot commented Feb 7, 2022

Codecov Report

Merging #161 (008dab0) into main (c0e477d) will increase coverage by 0.26%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #161      +/-   ##
==========================================
+ Coverage   90.61%   90.88%   +0.26%     
==========================================
  Files           3        3              
  Lines         618      625       +7     
  Branches      180      183       +3     
==========================================
+ Hits          560      568       +8     
  Misses         25       25              
+ Partials       33       32       -1     
Impacted Files Coverage Δ
wdl2cwl/main.py 90.70% <100.00%> (+0.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0e477d...008dab0. Read the comment docs.

wdl2cwl/tests/test_wdl_stdlib.py Outdated Show resolved Hide resolved
wdl2cwl/main.py Outdated Show resolved Hide resolved
wdl2cwl/errors.py Outdated Show resolved Hide resolved
Copy link
Member

@mr-c mr-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

select_all is typically paired with if or scatter in WDL, so it might be a bit soon to implement this.

Can you make your branch on the main repo? It makes it simpler to collaborate :-)

Maybe consider using https://github.com/griffithlab/analysis-wdls/blob/25cf2010055d79bf7df63ab832363066eba87a26/definitions/subworkflows/merge_svs.wdll as an example? There select_all on a source selector for a workflow step could be represented in CWL by using pickValue: all_non_null

wdl2cwl/tests/test_wdl_stdlib.py Outdated Show resolved Hide resolved
wdl2cwl/tests/test_wdl_stdlib.py Outdated Show resolved Hide resolved
wdl2cwl/main.py Show resolved Hide resolved
wdl2cwl/tests/wdl_files/tasks/select_all.wdl Show resolved Hide resolved
@mr-c
Copy link
Member

mr-c commented Feb 8, 2022

@kinow I ran your CWL code, but it always returns empty arrays for me. I had to make the following adjustment
of adding return before the element comparisons.

        outputEval: $([inputs.one, inputs.two, 1, [inputs.two, inputs.one].find(function(element)
            { return element !== null }) ].filter(function(element) { return element !== null })
            )

@kinow
Copy link
Member Author

kinow commented Feb 11, 2022

For later, happy if anyone (@mr-c ? 😬 ) takes over 👍

@mr-c mr-c enabled auto-merge (squash) February 11, 2022 14:21
@mr-c mr-c force-pushed the select-all branch 2 times, most recently from b28f7bd to 6b223b0 Compare February 11, 2022 14:26
Also implement the round() function
@mr-c mr-c merged commit dc60033 into common-workflow-lab:main Feb 11, 2022
@kinow kinow deleted the select-all branch February 11, 2022 17:45
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

Successfully merging this pull request may close these issues.

2 participants