Learn R Programming

cbioportalR (version 1.1.0)

cbp_api: Core function to retrieve data from cBioPortal API.

Description

Core function to retrieve data from cBioPortal API.

Usage

cbp_api(
  url_path,
  method = NULL,
  token = get_cbioportal_token(),
  body = NULL,
  extra_box = FALSE,
  quiet = TRUE,
  base_url = NULL
)

Value

A parsed API response

Arguments

url_path

The url path for API call

method

Which API method to use. Must be "get" or "post". Default is "get".

token

Authentication token, if needed. Default is get_cbioportal_token()

body

Arguments passed to API call (e.g. sample ID or gene IDs)

extra_box

Some functions require an additional list() wrapping around body idk why

quiet

Returns queried URL. Default is TRUE

base_url

The database URL to query

Examples

Run this code
if (FALSE) {
cbp_api(url_path = "genes/TP53", base_url = "public")
}

Run the code above in your browser using DataLab