Retrieve the design of a dataset

get_dataset_design(
  dataset,
  raw = getOption("gemma.raw", FALSE),
  memoised = getOption("gemma.memoised", FALSE),
  file = getOption("gemma.file", NA_character_),
  overwrite = getOption("gemma.overwrite", FALSE)
)

Arguments

dataset

A numerical dataset identifier or a dataset short name

raw

TRUE to receive results as-is from Gemma, or FALSE to enable parsing. Raw results usually contain additional fields and flags that are omitted in the parsed results.

memoised

Whether or not to save to cache for future calls with the same inputs and use the result saved in cache if a result is already saved. Doing options(gemma.memoised = TRUE) will ensure that the cache is always used. Use forget_gemma_memoised to clear the cache.

file

The name of a file to save the results to, or NULL to not write results to a file. If raw == TRUE, the output will be the raw endpoint from the API, likely a JSON or a gzip file. Otherwise, it will be a RDS file.

overwrite

Whether or not to overwrite if a file exists at the specified filename.

Value

A data table of the design matrix for the queried dataset. A 404 error if the given identifier does not map to any object

Examples

head(get_dataset_design("GSE2018"))
#>                          batch
#> BAL_47c_A0B1 Batch_06_02_07_24
#> BAL_47b_A0B1 Batch_07_02_10_03
#> BAL_47a_A0B0 Batch_08_02_10_15
#> BAL_46_A2B0  Batch_01_02_01_31
#> BAL_45b_A2B0 Batch_03_02_05_22
#> BAL_45a_A1B0 Batch_06_02_07_24
#>                                                         diseaseState
#> BAL_47c_A0B1                                  reference_subject_role
#> BAL_47b_A0B1                                  reference_subject_role
#> BAL_47a_A0B0                                  reference_subject_role
#> BAL_46_A2B0  disease_related_to_solid_organ_transplantation_|_lung_|
#> BAL_45b_A2B0 disease_related_to_solid_organ_transplantation_|_lung_|
#> BAL_45a_A1B0                                  reference_subject_role