vfb_nblast: Query vfb opencpu server to obtain pre-computed nblast scores

View source: R/vfb_nblast.R

vfb_nblastR Documentation

Query vfb opencpu server to obtain pre-computed nblast scores

Description

Query vfb opencpu server to obtain pre-computed nblast scores

Usage

vfb_nblast(
  query,
  n = 50,
  target = c("FlyCircuit", "GMR-Gal4"),
  vfb_ids = NA,
  server = getOption("vfbr.server.r"),
  ...
)

Arguments

query

A single flycircuit identifier

n

The number of hits to return

target

The target data set to query

vfb_ids

Whether to expect and return VFB identifiers rather than the ids used in the original dataset. Default value vfb_ids=NA attempts to autodetect and return VFB ids.

server

The base url of the server

...

Additional arguments to be included in the POST

Value

a data.frame in descending score order with columns

  • id Flycircuit Neuron name

  • score NBLAST score

Examples

vfb_nblast('fru-M-200266')
# using a VFB id
vfb_nblast('VFB_00014755', n=10)


top10=vfb_nblast('fru-M-200266', target="GMR-Gal4", n = 10)
head(top10)

## Not run: 
library(nat.amira)
open_stack_viewer(getOption("vfbr.stack.downloads"), download_gmr_stacks(top10$id))

## End(Not run)

## Not run: 
# to use ocpu instance as an API
curl http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast/json \
  -d 'query="FruMARCM-M002262_seg001"'
# specify number of results to return
curl http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast/json \
  -d 'query="FruMARCM-M002262_seg001"&n=10'
# all results
curl http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast/json \
  -d 'query="FruMARCM-M002262_seg001"&n=0'
# with VFB id
curl http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast/json \
  -d 'query="VFB_00014755"&n=10'
# with VFB id, all results
curl http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast/json \
  -d 'query="VFB_00014755"&n=0'

## End(Not run)

jefferis/vfbr documentation built on Sept. 24, 2024, 1:37 p.m.