Skip to contents

This function expects an R list or vector describing a query and constructs an appropriate query url embedding a JSON query, GETs the server response and (by default) parses the JSON result.

Usage

vfb_owl_query(
  query,
  path = "do/jsonQuery.html?json=",
  server = getOption("vfbr.server"),
  parse.json = TRUE,
  ...
)

Arguments

query

A key-value list specifying the query

path

The path on the server containing the query page

server

The base url of the server

parse.json

Whether or no to parse the response (default: TRUE)

...

additional arguments passed to jsonlite::fromJSON

Details

Note that the VFB OWL query endpoint by default wraps all results inside a JSON result object called results. When parse.json=TRUE, the returned results will be unwrapped to remove this outer layer.

See also

Examples

if (FALSE) { # \dontrun{
# query for descendant classes of Fan-Shaped Body
vfb_owl_query(list(query_type="descendant_class", query="FBbt:00003679"))

# query for individual neurons overlapping with Fan-Shaped Body
neurondf=vfb_owl_query(list(query_type="individuals", query="FBbt:00003679"))
# show the first few rows of the returned data.frame
head(neurondf)
} # }