-
Notifications
You must be signed in to change notification settings - Fork 270
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 hgvsg column and link out to genome nexus #2971
Conversation
4d2147e
to
b69def0
Compare
} | ||
else { | ||
return ( | ||
<a href={`https://www.genomenexus.org/variant/${hgvsgData}`} target="_blank" rel="noopener noreferrer"> |
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.
lets make a helper in urls.ts to make these links. the host should only be in once place in our code
<img | ||
height='16' | ||
width='16' | ||
src={require("./GenomeNexusLogo.png")} |
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.
would be best if we accomplished this with css. so, make a
|
||
if (status !== null) { | ||
// show loading circle | ||
if (status === TableCellStatus.LOADING) { |
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.
it's weird that we have a separate case for loading. one would think that would take care of loading state.
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.
cBioPortal/cbioportal#6988
issue created about the loading state
@@ -0,0 +1,22 @@ | |||
.hgvsg-data a, |
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.
lets discuss using SASS for nesting these defs
@@ -232,7 +232,18 @@ export function extractGenomicLocation(mutation: Mutation) | |||
// TODO remove when done refactoring mutation mapper | |||
export function genomicLocationString(genomicLocation: GenomicLocation) | |||
{ | |||
return `${genomicLocation.chromosome},${genomicLocation.start},${genomicLocation.end},${genomicLocation.referenceAllele},${genomicLocation.variantAllele}`; | |||
// mapping chromosome X with 23 |
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.
would be good to have a test for this function
src/shared/lib/MutationUtils.ts
Outdated
return `${genomicLocation.chromosome},${genomicLocation.start},${genomicLocation.end},${genomicLocation.referenceAllele},${genomicLocation.variantAllele}`; | ||
// mapping chromosome X with 23 | ||
let chromosome = ""; | ||
if (genomicLocation.chromosome === "X") { |
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.
you should use a switch statement instead of if/else when testing against a single value (genomicLocation.chromosome). Good to get in habit of using switch in these kinds of situations. You could also use a an enum with a default. If genomicLocation.chromosome exists in enum, you use it's value. If not, you use Enum.default.
@alisman fixed, thanks |
93bde23
to
12a6d52
Compare
@tmazor @schultzn could you take a look and give some feedback on the hgvsg column? this column links out to Genome Nexus variant page |
@leexgh as discussed in person: let's hide the hgvsg column for now (make it optional) and do a new PR that adds a tooltip for the protein change column with a link to Genome Nexus. |
35e8694
to
f64e237
Compare
dc2a773
to
d04c31c
Compare
- hgvsg is shown by default - the hgvsg will be shorted with ... if the ref or var is too long
add hgvsg column in mutation table and link out to genome nexus
...
and the whole hgvsg will show in tooltip