mutalyzer / mutalyzer2

HGVS variant nomenclature checker
https://mutalyzer.nl
Other
98 stars 23 forks source link

wrong position returned by position converter via https/json #362

Closed ugeigenmuller closed 8 years ago

ugeigenmuller commented 8 years ago

Variant: NM_000388.3:c.1732+16T>C

manual use of website NC_000003.11:g.122001099T>C

https://mutalyzer.nl/json/numberConversion?build=hg19&variant=NM_000388.3:c.1732+16T>C ["NC_000003.11:g.122174017T>C"]

This happened for about 10% of about 4000 variants tested.

martijnvermaat commented 8 years ago

Hi @ugeigenmuller, thanks for the report!

I think I know what is going on here. Using the JSON webservice, arguments are passed as HTTP query string parameters and therefore need to be encoded as such. Amongst the reserved characters in the query string is +, and this is probably the reason some of your variant descriptions are being misinterpreted.

For example, the request you show should be:

https://mutalyzer.nl/json/numberConversion?build=hg19&variant=NM_000388.3%3Ac.1732%2B16T%3EC

Depending on the programming language you are using, there's probably a library which you can use for this. Here's an interface to do it directly from your browser.

We'll update the text on the website to mention this, I think it's a very unfortunate pitfall.

ugeigenmuller commented 8 years ago

Thanks so much for your quick help!

From: Martijn Vermaat [mailto:notifications@github.com] Sent: Thursday, April 28, 2016 3:49 PM To: mutalyzer/mutalyzer Cc: Geigenmuller, Ute; Mention Subject: Re: [mutalyzer/mutalyzer] wrong position returned by position converter via https/json (#362)

Hi @ugeigenmullerhttps://github.com/ugeigenmuller, thanks for the report!

I think I know what is going on here. Using the JSON webservice, arguments are passed as HTTP query string parameters and therefore need to be encodedhttps://en.wikipedia.org/wiki/Query_string#URL_encoding as such. Amongst the reserved characters in the query string is +, and this is probably the reason some of your variant descriptions are being misinterpreted.

For example, the request you show should be:

https://mutalyzer.nl/json/numberConversion?build=hg19&variant=NM_000388.3%3Ac.1732%2B16T%3EC

Depending on the programming language you are using, there's probably a library which you can use for this. Here's an interfacehttp://meyerweb.com/eric/tools/dencoder/ to do it directly from your browser.

We'll update the text on the website to mention this, I think it's a very unfortunate pitfall.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/mutalyzer/mutalyzer/issues/362#issuecomment-215541830 -This e-mail and any attachments may contain CONFIDENTIAL information, including PROTECTED HEALTH INFORMATION. If you are not the intended recipient, any use or disclosure of this information is STRICTLY PROHIBITED; you are requested to delete this e-mail and any attachments, notify the sender immediately, and notify the LabCorp Privacy Officer at privacyofficer@labcorp.com or call (877) 23-HIPAA / (877) 234-4722.