HCABrowser: Browse the HCA

Description Usage Arguments Details Value Author(s) Examples

View source: R/HCABrowser.R

Description

Use HCABrowser() to create an object to connect with the Human Cell Atlas Data Coordination Platform Data Storage System (HCA DCP DSS).

searchBundles() searches the HCA DCP DSS for bundles matching the filters applied to the HCA object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
HCABrowser(
  host = "dss.data.humancellatlas.org",
  api_url = "https://dss.data.humancellatlas.org/v1/swagger.json",
  per_page = 10,
  authenticate = FALSE
)

getEsQuery(x)

undoEsQuery(x, n = 1L)

resetEsQuery(x)

searchBundles(
  x,
  output_format = c("summary", "raw"),
  replica = c("aws", "gcp"),
  per_page = 100L
)

## S4 method for signature 'HCABrowser'
show(object)

Arguments

host

character(1) path to hca-dcp server

api_url

character(1) path to hca-dcp api file

per_page

numeric(1). Max number of results to return per page.

authenticate

logical(1) authenticate? required for actions that update the HCA data repostiory (rare).

x

An HCABrowser object

n

integer(1) the number of filter queries to undo

output_format

character(1). Specifies the output format. Either "summary" or "raw". The default format, "summary", is a list of UUIDs for bundles that match the query. Set this parameter to "raw" to get the verbatim JSON metadata for bundles that match the query.

replica

character(1). A replica to fetch form. Can either be set to "aws" or "gcp". DEFAULT is "aws".

object

An HCAbrowser object to show

Details

getEsQuery(), undoEsQuery(), and resetEsQuery() retrieve, remove the most recent, or remove all filters added to an HCABrowser object via filter().

searchBundles() can return summary or raw results. summary results include the bundle_fqid (unique identifier) and bundle_url (location of a JSON file with complete bundle information). Up to 500 summary or 10 raw results can be returned per query; use nextResults() to 'page' through subsequent bundles.

Value

HCABrowser() returns an object representing the connection to the HCA DCP DSS.

getEsQuery() returns a JSON object representing the elastic search query formed by application of filter()andselect()' to an HCABrowser object.

undoEsQuery() returns an HCABrowser object with n fewer queries.

'resetEsQuery()' returns an HCABrowser object with no queries.

Author(s)

Daniel Van Twisk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
HCABrowser()

hca <-
    HCABrowser() %>%
    filter(organ.text == brain) %>%
    filter(organ.text == heart)

hca

str(getEsQuery(hca))

hca %>%
    undoEsQuery()

hca %>%
    resetEsQuery()

searchBundles(HCABrowser(), per_page = 10L) # All records!
HCABrowser() %>%
    filter(files.specimen_from_organism_json.organ.text == "brain") %>%
    searchBundles() %>%
    as_tibble()

Bioconductor/HCABrowser documentation built on Feb. 10, 2021, 12:51 p.m.