dot-pull_data_by_cohort: Function to retrieve data by synapse ID

.pull_data_by_cohortR Documentation

Function to retrieve data by synapse ID

Description

Function to retrieve data by synapse ID

Usage

.pull_data_by_cohort(version_num_df, token, download_location)

Arguments

version_num_df

a dataframe of 'Synapse' IDs

token

a 'Synapse' token

download_location

if 'NULL' (default), data will be returned as a list of dataframes with requested data as list items. Otherwise, specify a folder path to have data automatically downloaded there.

Value

downloaded 'Synapse' data as a list if 'download_location'= 'NULL, or to a local path

Examples



temp_directory <- tempdir()

syn_df <- data.frame(
  cohort = c("NSCLC", "NSCLC", "NSCLC"),
  version = c("v2.1-consortium", "v2.1-consortium", "v2.1-consortium"),
  version_num = c("NSCLC_v2.1", "NSCLC_v2.1", "NSCLC_v2.1"),
  download_folder = c(temp_directory, temp_directory, temp_directory),
  df = c("pt_char", "ca_dx_index", "ca_dx_non_index"),
  synapse_id = c("syn25985884", "syn25985882", "syn25985883")
)

.pull_data_by_cohort(
  version_num_df = syn_df,
  token = .get_synapse_token(), download_location = NULL
)

#


genieBPC documentation built on March 7, 2023, 6:46 p.m.