]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_ruby/lib/maasha/usearch.rb
finished refactoring s/has_key?/[]/
[biopieces.git] / code_ruby / lib / maasha / usearch.rb
index c821cac5c0036aea8df7511fada127d82c7b8dcb..837585010f41fda3d18ea91292bdef452ba3076d 100644 (file)
@@ -78,13 +78,20 @@ class Usearch
   def usearch
     @command << "usearch --query #{@infile} --db #{@options[:database]} --userout #{@outfile}"
     @command << "--userfields target+tloz+thiz+query+bits+strand"
-    @command << "--id #{@options[:identity]}"  if @options.has_key? :identity
-    @command << "--evalue #{@options[:e_val]}" if @options.has_key? :e_val
+    @command << "--id #{@options[:identity]}"  if @options[:identity]
+    @command << "--evalue #{@options[:e_val]}" if @options[:e_val]
     @command << "--rev"
 
                execute
   end
 
+  # Method to execute uchime chimera detection.
+  def uchime
+    @command << "usearch --uchime #{@infile} --db #{@options[:database]} --uchimeout #{@outfile}"
+
+    execute
+  end
+
   # Method to execute ustar alignment.
   def ustar
     command = %Q{grep "^[SH]" #{@outfile} > #{@outfile}.sub}