Class: FastestOptimum

Inherits:
Biopsy::ObjectiveFunction show all
Defined in:
lib/biopsy/objectives/fastest_optimum.rb

Overview

objective function to count number of conditioned reciprocal best usearch annotations

Instance Method Summary collapse

Instance Method Details

#essential_filesObject



22
23
24
# File 'lib/biopsy/objectives/fastest_optimum.rb', line 22

def essential_files
  return ['bestmatches.rbu']
end

#run(optdata, threads: 6) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/biopsy/objectives/fastest_optimum.rb', line 6

def run(optdata, threads:6)
  info "running objective: FastestOptimum"
  t0 = Time.now
  @threads = threads
  # extract input data
  @assembly = assemblydata[:assembly]
  @assembly_name = assemblydata[:assemblyname]
  @reference = assemblydata[:reference]
  # results
  res = self.rbusearch
  return { :weighting => 1.0,
           :optimum => 26000,
           :max => 26000.0,
           :time => Time.now - t0}.merge res
end