Retrieve annotations and surface level stats for a dataset's differential analyses

get_dataset_differential_expression_analyses(
  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 with information about the differential expression analysis of the queried dataset. Note that this funciton does not return differential expression values themselves. Use get_differential_expression_values to get differential expression values (see examples).

The fields of the output data.table are:

  • 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

  • probes.analyzed: Number of probesets represented in the contrast

  • genes.analyzed: Number of genes represented in the contrast

Examples

result <- get_dataset_differential_expression_analyses("GSE2872")
get_differential_expression_values(resultSet = result$result.ID[1])
#> $`570867`
#>               Probe NCBIid GeneSymbol
#>              <char> <char>     <char>
#>     1: 1389528_s_at  24516        Jun
#>     2:   1374404_at  24516        Jun
#>     3: 1370315_a_at  79423      Stmn4
#>     4: 1369788_s_at  24516        Jun
#>     5:   1379606_at 308821      Rab30
#>    ---                               
#> 15566:   1387552_at 116681     Dlgap2
#> 15567:   1367675_at  81823       Cib1
#> 15568:   1384589_at 498963    Spata2L
#> 15569:   1388175_at  79430     Clcnkb
#> 15570:   1398810_at  64527      Pdap1
#>                                                     GeneName    pvalue
#>                                                       <char>     <num>
#>     1: Jun proto-oncogene, AP-1 transcription factor subunit 2.836e-06
#>     2: Jun proto-oncogene, AP-1 transcription factor subunit 1.160e-05
#>     3:                                            stathmin 4 1.903e-05
#>     4: Jun proto-oncogene, AP-1 transcription factor subunit 4.101e-05
#>     5:                     RAB30, member RAS oncogene family 1.000e-04
#>    ---                                                                
#> 15566:                              DLG associated protein 2 9.999e-01
#> 15567:                        calcium and integrin binding 1 9.998e-01
#> 15568:                     spermatogenesis associated 2-like 1.000e+00
#> 15569:                     chloride voltage-gated channel Kb        NA
#> 15570:                            PDGFA associated protein 1        NA
#>        corrected_pvalue      rank contrast_134441_coefficient
#>                   <num>     <num>                       <num>
#>     1:           0.0441 6.436e-05                      1.2514
#>     2:           0.1202 9.655e-05                      0.9971
#>     3:           0.1478 1.000e-04                      0.5632
#>     4:           0.2548 2.000e-04                      1.2275
#>     5:           0.4532 2.000e-04                      0.2237
#>    ---                                                       
#> 15566:           1.0000 9.998e-01                      0.1226
#> 15567:           1.0000 9.997e-01                      0.1435
#> 15568:           1.0000 9.999e-01                      0.1362
#> 15569:               NA 1.000e+00                          NA
#> 15570:               NA 1.000e+00                          NA
#>        contrast_134441_log2fc contrast_134441_tstat contrast_134441_pvalue
#>                         <num>                 <num>                  <num>
#>     1:                 1.2514                5.1513                 0.0003
#>     2:                 0.9971                4.3160                 0.0012
#>     3:                 0.5632                2.8673                 0.0151
#>     4:                 1.2275                3.8705                 0.0025
#>     5:                 0.2237                1.5604                 0.1465
#>    ---                                                                    
#> 15566:                 0.1226                1.0040                 0.3366
#> 15567:                 0.1435                1.2201                 0.2475
#> 15568:                 0.1362                0.6501                 0.5288
#> 15569:                     NA                    NA                     NA
#> 15570:                     NA                    NA                     NA
#>