Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPError: 400 Client Error: #4

Open
pwrose opened this issue Jan 13, 2022 · 8 comments
Open

HTTPError: 400 Client Error: #4

pwrose opened this issue Jan 13, 2022 · 8 comments

Comments

@pwrose
Copy link

pwrose commented Jan 13, 2022

The RCSB webservice url may have been changed. The Jupyter Notebooks now error out with: HTTPError: 400 Client Error: ...

@ajc3527
Copy link

ajc3527 commented Feb 4, 2022

+1 same problem

@tahereT
Copy link

tahereT commented May 5, 2022

same problem

@ncoish
Copy link

ncoish commented Jul 18, 2022

For any who come to this issue looking for a solution, there are two PRs available which address this if you need a solution right away before they are merged and released to pypi:

I have not tested this one, but it is likely broken now because it used an old (discontinued) version of the search API.
#5

This PR makes a similar change, but also updates to the current version of the search API. It passes the current test suite, but hasn't yet been rigorously tested against the full API:
#6

@joelb123
Copy link

The switchover to v2 service only has broken all downstream code using this package until a new version is pushed to PYPI. I find that PR #6 works for me, thanks @ncoish! However, broken versioning makes it impossible a branch directly with pip. I have forked the search-v2 branch and fixed the versioning, which is usable with pip at joelb123/rcsbsearch. I'll keep this repo alive until a new version appears in PyPI.

@glaudys
Copy link

glaudys commented Feb 4, 2023

The switchover to v2 service only has broken all downstream code using this package until a new version is pushed to PYPI. I find that PR #6 works for me, thanks @ncoish! However, broken versioning makes it impossible a branch directly with pip. I have forked the search-v2 branch and fixed the versioning, which is usable with pip at joelb123/rcsbsearch. I'll keep this repo alive until a new version appears in PyPI.

"joelb123/rcsbsearch" its available? I can't find

@joelb123
Copy link

joelb123 commented Feb 6, 2023

Hi, i put the fork with fixes at hydrationdynamics/rcsbsearch. However, be prepared that if you use this directly, you won't be able to distribute your dependent code on PYPI because of (very sensible) security restrictions on overrides. My solution to this for the moment was to include a full copy of the patched code in my sources, which is wholly unsatisfactory.

You can see a working example (with continuous-integration tests but not in a state I consider ready for others to use) in the query component of my zeiden code. The example uses the gql package to do the query. A sharp edge with rcsbsearch that I cut myself on at first is that sometimes query terms need the full prefixes while for some query terms using the full prefixes causes the term to not be recognized.

An alternative to using rcsbsearch is to screen-scrape RCSB GraphQL searches out of their search page and plunk that into a gql query. That works fine if your search isn't going to need to be flexible.

rcsbsearch can be used for accessing the Data API as well as the Search API, but the performance is worse than simply grabbing the full headers in JSON from the file interface. No matter which delivery method you use, it's trickier than it should be to convert the data to tabular form because there's no schema to distinguish which fields are optional lists as opposed to requisite lists.

Let me point out how unsatisfactory it is that RCSB doesn't provide a supported search client in python with working examples. sbliven/rcsbsearch has been removed from the Search API docs with nothing to replace it. Apparently so few of us are searching programmatically that nobody is complaining.

@piehld
Copy link

piehld commented Sep 15, 2023

Greetings all,

I'm a developer at the RCSB PDB and after many discussions and considerations within our team about the tremendous value and potential of @sbliven's package, we are pleased to announce that we have taken on the responsibility to maintain and continue development of a new version of this package, rcsbsearchapi.

In order to streamline our efforts, we migrated the package to a new repository: https://github.com/rcsb/py-rcsbsearchapi. This new repository will serve as the central hub for all future development, bug fixes, and discussions related to the RCSB PDB Search API package. (N.B. This was originally created as a fork from this repository, but due to a limitation in GitHub in which newly created PRs would always by default point to this one as the base repository instead of our new one, we decided to detach it.)

In addition to this migration, we are excited to announce that we have already introduced a handful of new features (thanks to the efforts by @santiblaumann and @rushambhatt), along with fixing the original issue of updating from V1 to V2 of the RCSB.org search API (thanks to @ncoish for his patch). These include:

  • Sequence search
  • Sequence motif search
  • Structure similarity search
  • Structure motif search
  • Chemical similarity search
  • Option to include computed structure models (CSMs) in search

For a full overview of these new features (including examples), please take look at our documentation.

Importantly, please be aware that this new package introduces breaking changes that will affect your current code (the most obvious of which is the change in package name itself—i.e., import rcsbsearch should now be import rcsbsearchapi). To facilitate your transition, we strongly advise taking a look through the examples in the README or Quickstart tutorial. These examples are also available in a Jupyter notebook.

We hope that this expanded package will greatly benefit your research interests. Your feedback, questions, or contributions are warmly encouraged and appreciated. And finally, we would of course like to thank @sbliven once again for his generous efforts in designing such a comprehensive public software utility and providing the groundwork for us to build upon.

Happy coding,

Dennis

@joelb123
Copy link

Thanks, this looks like what I was hoping for! I will try it out and comment in the new repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants