Returns queried result set

get_result_sets(
  datasets = NA_character_,
  resultSets = NA_character_,
  filter = NA_character_,
  offset = 0,
  limit = 20,
  sort = "+id",
  raw = getOption("gemma.raw", FALSE),
  memoised = getOption("gemma.memoised", FALSE),
  file = getOption("gemma.file", NA_character_),
  overwrite = getOption("gemma.overwrite", FALSE)
)

Arguments

datasets

A numerical dataset identifier or a dataset short name

resultSets

A resultSet identifier. Note that result set identifiers are not static and can change when Gemma re-runs analyses internally. Whem using these as inputs, try to make sure you access a currently existing result set ID by basing them on result sets returned for a particular dataset or filter used in get_result_sets

filter

Filter results by matching expression. Use filter_properties function to get a list of all available parameters. These properties can be combined using "and" "or" clauses and may contain common operators such as "=", "<" or "in". (e.g. "taxon.commonName = human", "taxon.commonName in (human,mouse), "id < 1000")

offset

The offset of the first retrieved result.

limit

Defaults to 20. Limits the result to specified amount of objects. Has a maximum value of 100. Use together with offset and the totalElements attribute in the output to compile all data if needed.

sort

Order results by the given property and direction. The '+' sign indicate ascending order whereas the '-' indicate descending.

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 with information about the queried result sets. Note that this function does not return differential expression values themselves. Use get_differential_expression_values

to get differential expression values

  • result.ID: Result set ID of the differential expression analysis. May represent multiple factors in a single model.

  • contrast.ID: Id of the specific contrast factor. Together with the result.ID they uniquely represent a given contrast.

  • experiment.ID: Id of the source experiment

  • factor.category: Category for the contrast

  • factor.category.URI: URI for the contrast category

  • factor.ID: ID of the factor

  • baseline.factors: Characteristics of the baseline. This field is a data.table

  • experimental.factors: Characteristics of the experimental group. This field is a data.table

  • isSubset: TRUE if the result set belong to a subset, FALSE if not. Subsets are created when performing differential expression to avoid unhelpful comparisons.

  • subsetFactor: Characteristics of the subset. This field is a data.table

Details

Output and usage of this function is mostly identical to get_dataset_differential_expression_analyses. The principal difference being the ability to restrict your result sets, being able to query across multiple datasets and being able to use the filter argument to search based on result set properties.

Examples

get_result_sets(dataset = 1)
#>    result.ID contrast.ID experiment.ID factor.category
#>        <int>       <int>         <int>          <char>
#> 1:    573187           1             1         disease
#>                     factor.category.URI factor.ID baseline.factors
#>                                  <char>    <char>           <list>
#> 1: http://www.ebi.ac.uk/efo/EFO_0000408         1     disease,....
#>    experimental.factors isSubset subsetFactor
#>                  <list>   <lgcl>       <list>
#> 1:         disease,....    FALSE logical(....
# get all contrasts comparing disease states. use filter_properties to see avaialble options
get_result_sets(filter = "baselineGroup.characteristics.value = disease")
#>    result.ID contrast.ID experiment.ID factor.category
#>        <int>       <int>         <int>          <char>
#> 1:    576360      255897         34545       phenotype
#> 2:    576360      255896         34545       phenotype
#> 3:    576360      255895         34545       phenotype
#>                     factor.category.URI factor.ID baseline.factors
#>                                  <char>    <char>           <list>
#> 1: http://www.ebi.ac.uk/efo/EFO_0000651     54513     phenotyp....
#> 2: http://www.ebi.ac.uk/efo/EFO_0000651     54513     phenotyp....
#> 3: http://www.ebi.ac.uk/efo/EFO_0000651     54513     phenotyp....
#>    experimental.factors isSubset subsetFactor
#>                  <list>   <lgcl>       <list>
#> 1:         phenotyp....    FALSE logical(....
#> 2:         phenotyp....    FALSE logical(....
#> 3:         phenotyp....    FALSE logical(....