From: martinahansen Date: Wed, 18 Apr 2012 08:07:05 +0000 (+0000) Subject: added to_bp method to findsim.rb X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e1636838d3a9c7cb27900d67d7170c5e011ec806;p=biopieces.git added to_bp method to findsim.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1798 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_ruby/lib/maasha/findsim.rb b/code_ruby/lib/maasha/findsim.rb index cd07b8e..6c794e3 100644 --- a/code_ruby/lib/maasha/findsim.rb +++ b/code_ruby/lib/maasha/findsim.rb @@ -580,6 +580,17 @@ class FindSim def to_s "#{@q_id}:#{@s_id}:#{@score.round(2)}" end + + # Method to convert to a Biopiece record. + def to_bp + hash = {} + hash[:REC_TYPE] = "findsim" + hash[:Q_ID] = @q_id + hash[:S_ID] = @s_id + hash[:SCORE] = @score.round(2) + + hash + end end end