bin/polymarker.rb in bio-polyploid-tools-0.7.1 vs bin/polymarker.rb in bio-polyploid-tools-0.7.2
- old
+ new
@@ -59,10 +59,12 @@
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[:min_identity] = 90
+
options[:primer_3_preferences] = {
:primer_product_size_range => "50-150" ,
:primer_max_size => 25 ,
:primer_lib_ambiguity_codes_consensus => 1,
:primer_liberal_base => 1,
@@ -96,10 +98,14 @@
end
opts.on("-r", "--reference FILE", "Fasta file with the sequence for the markers (to complement --snp_list)") do |o|
options[:reference] = o
end
+
+ opts.on("-i", "--min_identity INT", "Minimum identity to consider a hit (default 90)") do |o|
+ options[:min_identity] = o.to_i
+ end
opts.on("-o", "--output FOLDER", "Output folder") do |o|
options[:output_folder] = o
end
@@ -121,18 +127,19 @@
opts.on("-x", "--extract_found_contigs", "If present, save in a separate file the contigs with matches. Useful to debug.") do |o|
options[:extract_found_contigs] = true
end
- opts.on("-P", "--primers_to_order")do
+ opts.on("-P", "--primers_to_order", "If present, save a separate file with the primers with the KASP tails")do
#TODO: have a string with the tails, optional.
options[:primers_to_order] = true
end
end.parse!
+
validate_files(options)
if options[:primer_3_preferences][:primer_product_size_range]
range = options[:primer_3_preferences][:primer_product_size_range]
range_arr = range.split("-")
@@ -170,10 +177,12 @@
primer_3_input="#{output_folder}/primer_3_input_temp"
primer_3_output="#{output_folder}/primer_3_output_temp"
exons_filename="#{output_folder}/exons_genes_and_contigs.fa"
output_primers="#{output_folder}/primers.csv"
output_to_order="#{output_folder}/primers_to_order.csv"
+min_identity= options[:min_identity]
+
@status_file="#{output_folder}/status.txt"
primer_3_config=File.expand_path(File.dirname(__FILE__) + '/../conf/primer3_config')
model=options[:model]
@@ -181,10 +190,10 @@
f=File.open(@status_file, "a")
f.puts "#{Time.now.to_s},#{status}"
f.close
end
-min_identity= 90
+
snps = Array.new
begin
write_status "Loading Reference"
\ No newline at end of file