Conversation
|
Well, that solves the code quality issue w.r.t. bar charts! 💇 |
There was a problem hiding this comment.
The difference between these two methods isn't too clear from the names! I remember being unclear between the two when I was doing a RecordStore read-through.
I realize we don't want a super long name for a method that's called a bunch of places, but I'm still putting in a vote for updateGenotypesThrottled.
There was a problem hiding this comment.
Also, it looks like the delay is due to debounce rather than throttle? (Not that I'm suggesting you should use throttle, here.)
There was a problem hiding this comment.
True about delay being due to debounce rather than throttle.
There was a problem hiding this comment.
Changed the comment to "debounce".
|
Only sorta solves the code quality problem -- that was just one of two copies of d3.bar-chart.js in this repo :( |
There was a problem hiding this comment.
So what is this giving us?
There was a problem hiding this comment.
The key needs to be unique on all records; previously, if there were multiple samples in the VCF, the keys wouldn't be unique (since we "explode" each VCF row into N genotype rows (N = # of samples)). This fixes that, so we don't drop rows.
There was a problem hiding this comment.
May be better to _.pick(record, 'contig', 'position', …).join()
There was a problem hiding this comment.
_.pick returns an object, so I'd also have to do _.values. It winds up being longer than this is. I can change if you prefer, though.
There was a problem hiding this comment.
Isaac -- can you clarify why REF/ALT are in the key? I don't understand why they're necessary.
There was a problem hiding this comment.
Shoot, thought it returned a list. Do with it what you will! (Wouldn't suggest making it longer, though!)
There was a problem hiding this comment.
REF/ALT are necessary to make sure the variant is unique--you can have different variants at the same chromosome/position. It's still not necessarily totally theoretically unique, but it gets us closer, within reason.
|
Addressed all comments & rebased. |
Test for ExaminePage, fix two bugs it found.
This constructs
/contigs,/specand/genotypesresponses from a VCF file.The two bugs were:
/genotypeswas being throttled, which artificially slowed page load by 500ms.I also deleted some code that wasn't being used to boost our code coverage. I suspect that if/when we revive this code, it will be substantially different. So deleting is not a big loss. But feel free to disagree.
This PR bumps our test coverage from 25%→53%.