<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Hi Ramiro,</div><div class=""><br class=""></div><div class="">we provide LD calculations for species for which we have sufficient amount of genotype data. Our script expects at least 40 samples per population for LD calculation. At the moment we have enough genotype data for human, goat and sheep.</div><div class=""><br class=""></div><div class="">You can query our population endpoint for your species of interest  with the filter variable set to LD in order to find out for which populations LD can be calculated: For example for human: </div><div class=""><a href="https://rest.ensembl.org/info/variation/populations/homo_sapiens?filter=LD;content-type=application/json" class="">https://rest.ensembl.org/info/variation/populations/homo_sapiens?filter=LD;content-type=application/json</a></div><div class=""><br class=""></div><div class="">We will provide better exception handling for the cases you have listed in your examples.</div><div class=""><br class=""></div><div class="">Thank you,</div><div class="">Anja</div><div><br class=""><blockquote type="cite" class=""><div class="">On 18 Jul 2019, at 12:04, Ramiro Magno <<a href="mailto:ramiro.magno@gmail.com" class="">ramiro.magno@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi<div class=""><br class=""></div><div class="">What should I expect when using this endpoint with other species than human:</div><div class=""><br class=""></div><div class=""><a href="http://rest.ensembl.org/documentation/info/ld_region_get" class="">http://rest.ensembl.org/documentation/info/ld_region_get</a><br class=""></div><div class=""><br class=""></div><div class="">The returned errors do not seem to be consistent. Some expose internal errors even. I was expecting some error more specifically related to the invalid parameter.</div><div class=""><br class=""></div><div class="">Here's some examples:</div><div class=""><br class=""></div><div class=""><b class="">Example 1</b></div><div class=""><br class=""></div><div class=""><font face="courier new, monospace" class="">* Endpoint:       <a href="https://rest.ensembl.org/ld/gorilla/rs1042779/1000GENOMES:phase_3:CEU?window_size=50;d_prime=0;r2=0" class="">https://rest.ensembl.org/ld/gorilla/rs1042779/1000GENOMES:phase_3:CEU?window_size=50;d_prime=0;r2=0</a><br class="">* Status code:    400<br class="">* Error message: "Can't call method "max_snp_distance" on an undefined value at /nfs/public/release/ensweb/live/rest/www_97/ensembl-rest/lib/EnsEMBL/REST/Model/LDFeatureContainer.pm line 50.</font><br class=""></div><div class=""><br class=""></div><div class=""><b class="">Example 2</b></div><div class=""><br class=""></div><div class=""><font face="courier new, monospace" class="">* Endpoint:       <a href="https://rest.ensembl.org/ld/gorilla/region/1:1..10000/1000GENOMES:phase_3:CEU?d_prime=0;r2=0" class="">https://rest.ensembl.org/ld/gorilla/region/1:1..10000/1000GENOMES:phase_3:CEU?d_prime=0;r2=0</a><br class="">* Status code:    400<br class="">* Error message: "Can't call method "db" on an undefined value at /nfs/public/release/ensweb/live/rest/www_97/ensembl-rest/lib/EnsEMBL/REST/Model/LDFeatureContainer.pm line 92.</font><br class=""></div><div class=""><br class=""></div><div class=""><b class="">Example 3</b></div><div class=""><br class=""></div><div class=""><font face="courier new, monospace" class="">* Endpoint: <a href="https://rest.ensembl.org/ld/fly/region/1:1..10000/1000GENOMES:phase_3:CEU?d_prime=0;r2=0" class="">https://rest.ensembl.org/ld/fly/region/1:1..10000/1000GENOMES:phase_3:CEU?d_prime=0;r2=0</a></font></div><div class=""><font face="courier new, monospace" class="">* Status code: 500</font></div><div class=""><font face="courier new, monospace" class="">* Error message:  Error: lexical error: invalid char in json text.</font></div><font face="courier new, monospace" class="">                                       <!DOCTYPE html>    <html lang="<br class="">                     (right here) ------^</font><div class=""><br class=""></div><div class="">Cheers,</div><div class="">RM</div></div>
_______________________________________________<br class="">Dev mailing list    <a href="mailto:Dev@ensembl.org" class="">Dev@ensembl.org</a><br class="">Posting guidelines and subscribe/unsubscribe info: <a href="https://lists.ensembl.org/mailman/listinfo/dev_ensembl.org" class="">https://lists.ensembl.org/mailman/listinfo/dev_ensembl.org</a><br class="">Ensembl Blog: <a href="http://www.ensembl.info/" class="">http://www.ensembl.info/</a><br class=""></div></blockquote></div><br class=""></body></html>