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

Make a Cook Book on how to do dot-product scattering (zip) #12

Open
ekiernan opened this issue Dec 19, 2022 · 2 comments
Open

Make a Cook Book on how to do dot-product scattering (zip) #12

ekiernan opened this issue Dec 19, 2022 · 2 comments

Comments

@ekiernan
Copy link
Collaborator

Create a how-to doc on using dot-product scattering that uses a real example workflow.

@kayleemathews
Copy link
Collaborator

Example workflow from Daniel Park on openwdl slack

The workflow:

  • starts with a simple scatter on an Array of accessions
  • performs (in a custom task, since WDL has no native way to do this) a group-by operation on that Array to bunch them up by accession number (since each accession might otherwise have multiple other things associated with it)
  • then does a scatter on a zip of the group-by outputs (so now you've got your Pairs)
  • inside the scatter it's doing value lookups on Maps
  • demonstrates a common pattern I have where a WDL scatter produces an Array[String] per item, which then becomes an Array[Array[String]] which is written out as a single TSV file. adding a header to such a TSV file is a little clunky so it's handled with a concatenation task.

@kayleemathews
Copy link
Collaborator

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