You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to MaveDB and to APIs in general. I checked the repository and the documentation at https://api.mavedb.org/docs but still feel uncertain about where to start.
For example, I’m trying to perform a search query for “TP53” and retrieve all relevant results. Could someone please guide me on how to structure the Python code for this, using either this repository or the API directly?
Thank you!
The text was updated successfully, but these errors were encountered:
Would you only like to read the search results or, get the data and do more data processing?
If you only need to do some searches, using MaveDB website will be easier. For example, https://mavedb.org/search?search=TP53
You can interact with the API via the command line with curl. The request that you outlined looks like this:
curl -d '{"text":"TP53"}' -H "Content-Type: application/json" -X POST https://api.mavedb.org/api/v1/score-sets/search
Feel free to use any of those keys that the docs show you in place of text (which is just a basic substring search across all of the fields in a score set). For instance, to get score sets with TP53 in the name of the target you could send the following request:
curl -d '{"targets":["TP53"]}' -H "Content-Type: application/json" -X POST https://api.mavedb.org/api/v1/score-sets/search
This will return a list of JSON objects, each one representing one score set which matches your request. To do the same thing in Python, you could use the requests module:
The search results object will contain a list of dictionaries, with each dictionary representing a single score set matching your search. Again, feel free to combine any of the keys shown in the documentation within the defined search dictionary if you'd like more granular searches.
Hope that helps, and lmk if that raises any other questions.
Hi,
I'm new to MaveDB and to APIs in general. I checked the repository and the documentation at https://api.mavedb.org/docs but still feel uncertain about where to start.
For example, I’m trying to perform a search query for “TP53” and retrieve all relevant results. Could someone please guide me on how to structure the Python code for this, using either this repository or the API directly?
Thank you!
The text was updated successfully, but these errors were encountered: