Loading and re-analysing public data through ReactomeGSA (original) (raw)

Datasets found through the find_public_datasets function can subsequently loaded using the load_public_dataset function.

# find the correct entry in the search result
# this must be the complete row of the data.frame returned
# by the find_public_datasets function
dataset_search_entry <- datasets[datasets$id == "E-MTAB-7453", ]

str(dataset_search_entry)
#> 'data.frame':    1 obs. of  7 variables:
#>  $ title              : chr "RNA-seq of the human melanoma cell-line A375P treated with the BRAF inhibitor PLX4720 and a DMSO control"
#>  $ id                 : chr "E-MTAB-7453"
#>  $ resource_name      : chr "EBI Expression Atlas"
#>  $ description        : chr ""
#>  $ resource_loading_id: chr "ebi_gxa"
#>  $ loading_parameters :List of 1
#>   ..$ :'data.frame': 1 obs. of  2 variables:
#>   .. ..$ name : chr "dataset_id"
#>   .. ..$ value: chr "E-MTAB-7453"
#>  $ web_link           : chr "https://www.ebi.ac.uk/gxa/experiments/E-MTAB-7453/Results"
# this function only takes one argument, which must be
# a single row from the data.frame returned by the
# find_public_datasets function
mel_cells_braf <- load_public_dataset(dataset_search_entry, verbose = TRUE)
#> Downloading data from ExpressionAtlas
#> Converting ExpressionAtlas data

The returned object is an ExpressionSet object that already contains all available metada.

# use the biobase functions to access the metadata
library(Biobase)
#> Loading required package: BiocGenerics
#> Loading required package: generics
#> 
#> Attaching package: 'generics'
#> The following object is masked from 'package:dplyr':
#> 
#>     explain
#> The following objects are masked from 'package:base':
#> 
#>     as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
#>     setequal, union
#> 
#> Attaching package: 'BiocGenerics'
#> The following object is masked from 'package:dplyr':
#> 
#>     combine
#> The following object is masked from 'package:limma':
#> 
#>     plotMA
#> The following objects are masked from 'package:stats':
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from 'package:base':
#> 
#>     Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
#>     as.data.frame, basename, cbind, colnames, dirname, do.call,
#>     duplicated, eval, evalq, get, grep, grepl, is.unsorted, lapply,
#>     mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
#>     rank, rbind, rownames, sapply, saveRDS, table, tapply, unique,
#>     unsplit, which.max, which.min
#> Welcome to Bioconductor
#> 
#>     Vignettes contain introductory material; view with
#>     'browseVignettes()'. To cite Bioconductor, see
#>     'citation("Biobase")', and for packages 'citation("pkgname")'.

# basic metadata
pData(mel_cells_braf)
#>             Sample.Id AtlasAssayGroup     organism cell_line organism_part
#> ERR2950741 ERR2950741              g2 Homo sapiens    A375-P          skin
#> ERR2950742 ERR2950742              g2 Homo sapiens    A375-P          skin
#> ERR2950743 ERR2950743              g2 Homo sapiens    A375-P          skin
#> ERR2950744 ERR2950744              g1 Homo sapiens    A375-P          skin
#> ERR2950745 ERR2950745              g1 Homo sapiens    A375-P          skin
#> ERR2950746 ERR2950746              g1 Homo sapiens    A375-P          skin
#>                  cell_type  disease compound         dose
#> ERR2950741 epithelial cell melanoma     none             
#> ERR2950742 epithelial cell melanoma     none             
#> ERR2950743 epithelial cell melanoma     none             
#> ERR2950744 epithelial cell melanoma  PLX4720 1 micromolar
#> ERR2950745 epithelial cell melanoma  PLX4720 1 micromolar
#> ERR2950746 epithelial cell melanoma  PLX4720 1 micromolar

Detailed descriptions of the loaded study are further stored in the metadata slot.

# access the stored metadata using the experimentData function
experimentData(mel_cells_braf)
#> Experiment data
#>   Experimenter name: E-MTAB-7453 
#>   Laboratory:  
#>   Contact information:  
#>   Title: RNA-seq of the human melanoma cell-line A375P treated with the BRAF inhibitor PLX4720 and a DMSO control 
#>   URL: https://www.ebi.ac.uk/gxa/experiments/E-MTAB-7453/Results 
#>   PMIDs:  
#>   No abstract available.
#>   notes:
#>    notes:     
#>       Public dataset loaded from EBI Expression Atlas through ReactomeGSA.

# for some datasets, longer descriptions are available. These
# can be accessed using the abstract function
abstract(mel_cells_braf)
#> [1] ""

Additionally, you can use the table function to quickly get the number of available samples for a specific metadata field.

table(mel_cells_braf$compound)
#> 
#> PLX4720    none 
#>       3       3