lib/lederhosen/tasks/cluster.rb in lederhosen-0.1.9 vs lib/lederhosen/tasks/cluster.rb in lederhosen-0.2.0

- old
+ new

@@ -10,32 +10,38 @@ method_option :input, :type => :string, :required => true method_option :output, :type => :string, :required => true method_option :identity, :type => :numeric, :required => true method_option :stepwords, :type => :numeric, :default => 8 - method_option :wordlen, :type => :numeric, :default => 8 - method_option :maxaccepts, :type => :numeric, :default => 1 - method_option :maxrejects, :type => :numeric, :default => 8 + method_option :wordlen, :type => :numeric, :default => 8 + method_option :maxaccepts, :type => :numeric, :default => 1 + method_option :maxrejects, :type => :numeric, :default => 8 + method_option :lib, :type => :string def cluster identity = options[:identity] output = options[:output] input = options[:input] stepwords = options[:stepwords] maxaccepts = options[:maxaccepts] maxrejects = options[:maxrejects] wordlen = options[:wordlen] + lib = options[:lib] cmd = [ 'uclust', "--input #{input}", "--uc #{output}", "--id #{identity}", "--stepwords #{stepwords}", "--maxaccepts #{maxaccepts}", "--maxrejects #{maxrejects}", "--w #{wordlen}" - ].join(' ') + ] + + cmd << "--lib #{lib}" unless lib.nil? + + cmd = cmd.join(' ') @shell.mute { run cmd } end end