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)
#> Error in extract_local_dataset(example_dataset_path): Could not find metadata file in download directory.

# Get the first experiment
example_se <- example_se_list[[1]]
#> Error in eval(expr, envir, enclos): object 'example_se_list' not found

example_se
#> Error in eval(expr, envir, enclos): object 'example_se' not found

# Get the first experiment's metadata
str(metadata(example_se))
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'metadata': object 'example_se' not found