lib/lederhosen/tasks/cluster.rb in lederhosen-2.0.8 vs lib/lederhosen/tasks/cluster.rb in lederhosen-3.1.0

- old
+ new

@@ -2,26 +2,28 @@ class CLI desc 'cluster', 'reference-based clustering using usearch' - method_option :input, :type => :string, :required => true - method_option :database, :type => :string, :required => true - method_option :threads, :type => :numeric, :default => false - method_option :identity, :type => :numeric, :required => true - method_option :output, :type => :string, :required => true - method_option :strand, :type => :string, :default => 'plus' - method_option :dry_run, :type => :boolean, :default => false + method_option :input, :type => :string, :required => true + method_option :database, :type => :string, :required => true + method_option :threads, :type => :numeric, :default => false + method_option :identity, :type => :numeric, :required => true + method_option :output, :type => :string, :required => true + method_option :strand, :type => :string, :default => 'plus' + method_option :dry_run, :type => :boolean, :default => false + method_option :query_cov, :type => :numeric, :required => false, :default => 0.95 def cluster - input = File.expand_path(options[:input]) - database = File.expand_path(options[:database]) - threads = options[:threads] - identity = options[:identity] - output = File.expand_path(options[:output]) - strand = options[:strand] - dry_run = options[:dry_run] + input = File.expand_path(options[:input]) + database = File.expand_path(options[:database]) + threads = options[:threads] + identity = options[:identity] + output = File.expand_path(options[:output]) + strand = options[:strand] + dry_run = options[:dry_run] + query_cov = options[:query_cov] ohai "#{'(dry run)' if dry_run} clustering #{input} to #{database} and saving to #{output}" options.each_pair do |key, value| ohai "#{key} = #{value}" @@ -30,10 +32,11 @@ cmd = ['usearch', "--usearch_local #{input}", "--id #{identity}", "--uc #{output}", "--db #{database}", - "--strand #{strand}" + "--strand #{strand}", + "--query_cov #{query_cov}" ] # threads = False : use all threads (default) if threads != false cmd << "--threads #{threads}"