Method: Bio::FlatFileIndex#include?

Defined in:
lib/bio/io/flatfile/index.rb

#include?(key) ⇒ Boolean

Searching databank. If some entries are found, returns an array of unique IDs (primary identifiers). If not found anything, returns nil.

This method is useful when search result is very large and #search method is very slow.

Returns:

  • (Boolean)


210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/bio/io/flatfile/index.rb', line 210

def include?(key)
  check_closed?
  if @names then
    r = @db.search_namespaces_get_unique_id(key, *@names)
  else
    r = @db.search_all_get_unique_id(key)
  end
  if r.empty? then
    nil
  else
    r
  end
end