AtlasOfLivingAustralia / bie-webapp2

Deprecated - see bie-plugin, generic-bie and ala-bie
http://bie.ala.org.au
0 stars 3 forks source link

Genbank links are broken #28

Closed djtfmartin closed 9 years ago

djtfmartin commented 10 years ago

http://bie.ala.org.au/species/Macropus+rufus

Always returning 0 results.

nickdos commented 9 years ago

Code uses screen scraping and the NCBI page/layout has changed. Would be good to use a webservice for this, which won't be so brittle. Looking now.

djtfmartin commented 9 years ago

I fixed this on a fork here

https://github.com/djtfmartin/bie-webapp2/commit/8b9f4d7a6ce1a1ad03f318f8f040131049d8e6dc#diff-467ce1d362fb8a68a43d28d29741932a

nickdos commented 9 years ago

Webpage: http://www.ncbi.nlm.nih.gov/nuccore/?term=%22Macropus+rufus%22

I also found their XML webservice (docs: http://www.ncbi.nlm.nih.gov/books/NBK25498/#chapter3.ESearch__ESummaryEFetch): search: http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=nucleotide&term=macropus+rufus

both of which return 728 results. XML doesn't include details for hits, so it looks like you'll need to batch up the IDs and do another webservice request for that...

Not sure its worth the coding now or later but the webpage will probably change again and break at some point.

nickdos commented 9 years ago

You can use the history option from first search:

http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=nucleotide&term=%22Macropus+rufus%22&usehistory=y

`1

NCID_1_469495366_130.14.22.215_9001_1421810342_255475397_0MetA0_S_MegaStore_F_1` then use those values in this URL: http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=nucleotide&query_key=1&WebEnv=NCID_1_469495366_130.14.22.215_9001_1421810342_255475397_0MetA0_S_MegaStore_F_1 to get the details for each hit
nickdos commented 9 years ago

Fixed with code from Dave's branch commit 15cda87