filters: HCA Filter Construction

View source: R/filters.R

filtersR Documentation

HCA Filter Construction

Description

facet_options() returns a character vector of possible facets to use during filtering.

filters() takes user input to be used as query filters. Each named argument is a list with a name specifying a verb (e.g., "is") and a character vector of allowed values, as in the examples. This input is then validated, reformatted to JSON, and encoded into a properly formatted URL.

Usage

facet_options()

filters(...)

## S3 method for class 'filters'
length(x)

## S3 method for class 'filters'
print(x, ...)

Arguments

...

named arguments, each of which is a list() specifying a query facet and its corresponding value to be used in the query

x

for length() and print(), an object of class filters.

Value

facet_options() returns a vector of all permissible query facets for the HCA api.

filters() returns a filters object representing validated filters in a format suitable for use in projects() and related functions.

Examples

facet_options()

filters()

filters(
    organ = list(is = "pancreas")
)

filters(
    organ = list(is = "pancreas"),
    genusSpecies = list(is = "Homo sapiens")
)

filters(
    fileFormat = list(is = c("fastq", "fastq.gz"))
)


Bioconductor/hca documentation built on July 28, 2022, 6:04 p.m.