loadHCAMatrix: Obtain expression matrix data from the Human Cell Atlas API...

View source: R/loadHCAMatrix.R

loadHCAMatrixR Documentation

Obtain expression matrix data from the Human Cell Atlas API service

Description

Using a vector of data bundle identifiers ('bundle_fqids'), users can request the associated matrix of expression values. The query submitted by 'loadHCAMatrix' may take some time to be completed. Once the query is completed, either a 'LoomExperiment', 'SingleCellExperiment', or 'tibble' table is returned (depending on the value of 'format').

Usage

loadHCAMatrix(
  api,
  bundle_fqids,
  verbose = FALSE,
  names.col = "CellID",
  format = c("loom", "mtx", "csv"),
  feature = c("gene", "transcript")
)

Arguments

api

An API object of class 'HCAMatrix' from the 'HCAMatrix' function

bundle_fqids

character() v0 Bundle identifiers

verbose

logical (default FALSE) whether to output stepwise messages

names.col

character (default "CellID") The column name in the 'colData' metadata to use as column names of the LoomExperiment object when 'format = "loom"'

format

character(1) Data return format, one of: c("loom", "mtx", "csv"); (default: "loom")

feature

character(1) Provide either cell by "gene" or "transcript" matrices (default: "gene")

Value

A 'LoomExperiment', 'SingleCellExperiment' or 'tibble' object

Examples


hca <- HCAMatrix()

## with an bundle_fqid character vector

bundle_fqids <-
    c("ffd3bc7b-8f3b-4f97-aa2a-78f9bac93775.2019-05-14T122736.345000Z",
    "f69b288c-fabc-4ac8-b50c-7abcae3731bc.2019-05-14T120110.781000Z",
    "f8ba80a9-71b1-4c15-bcfc-c05a50660898.2019-05-14T122536.545000Z")

loadHCAMatrix(hca, bundle_fqids)

## using filtering operation

hca2 <- filter(hca, dss_bundle_fqid %in% bundle_fqids)
filters(hca2)
loadHCAMatrix(hca2)


Bioconductor/HCAMatrixBrowser documentation built on March 16, 2023, 6:16 a.m.