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

Allow URLs to be constructed with only Variant ID and Evidence ID #531

Closed
gaberudy opened this Issue Sep 26, 2016 · 10 comments

Comments

Projects
None yet
5 participants
@gaberudy

gaberudy commented Sep 26, 2016

I think it's great the site provides persistent IDs at the level of Genes, Variant and Evidence.

When linking to resources from other sites, its useful to be able to construct a URL from a identifier directly to that resources.

This is possible for Gene ID, but not Variant and Evidence ID, which require knowing the associated GeneID and Evidence ID

Current URL structure:
Gene page:
https://civic.genome.wustl.edu#/events/genes/{GeneID}/summary#gene
Variant page:
https://civic.genome.wustl.edu/#/events/genes/{GeneID}/summary/variants/{VariantID}/summary#variant
Evidence page:
https://civic.genome.wustl.edu/#/events/genes/{GeneID}/summary/variants/{VariantID}/summary/evidence/{EvidenceID}/summary#evidence

While I understand your not wantting to change the URL structure of the entire site, it would be helpful to maybe have a search or ID redirect URL that can take these single IDs and send you to the appropriate page.

For example:
https://civic.genome.wustl.edu/#/redirect/evidence/670
Returns a 302 redirect to https://civic.genome.wustl.edu/#/events/genes/2473/summary/variants/259/summary/evidence/670/summary#evidence

With the benefit of also being shorter.

@jmcmichael

This comment has been minimized.

Show comment
Hide comment
@jmcmichael

jmcmichael Sep 26, 2016

Contributor

Yeah can be done by just adding some new routes, and constructing non-nested views of the variant, variant group, and evidence item views, and can be implemented on the client.

Contributor

jmcmichael commented Sep 26, 2016

Yeah can be done by just adding some new routes, and constructing non-nested views of the variant, variant group, and evidence item views, and can be implemented on the client.

@jmcmichael jmcmichael self-assigned this Sep 26, 2016

@gaberudy

This comment has been minimized.

Show comment
Hide comment
@gaberudy

gaberudy Sep 26, 2016

Thanks for considering this issue.

I would not consider non-nested views as part of this feature request (issue). I think the current views are well structured in their hierarchy etc, but of course have the current routing downside.

I hope that feedback is helpful.

gaberudy commented Sep 26, 2016

Thanks for considering this issue.

I would not consider non-nested views as part of this feature request (issue). I think the current views are well structured in their hierarchy etc, but of course have the current routing downside.

I hope that feedback is helpful.

@malachig

This comment has been minimized.

Show comment
Hide comment
@malachig

malachig Oct 26, 2016

Member

This issue has been raised during our interactions with WikiData folks. It would be great if there were single ID URLs that resolve to a gene, variant, or evidence item.

https://civic.genome.wustl.edu/idtype=gene&id=$civic_gene_id
https://civic.genome.wustl.edu/idtype=entrez_gene&id=$entrez_gene_id
https://civic.genome.wustl.edu/idtype=variant&id=$civic_variant_id
https://civic.genome.wustl.edu/idtype=evidence&id=$civic_evidence_id

Those should be possible. Something that is harder but would be awesome as well is something like this:
https://civic.genome.wustl.edu/idtype=genomic_hgvs&id=$genomic_hgvs_string

Member

malachig commented Oct 26, 2016

This issue has been raised during our interactions with WikiData folks. It would be great if there were single ID URLs that resolve to a gene, variant, or evidence item.

https://civic.genome.wustl.edu/idtype=gene&id=$civic_gene_id
https://civic.genome.wustl.edu/idtype=entrez_gene&id=$entrez_gene_id
https://civic.genome.wustl.edu/idtype=variant&id=$civic_variant_id
https://civic.genome.wustl.edu/idtype=evidence&id=$civic_evidence_id

Those should be possible. Something that is harder but would be awesome as well is something like this:
https://civic.genome.wustl.edu/idtype=genomic_hgvs&id=$genomic_hgvs_string

@goodb

This comment has been minimized.

Show comment
Hide comment
@goodb

goodb Oct 26, 2016

This looks good to me and would be helpful in the context of building links in wikidata as well as making it possible to link civic from other resources that depend on single id pattern URLs like biogps.org

goodb commented Oct 26, 2016

