Look into REST API service for LOVD
andrewhill157 opened this issue · 0 comments
andrewhill157 commented
Adding api/rest.php/variants/HADHB where HADHB is the name of the gene whose variants you want to get returns a XML formatted list of all variants.
It is documented here http://www.gen2phen.org/post/development-lovd-restful-atom-webservice, although this is a poorly advertised feature.
Advantages:
- It will return some key columns, one of which is genomic position and mutation description!
- It is simpler because it automatically converts the variants before returning the text (no need to use mutalyzer separately)
- Reduces the number of pages you have to download
- Can also use to get a list of all genes and perform simple queries based on positions, chromosome number, etc.
- Makes getting large numbers of variants (1000+) very simple
- XML returned text may be simple parse
- Works the same for LOVD2 and LOVD3
Disadvantages
- Would have to rewrite lots of code, but may not be that bad since still need to parse XML (beautifulsoup will probably still work) in manner similar to HTML currently.
- Many columns are not returned with this method, such as references, protein change, codon change. Only HGVS description and locations are returned. If we want any of this extra information, then this is not a viable method.
This could potentially simplify things greatly, but will yield less information. If we want to get the variant locations and descriptions only and then simply use annotation, etc. to overlay additional information, then this is viable. If we want to keep as much information as possible from LOVD, it may not be viable.