The REST endpoint sequenceByName deprecated

4 views
Skip to first unread message

Mikkel Christensen

unread,
May 12, 2021, 8:51:46 AM5/12/21
to apollo

HI

The REST endpoint 'sequenceByName' does not work any more and is marked a deprecated in the code. I have a script that depends on the REST endpoint (use to work with older version of apollo) so would like to know what replaces it?  There is a new function  def lookupSequenceByName(String q, String clientToken)  but how do I call it from the REST api??

Thanks,

Mikkel

Nathan Dunn

unread,
May 12, 2021, 1:21:25 PM5/12/21
to Mikkel Christensen, apollo

I agree that it shouldn’t be deprecated and it is a valid method. 

I created a PR to remove that here:


In the interim, if you’re not having problems with it, please continue to use it.

Nathan


--
To unsubscribe from this group and stop receiving emails from it, send an email to apollo+un...@lbl.gov.

Mikkel Christensen

unread,
May 12, 2021, 2:00:02 PM5/12/21
to Nathan Dunn, apollo

HI Natham,

Thanks for looking at this

The method does not work on the latest apollo (at least not for me), not sure that is just because of the @deprecated or something else.

Mikkel

Nathan Dunn

unread,
May 12, 2021, 2:06:46 PM5/12/21
to Mikkel Christensen, Nathan Dunn, apollo
How are you using it ? 

Nathan

On May 12, 2021, at 11:00 AM, Mikkel Christensen <mik...@ebi.ac.uk> wrote:



HI Natham,

Thanks for looking at this

The method does not work on the latest apollo (at least not for me), not sure that is just because of the @deprecated or something else.

Mikkel

On 12/05/2021 18:21, Nathan Dunn wrote:<= br>

I agree that it shouldn=E2=80=99t be deprecated and i= t is a valid method.=C2=A0

I created a PR to remove that here:


In the interim, if you=E2=80=99re not having problems= with it, please continue to use it.

Nathan


On May 12, 2021, at 5:51 AM, Mikkel Christensen <mik...@ebi.ac.uk> wrote:

HI

The REST endpoint 'sequenceByName' does not work any more and is marked a deprecated in the code. I have a script that depends on the REST endpoint (use to work with older version of apollo) so would like to know what replaces it?=C2=A0 There is a new function=C2=A0 def lookupSequenceByName(String q, String clientToken)=C2=A0 = but how do I call it from the REST api??

Thanks,

Mikkel

Nathan Dunn

unread,
May 12, 2021, 3:46:51 PM5/12/21
to Mikkel Christensen, apollo


Mikkel, you were missing the extra call:


import requests
body = {'username':'de...@demo.com', 'password':'demo','organismString':'Yeast', 'sequenceName':'chrI', 'featureName':'0e885d23-0589-40b7-81ae-74862db01a54', 'type':'cds'}
response = requests.post(url, json=body)
print(response.text)



That being said, I updated the documentation a bit to reflect this. 

Nathan



On May 12, 2021, at 11:20 AM, Mikkel Christensen <mik...@ebi.ac.uk> wrote:

On an older version where it was last working I was just making a simple get request.
The have tried both get and post. I am testing the demo Apollo.

Python3

import requests
# /sequence/<organism name>/<sequence name>/<feature name>.<type>?ignoreCache=<ignoreCache>
url = 'http://demo.genomearchitect.io/Apollo2/sequence/Yeast/chrI/0e885d23-0589-40b7-81ae-74862db01a54.cds?ignoreCache=true'
response = requests.get(url, auth=('de...@demo.com','demo'))
print(response.text)


import requests
url = 'http://demo.genomearchitect.io/Apollo2/sequence/'
body = {'username':'de...@demo.com', 'password':'demo','organismString':'Yeast', 'sequenceName':'chrI', 'featureName':'0e885d23-0589-40b7-81ae-74862db01a54', 'type':'cds'}
response = requests.post(url, json=body)
print(response.text)

Reply all
Reply to author
Forward
0 new messages