search_graphql: Perform a GraphQL Query to RCSB PDB

View source: R/search_graphql.R

search_graphqlR Documentation

Perform a GraphQL Query to RCSB PDB

Description

The 'search_graphql' function sends a GraphQL query to the RCSB Protein Data Bank (PDB) using the provided JSON query format. This function handles the HTTP request, sends the query, and processes the response, including error handling to ensure that the query executes successfully.

Usage

search_graphql(graphql_json_query, graphql_url = GRAPHQL_URL)

Arguments

graphql_json_query

A list containing the GraphQL query formatted as JSON. This list should include the 'query' key with a value that represents the GraphQL query string. The query string can specify various elements to retrieve, such as entry IDs, experimental methods, cell dimensions, etc.

graphql_url

A string representing the base URL perform GraphQL query. By default, this is set to the global constant GRAPHQL_URL, but users can specify a different URL if needed.

Value

A parsed list containing the content of the response from the RCSB PDB, formatted as an R object. If the request fails, the function stops with an error message.


rPDBapi documentation built on Oct. 19, 2024, 5:08 p.m.