-
Notifications
You must be signed in to change notification settings - Fork 45
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 v4 CNVs #1176
Add v4 CNVs #1176
Conversation
9f1c515
to
2b16f07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look through every commit, as I believe Phil is working on that, but I did want to chime in and say I noticed that on the demo, searching anything causes a crash of the page.
I'm unsure if there's some relatively quick way to disable the search feature for the v4_cnvs dataset only -- that could be a straightforward way to get the MVP out, and we could just file an issue on that and tackle it later.
Also, the amount of SVs is generally so small for a given gene, that I doubt anyone would really use the search feature.
Edit for clarity, screenshot below. Searching of a CNV variant table causes the page to crash.
Thanks RIley -- we def need to fix search. |
I just tried search in that demo and it seemed OK to me, did you fix that
already maybe Elissa? Or if not, Riley, could you be a little more specific
about what you did?
…On Sun, Oct 29, 2023 at 2:55 PM Matthew Solomonson ***@***.***> wrote:
Thanks RIley -- we def need to fix search.
—
Reply to this email directly, view it on GitHub
<#1176 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZQ2NNPHRM2HGUK6BKLK2TLYB2RB3AVCNFSM6AAAAAA4YIS5X2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBUGE4TMNZYHA>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
I didn't change the demo yet, but I assumed the issue was that the coverage wasn't loading. I can access gene pages fine through the search but I am starting to notice the coverage isn't appearing when you search for genes vs go to the direct page |
Sorry, I wasn't clear. I mean the search on the variant table: The console in the demo does give a helpful error message with some line numbers. Possibly not a huge deal, as I doubt many people are going to search a table with a handful of CNVs anyways, but I wanted to flag it cause it does cause a hard crash. |
I see the error "e.toLowerCase is not a function", haven't looked at the
code but $20 says it's an `undefined` or `null` slipping in there.
…On Sun, Oct 29, 2023 at 5:26 PM Riley Grant ***@***.***> wrote:
Sorry, I wasn't clear. I mean the search on the variant table:
[image: Screenshot 2023-10-29 at 16 24 04]
<https://user-images.githubusercontent.com/59549713/278898915-42ddefc7-1df8-426d-9de6-6b51229981b1.jpg>
The console in the demo does give a helpful error message with some line
numbers.
—
Reply to this email directly, view it on GitHub
<#1176 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZQ2NNK7M3ANZI26E3IJV5LYB3CYLAVCNFSM6AAAAAA4YIS5X2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBUGIZDSNBYGY>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Thanks for pointing that out Riley! Fixed it and it was a small bug with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I requested quite a few changes, most of which involve cleaning the commit history to make it clearer what's going on. It's probably best if we get together in the morning and walk through the first few rebases together. After that, I'll need to give this at least one more look.
v4-cnvs-test1.ipynb
Outdated
@@ -0,0 +1,558 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a couple of changes I'm going to request to this PR that all fall into the category of making the commit history easier to follow. This is beneficial both in the short term as I review this PR now, and in the long term when we have to go back and work on this page later. Apart from that I'll give this general review both before and after you make those changes.
The ideal when you're merging a PR is that, if somebody is reading your commits one after the other, it should look basically like you got all the code right the first time, making a series of commits at logical points as you complete individual parts of what you're working on. Of course this is a lie and everyone reading the log knows it, but it does make the code much easier to understand for the reviewer or maintainer.
The main tool for neatening your commit history is interactive rebasing via git rebase -i
. This can be kind of a subtle process so I'm going to start out by giving pretty explicit instructions about what I'm suggesting, but you'll get the idea quickly no doubt.
All that is general context, specific advice to follow.
"block_size": 10_000, | ||
}, | ||
}, | ||
"gnomad_v4_cnv_del_burden": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This index, as well as dup_burden
, don't appear to be used. They're not exposed by the GraphQL API, nor are they inputs to other pipelines. If they're not in fact used by anything, we shouldn't have the pipelines to build or export this data either.
strokeWidth={1} | ||
/> | ||
( | ||
<React.Fragment> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI <>
is equivalent to <React.Fragment>
@@ -0,0 +1,61 @@ | |||
import PropTypes from 'prop-types' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use proptypes in new code. But leave it for now.
) | ||
|
||
// @ts-expect-error TS(7031) FIXME: Binding element 'scrollOffset' implicitly has an '... Remove this comment to see the full error message | ||
const onScrollTable = useCallback(({ scrollOffset, scrollUpdateWasRequested }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a rule, don't name callback functions for the callback they're attached to. Rather, use the name to describe what they do, as you would with any other function. For instance, here you might call the function scrollToCurrentTrack
.
@@ -33,7 +33,7 @@ exports[`CopyNumberVariantPage with dataset gnomad_cnv_r4 with variant of type D | |||
> | |||
<a | |||
className="DatasetSelector__TopLevelNavigationLink-sc-1p2fxbn-1-Link eggTrD" | |||
data-item="current_sv_or_cnv_dataset" | |||
data-item="current_sv_dataset" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not clear on what this commit is about either. nvm, it was late and I was tired and now it's pretty clear.
@phildarnowsky-broad in the interest of time, should we opt for merging this soon and you guys can review the PR as a retrospective later this week? I sort of assured Elissa not to worry too much about commits so that we can get the feature done. |
@elissa-alarmani as discussed, due to time pressure, I'm going to fork this branch and prepare a new one with the rebases I mention applied. Once the rush is done we can work through this one together, rebasing is an extremely valuable thing to have in your toolbox. |
} | ||
` | ||
|
||
const CheckboxWrapper = styled.div` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference if you find yourself wanting to write a styled component with no styles, it's probably fine to just use the ordinary HTML element in its place, e.g. <div>
here. Don't worry about it for now though.
childReferenceGenome: referenceGenome('gnomad_cnv_r4'), | ||
}, | ||
], | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this commented-out chunk can come out and so it does, in a later commit. This spot is a good example of the value of tidying your commit history via rebase, since I spent a little time here reviewing a piece of code that later was cut, meaning that time was wasted.
} | ||
} | ||
` | ||
const url = datasetId === 'gnomad_cnv_r4' ? '/api' : 'https://gnomad.broadinstitute.org/api/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to remove this bit before merging. When I have to do something like this which is purely to rig something temporarily for a demo, I often do that in a separate commit prefixed with the label DONTMERGE
, that way I'll see it and remember to drop that commit before I merge to main
@@ -0,0 +1,309 @@ | |||
import React, { useCallback, useMemo, useRef, useState } from 'react' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure I see a lot of copypasta in this file but given the circumstances I'm inclined to turn a blind eye this time. Maybe let's you and I look more carefully at this in the near future after the crunch is done.
Closed after rebase in #1225 |
No description provided.