bin/polymarker.rb in bio-polyploid-tools-0.6.1 vs bin/polymarker.rb in bio-polyploid-tools-0.7.0
- old
+ new
@@ -49,10 +49,11 @@
options[:model] = "est2genome"
options[:arm_selection] = arm_selection_functions[:arm_selection_embl] ;
options[:flanking_size] = 150;
options[:variation_free_region] = 0
options[:extract_found_contigs] = false
+options[:genomes_count] = 3
options[:primer_3_preferences] = {
:primer_product_size_range => "50-150" ,
:primer_max_size => 25 ,
:primer_lib_ambiguity_codes_consensus => 1,
:primer_liberal_base => 1,
@@ -69,10 +70,14 @@
end
opts.on("-m", "--marker_list FILE", "File with the list of markers to search from") do |o|
options[:marker_list] = o
end
+
+ opts.on("-g", "--genomes_count INT", "Number of genomes (default 3, for hexaploid)") do |o|
+ options[:genomes_count] = o.to_i
+ end
opts.on("-s", "--snp_list FILE", "File with the list of snps to search from, requires --reference to get the sequence using a position") do |o|
options[:snp_list] = o
end
@@ -122,11 +127,11 @@
if options[:primer_3_preferences][:primer_product_size_range]
range = options[:primer_3_preferences][:primer_product_size_range]
range_arr = range.split("-")
min = range_arr[0].to_i
max = range_arr[1].to_i
- raise Bio::DB::Exonerate::ExonerateException.new "Ragne #{range} is invalid!" unless max > min
+ raise Bio::DB::Exonerate::ExonerateException.new "Range #{range} is invalid!" unless max > min
options[:flanking_size] = max
end
p options
p ARGV
@@ -212,10 +217,11 @@
end
else
rise Bio::DB::Exonerate::ExonerateException.new "Wrong number of arguments. "
end
rise Bio::DB::Exonerate::ExonerateException.new "No SNP for line '#{line}'" if snp == nil
-
+
+ snp.genomes_count = options[:genomes_count]
snp.snp_in = snp_in
snp.original_name = original_name
if snp.position
snps << snp
else
\ No newline at end of file