question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extend Array functionality to maps

See original GitHub issue

Suggested by @vdauwera regarding read_tsv() import functionality:

When you have a TSV with a header, it would be great if you could set a parameter to header=true, in order to have WDL ignore the first line.

Even better, if the read_tsv function could use the header fields to read the content into a map instead of an array. So you could say sample[inputBam] instead of having to take sample[1], which is more susceptible to errors.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
geoffjentrycommented, Feb 8, 2017

@pgrosu This would be a WDL construct, we’re not proposing we literally write our own parsers at the scala level 😃

@vdauwera to be fair “crud” is on the higher end of my description spectrum.

0reactions
vdauweracommented, Sep 11, 2017

There’s loads of scenarios where this would be useful; iirc the case I was working on when I made this request was that I had a FOFN that contained a list of samples with bam and index filepaths, and I wanted to load that in as input to a task.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extending the Array map() function - DEV Community ‍ ‍
This lets us easily define mapToCall using those type parameters, and we're free to use the array elements as functions because we've defined ......
Read more >
Extending built-in classes - The Modern JavaScript Tutorial
Built-in methods like filter , map and others – return new objects of exactly the inherited type PowerArray .
Read more >
JavaScript extending Array to implement map2 - Stack Overflow
I want extend javascript Array to implement map2 functionality without using inbuilt map function. Where map2 functionality doubles the ...
Read more >
Extending Arrays - KIRUPA
Learn how to give your arrays more superpowers by extending it with your own custom properties and methods.
Read more >
Extending arrays using proxies in JavaScript - Michael Zanggl
If you access array.map it will find it inside lodashCollection and return a new function. The function already knows at that point that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found