Skip to contents

Get series information from GXPA for a all data or a given series id

Usage

get_series_info_from_gxpa(
  series_id = NULL,
  GXPA_TOKEN = Sys.getenv("GXPA_TOKEN"),
  server_url = Sys.getenv("GXPA_SERVER", "https://geneatlas.redda.bms.com/")
)

Arguments

series_id

dataset series id(s). NULL (default) will output all dataset series information

GXPA_TOKEN

GXPA API token. Default is to use the environment variable GXPA_TOKEN

server_url

GXPA server (default GXPA_SERVER environment variable or https://geneatlas.redda.bms.com/ if missing)

Value

a data.frame of series information for selected datasets, with the following columns:

  • id: series ID

  • name: dataset name ID

  • description: dataset description

  • organism: dataset organism

  • perm_id: dataset perm_id

Details

Go to GXPA Settings to get your token. Some datasets require you to login, so be sure to do that before you copy your token. Some datasets do not require a token.

Token can be set by:

  • For the current session:

    • Sys.setenv(GXPA_TOKEN = "XXXXXXXXXXXXXXXX")

  • For all sessions:

    • usethis::edit_r_environ(),

    • adding: GXPA_TOKEN = "XXXXXXXXXXXXXXXX"

Examples

get_series_info_from_gxpa(41)
#> Error in full_dat[full_dat$id %in% series_id, ]: incorrect number of dimensions
# Can give a numeric vector
get_series_info_from_gxpa(41:43)
#> Error in full_dat[full_dat$id %in% series_id, ]: incorrect number of dimensions

# Can get all available data
all_dat <- get_series_info_from_gxpa()
all_dat$name[1:10]
#> NULL
nrow(all_dat)
#> NULL
table(all_dat$organism)
#> < table of extent 0 >

# Can get series ID based on dataset name
all_dat$id[all_dat$name == "Beat AML - OHSU"]
#> NULL