This looks good to me and would be helpful in the context of building links in wikidata as well as making it possible to link civic from other resources that depend on single id pattern URLs like biogps.org

@acoffman

This comment has been minimized.

Show comment
Hide comment
@acoffman

acoffman Oct 27, 2016

Member

I've just pushed this functionality to master and it will go out in this week's deploy. As it was minimal additional work, we will support both URL styles.

The following will all now work:

"Resource style" routes:

/links/gene/:gene_id
/links/entrez/:entrez_id
/links/variants/:variant_id
/links/evidence/:eid
/links/evidence_items/:eid

Query-string style routes:

/links?idtype=gene&id=gene_id
/links?idtype=variant&id=variant_id
/links?idtype=evidence&id=evidence_itm_id
/links?idtype=entrez&id=entrez_id

These routes will return a 404 response if the entity in question isn't found, otherwise they will do a 302 redirect to the canonical link to the entity.

HGVS support will be a little more complicated and we'll discuss that in one of our upcoming meetings. The current data model allows for an HGVS expression to belong to more than one CIViC variant. So, at the current time, it isn't possible to take an HGVS and match it to exactly one canonical variant.

Member

acoffman commented Oct 27, 2016

I've just pushed this functionality to master and it will go out in this week's deploy. As it was minimal additional work, we will support both URL styles.

The following will all now work:

"Resource style" routes:

/links/gene/:gene_id
/links/entrez/:entrez_id
/links/variants/:variant_id
/links/evidence/:eid
/links/evidence_items/:eid

Query-string style routes:

/links?idtype=gene&id=gene_id
/links?idtype=variant&id=variant_id
/links?idtype=evidence&id=evidence_itm_id
/links?idtype=entrez&id=entrez_id

These routes will return a 404 response if the entity in question isn't found, otherwise they will do a 302 redirect to the canonical link to the entity.

HGVS support will be a little more complicated and we'll discuss that in one of our upcoming meetings. The current data model allows for an HGVS expression to belong to more than one CIViC variant. So, at the current time, it isn't possible to take an HGVS and match it to exactly one canonical variant.

@acoffman acoffman closed this Oct 27, 2016

@goodb

This comment has been minimized.

Show comment
Hide comment
@goodb

goodb Oct 28, 2016

To confirm, links like this?
https://civic.genome.wustl.edu/links/variants/:1
I'm asking because I would like to cte it on this wikidata property proposal:
https://www.wikidata.org/wiki/Wikidata:Property_proposal/CIViC_variant_ID

goodb commented Oct 28, 2016

To confirm, links like this?
https://civic.genome.wustl.edu/links/variants/:1
I'm asking because I would like to cte it on this wikidata property proposal:
https://www.wikidata.org/wiki/Wikidata:Property_proposal/CIViC_variant_ID

@acoffman

This comment has been minimized.

Show comment
Hide comment
@acoffman

acoffman Oct 28, 2016

Member

Apologies, the literal : character is copied from the routing framework; you can omit it. Otherwise, correct! We plan to push the release containing this change to production today.

Member

acoffman commented Oct 28, 2016

Apologies, the literal : character is copied from the routing framework; you can omit it. Otherwise, correct! We plan to push the release containing this change to production today.

@goodb

This comment has been minimized.

Show comment
Hide comment
@goodb

goodb Oct 28, 2016

Great, let us know when its live and so we can update that wikidata property. Thanks!

goodb commented Oct 28, 2016

Great, let us know when its live and so we can update that wikidata property. Thanks!

@acoffman

This comment has been minimized.

Show comment
Hide comment
@acoffman

acoffman Oct 28, 2016

Member

@goodb this is now live!

Member

acoffman commented Oct 28, 2016

@goodb this is now live!

@gaberudy

This comment has been minimized.

Show comment
Hide comment
@gaberudy

gaberudy Nov 15, 2016

@acoffman This is great! We are using these links now. Here is a blog post I just wrote about it:

http://blog.goldenhelix.com/grudy/annotating-cancer-mutations-with-civic/

gaberudy commented Nov 15, 2016

@acoffman This is great! We are using these links now. Here is a blog post I just wrote about it:

http://blog.goldenhelix.com/grudy/annotating-cancer-mutations-with-civic/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment