bundles: HCA Bundle Querying

View source: R/bundles.R

bundlesR Documentation

HCA Bundle Querying

Description

bundles() takes a list of user provided project titles to be used to query the HCA API for information about available bundles.

bundles_detail() takes a unique bundle_id and catalog for the bundle, and returns details about the specified bundle as a list-of-lists

Usage

bundles(
  filters = NULL,
  size = 100L,
  sort = "projectTitle",
  order = c("asc", "desc"),
  catalog = NULL,
  as = c("tibble", "lol", "list", "tibble_expanded"),
  columns = bundles_default_columns("character")
)

bundles_facets(facet = character(), catalog = NULL)

bundles_default_columns(as = c("tibble", "character"))

bundles_detail(uuid, catalog = NULL)

Arguments

filters

filter object created by filters(), or NULL (default; all projects).

size

integer(1) maximum number of results to return; default: all projects matching filter. The default (10000) is meant to be large enough to return all results.

sort

character(1) project facet (see facet_options()) to sort result; default: "projectTitle".

order

character(1) sort order. One of "asc" (ascending) or "desc" (descending).

catalog

character(1) source of data. Use catalogs() for possible values.

as

character(1) return format. One of "tibble" (default), "lol", "list", or "tibble_expanded", as described in the Details and Value sections of ?projects.

columns

named character() indicating the paths to be used for parsing the 'lol' returned from the HCA to a tibble. The names of columns are used as column names in the returned tibble. If the columns are unnamed, a name is derived from the elements of path by removing ⁠hits[*]⁠ and all ⁠[*]⁠, e.g., a path ⁠hits[*].donorOrganisms[*].biologicalSex[*]⁠ is given the name donorOrganisms.biologicalSex.

facet

character() of valid facet names. Summary results (see 'Value', below) are returned when missing or length greater than 1; details are returned when a single facet is specified.

uuid

character() unique identifier (e.g., projectId) of the object.

Value

bundles_detail() returns a list-of-lists containing relevant details about the bundle

Examples

title <- paste(
    "Tabula Muris: Transcriptomic characterization of 20 organs and",
    "tissues from Mus musculus at single cell resolution"
)
filters <- filters( projectTitle = list(is = title) )
bundles(filters = filters)

bundles_facets()

bundle <- bundles(size = 1, as = "list")
bundle_uuid <- bundle[["hits"]][[1]][["entryId"]]
bundles_detail(uuid = bundle_uuid) |> lol() |>
lol_filter(is_leaf) |> print(n = Inf)


Bioconductor/hca documentation built on Nov. 1, 2024, 5:45 a.m.