statgen / locuszoom

A Javascript/d3 embeddable plugin for interactively visualizing statistical genetic data from customizable sources.
https://statgen.github.io/locuszoom/
MIT License
154 stars 29 forks source link

Include all keys sent from DataSource even if not listed in `fields` #102

Closed pjvandehaar closed 6 years ago

pjvandehaar commented 7 years ago

(only implemented for ObjectOfArrays APIs, but I'll do the other half if you think this is fine.)

@Frencil said he'd like something like this. @MrFlick , does this seem fine to you?

If fields contains ["id", "chr", "position", "pvalue|neglog10"], should we also include pvalue (untransformed) in the output of the DataSource? If the layout explicitly listed pvalue|neglog10 in .fields, maybe it won't use pvalue or any other transform of it?

pjvandehaar commented 7 years ago

(tests are passing on my machines, I still don't understand what's wrong with Travis)

abought commented 6 years ago

134 provides an alternative, via overriding extractFields. (which a subclass, like the genes source, would need to opt in to doing) This change will land in v0.8, targeted for the end of this month.

With that hook, is this more global change still a priority? If so, we can keep this open to revisit. Otherwise, I'll close this ticket when 0.8 comes out.

abought commented 6 years ago

Closing this ticket as the alternate approach was merged, and there's been no further discussion. If we find a pheweb use case where this is highly useful, I'd be happy to revisit at that later date.