Fetches a custom dataset and returns a structured summary of its contents, including its processing status and a per-sample table describing the modality of each sample.
Usage
get_dataset_info(dataset, auth_token = Sys.getenv("SCPCA_AUTH_TOKEN"))Arguments
- dataset
the dataset UUID string (such as the value returned by
create_dataset()), or a list with an$idelement (such as the value returned by this function).- auth_token
an authorization token from
get_auth(). Defaults to theSCPCA_AUTH_TOKENenvironment variable, whichget_auth()sets automatically.
Value
a named list with the following elements:
id: the dataset UUID stringformat: the dataset file format (e.g. "SINGLE_CELL_EXPERIMENT", "ANN_DATA")status: the processing status — one of "pending", "processing", "succeeded", "failed", or "expired" (seeget_dataset_status())n_samples: the total number of samples in the dataset, taken from the API'stotal_sample_countn_projects: the number of projects in the datasetsample_info: a data frame with one row per included sample and the following columns:scpca_sample_idscpca_project_idseq_unit("cell" or "nucleus", orNAif the sample is not included as single-cell)has_spatialhas_bulkhas_cite_seqhas_multiplexed
merged_projects: a character vector of project IDs whose single-cell data is merged;character(0)when none
Details
For each project, the included samples and their modality details are looked
up from the project's sample records (one request per project), so merged
projects (whose individual sample IDs are not enumerated in the dataset
record) are expanded to all of their single-cell samples. Projects whose
single-cell data is merged are also listed in merged_projects.
Examples
if (FALSE) { # \dontrun{
ds_id <- create_dataset(samples = c("SCPCS000001", "SCPCS000002"))
info <- get_dataset_info(ds_id)
info$status
info$sample_info
} # }