extract_local_dataset: load a list of 'SummarizedExperiment's from an extracted...

View source: R/extract_local_dataset.R

extract_local_datasetR Documentation

load a list of SummarizedExperiments from an extracted RefineBio download

Description

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.

Details

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

Value

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

Author(s)

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

# Get the first experiment's metadata
str(metadata(example_se))


seandavi/RefineBio documentation built on June 1, 2025, 4:10 p.m.