Skip to contents

The download directory from RefineBio is a zip file containing a folder of experiments. This function will load the experiments from the extracted zip file and return a list of SummarizedExperiments. In the case of a single experiment, the list will contain a single element.

Usage

extract_local_dataset(basedir)

Arguments

basedir

Path to the directory of an extracted RefineBio download.

Value

A list of SummarizedExperiments representing the experiments in the RefineBio downloaded dataset.

Details

The returned list will be named based on the experiment ids in the download.

Author

Alexander Ho and Sean Davis

Examples

# load the SummarizedExperiment package
# We'll need it later.
suppressPackageStartupMessages(library(SummarizedExperiment))

# use an example datastore
datastore_path <- datastore_example_path()

# Get the first dataset from the datastore
example_dataset <- datastore_datasets(datastore_path)[1]

# Get the path to the dataset
example_dataset_path <- file.path(datastore_path, example_dataset)

# Load the dataset
example_se_list <- extract_local_dataset(example_dataset_path)

# Get the first experiment
example_se <- example_se_list[[1]]

example_se
#> class: SummarizedExperiment 
#> dim: 19 48 
#> metadata(13): accession_code description ... technology title
#> assays(1): exprs
#> rownames: NULL
#> rowData names(1): Gene
#> colnames(48): SRR6413028 SRR6413029 ... SRR6413074 SRR6413075
#> colData names(24): refinebio_accession_code experiment_accession ...
#>   refinebio_title refinebio_treatment

# Get the first experiment's metadata
str(metadata(example_se))
#> List of 13
#>  $ accession_code        : chr "SRP127409"
#>  $ description           : chr "RNA was purified cancer cell lines. The \"SAMPLE_ID\" sample characteristic is a sample identifier internal to "| __truncated__
#>  $ has_publication       : logi TRUE
#>  $ organisms             : chr "HOMO_SAPIENS"
#>  $ protocol_description  : chr "Cells were centrifuged at 2,600 rcf for 7 minutes (neurons) or 6,600 rcf for 7 minutes (other cell types) and t"| __truncated__
#>  $ publication_doi       : chr ""
#>  $ publication_title     : chr "Pharmacological Induction of RAS-GTP Confers RAF Inhibitor Sensitivity in KRAS Mutant Tumors."
#>  $ pubmed_id             : chr "30300582"
#>  $ source_first_published: chr "2018-10-02T00:00:00"
#>  $ source_last_modified  : chr "2019-01-04T00:00:00"
#>  $ submitter_institution : chr ""
#>  $ technology            : chr "RNA-SEQ"
#>  $ title                 : chr "4 NSCLC cell lines treated with GDC-0973, AZ-628 or a combination of both"