jefferis / vfbr

R Package to Access the Virtual Fly Brain project API

Home Page:https://jefferis.github.io/vfbr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vfb_tovfbids no longer works for flycircuit ids unless fixed=FALSE

jefferis opened this issue · comments

fixed=FALSE used to imply wild card matching via the label field whereas when fixed=TRUE the label_s field was used for exact matches. However I don't think the label_s exists any more and certainly searches against it no longer work @Robbie1977 can you comment?

See esp l.59

vfbr/R/vfbids.R

Lines 48 to 61 in c2028a3

#' @param ids One or more external identifiers. Solr wildcards can also be used
#' when \code{fixed=FALSE}- see examples and \code{\link{vfb_solr_query}}
#' @param fixed Whether to insist on exact matches. When \code{fixed=FALSE} solr
#' wildcards can be used.
#' @rdname vfb_fromvfbids
#' @export
#' @examples
#' # Some GMR GAL4 lines
#' gmrs=c('93D09', '87F10')
#' vfb_tovfbids(sprintf("GMR_%s*", gmrs), fixed=FALSE)
vfb_tovfbids<-function(ids, fixed=TRUE, ...){
query_field=ifelse(fixed, "label_s:", "label:")
q=paste0(query_field, ids, collapse = " ")
rdf=vfb_solr_query(filterquery="VFB_*",query=q, fields = "short_form+label", rows = Inf, ...)

label_s doesn't exist anymore as it would be label_str in the latest solr by default. You could search in 'synonym_autosuggest' to be safer as this contains all labels and synonyms in multiple formats.