VfbConnect: Return reference to VfbConnect object

View source: R/vfb_connect.R

VfbConnectR Documentation

Return reference to VfbConnect object

Description

Return reference to VfbConnect object

Usage

VfbConnect(..., raw = FALSE, cache = TRUE)

Arguments

...

Additional arguments passed to Python's 'VfbConnect'. See examples.

raw

Whether to return python list containing raw JSON (default FALSE)

cache

Whether to cache the VfbConnect object (default T since this can save some time).

Details

See https://pypi.org/project/vfb-connect/. The raw=TRUE option is mostly useful to see what output would look like.

Value

An list containing the processed results or (when raw=TRUE) as python list containing raw JSON.

Examples


vc=VfbConnect()
# large return, so use str
str(vc$neo_query_wrapper$get_type_TermInfo(list('FBbt_00003686')), max=2)
# do this to explore
# vc$neo_query_wrapper$get_type_TermInfo(list('FBbt_00003686')) %>% View()
vc$neo_query_wrapper$get_type_TermInfo(list('FBbt_00003686'), summary=TRUE)
# the same but returning raw JSON
vc2=VfbConnect(raw=TRUE)
vc2$neo_query_wrapper$get_type_TermInfo(list('FBbt_00003686'), summary=TRUE)

# Information about a dataset linked to a paper
vc$neo_query_wrapper$get_DataSet_TermInfo(list('Ito2013'), summary=TRUE)

vc$neo_query_wrapper$get_anatomical_individual_TermInfo(list('VFB_00010001'),  summary=TRUE) %>%
vc_df()

# Get all terms relevant to a brain region (all parts and all overlapping cells)
# Query by label supported by default
#
vc$get_terms_by_region('fan-shaped body', summary=TRUE) %>%
  vc_df() %>%
  head(10)

## Not run: 
# specify a particular neo4j graph database endpoint
vc = VfbConnect(neo_endpoint="http://pdb.p2.virtualflybrain.org")

## End(Not run)

jefferis/vfbconnectr documentation built on Sept. 4, 2024, 4:52 p.m.