vfb_fromvfbids: Convert between VFB and external identifiers

Description Usage Arguments Details Value See Also Examples

View source: R/vfbids.R

Description

Convert between VFB and external identifiers

Usage

1
2
3
vfb_fromvfbids(vfbids, ..., mustWork = NA)

vfb_tovfbids(ids, fixed = TRUE, ...)

Arguments

vfbids

One or more vfb identifiers. Solr wildcards can also be used when fixed=FALSE- see examples and vfb_solr_query

...

Additional arguments passed to vfb_solr_query.

mustWork

logical: if TRUE then an error is given if there are missing results; if NA then a warning; if FALSE then there will be no message but missing values will still be denoted by NA values.

ids

One or more external identifiers. Solr wildcards can also be used when fixed=FALSE- see examples and vfb_solr_query

fixed

Whether to insist on exact matches. When fixed=FALSE solr wildcards can be used.

Details

Note that these functions are not appropriate for fetching more than ~ 200 identifiers individually specified identifiers. If a large number of identifiers are required, it is a much better idea to fetch all ids and then filter locally.

Value

A character vector of vfb ids (for vfb_fromvfbids) or external identifiers (for vfb_tovfbids) in the same order as the input query. Missing values will be denoted by NAs when fixed=TRUE. When fixed=FALSE and a wild-card search returns no results a character vector of length 0 will be returned.

See Also

gmr_vfbid, vfb_solr_query, which powers the underlying queries.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# some flycircuit ids
fcids=c("VGlut-F-000304", "VGlut-F-200278", "fru-F-200121", "TH-F-300016")
vfbids=vfb_tovfbids(fcids)
vfb_fromvfbids(vfbids)

# make up a fake id for testing - will give a warning

vfb_fromvfbids(c(vfbids, "VFB_10013392"))

# Some GMR GAL4 lines
gmrs=c('93D09', '87F10')
vfb_tovfbids(sprintf("GMR_%s*", gmrs), fixed=FALSE)

jefferis/vfbr documentation built on Feb. 17, 2021, 4:46 p.m.