require 'maasha/findsim'
casts = []
-casts << {:long=>'database', :short=>'d', :type=>'file!', :mandatory=>true, :default=>nil, :allowed=>nil, :disallowed=>nil}
-casts << {:long=>'kmer', :short=>'k', :type=>'uint', :mandatory=>false, :default=>8, :allowed=>"4,5,6,7,8,9", :disallowed=>nil}
-casts << {:long=>'step', :short=>'s', :type=>'uint', :mandatory=>false, :default=>1, :allowed=>nil, :disallowed=>"0"}
-casts << {:long=>'min_score', :short=>'m', :type=>'float', :mandatory=>false, :default=>0.5, :allowed=>nil, :disallowed=>nil}
-casts << {:long=>'max_hits', :short=>'h', :type=>'uint', :mandatory=>false, :default=>7, :allowed=>nil, :disallowed=>"0"}
-casts << {:long=>'query_ids', :short=>'Q', :type=>'flag', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}
-casts << {:long=>'subject_ids', :short=>'S', :type=>'flag', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}
-casts << {:long=>'realign', :short=>'r', :type=>'flag', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}
+casts << {:long=>'database', :short=>'d', :type=>'file!', :mandatory=>true, :default=>nil, :allowed=>nil, :disallowed=>nil}
+casts << {:long=>'kmer', :short=>'k', :type=>'uint', :mandatory=>false, :default=>8, :allowed=>"4,5,6,7,8,9", :disallowed=>nil}
+casts << {:long=>'step', :short=>'s', :type=>'uint', :mandatory=>false, :default=>1, :allowed=>nil, :disallowed=>"0"}
+casts << {:long=>'min_score', :short=>'m', :type=>'float', :mandatory=>false, :default=>0.5, :allowed=>nil, :disallowed=>nil}
+casts << {:long=>'max_hits', :short=>'h', :type=>'uint', :mandatory=>false, :default=>20, :allowed=>nil, :disallowed=>"0"}
+casts << {:long=>'max_diversity', :short=>'M', :type=>'float', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}
+casts << {:long=>'query_ids', :short=>'Q', :type=>'flag', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}
+casts << {:long=>'subject_ids', :short=>'S', :type=>'flag', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}
+casts << {:long=>'realign', :short=>'r', :type=>'flag', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}
options = Biopieces.options_parse(ARGV, casts)
tmpdir = Biopieces.mktmpdir