bin/polymarker.rb in bio-polyploid-tools-0.6.0 vs bin/polymarker.rb in bio-polyploid-tools-0.6.1
- old
+ new
@@ -26,10 +26,23 @@
arm_selection_functions[:arm_selection_morex] = lambda do | contig_name |
ret = contig_name.split(':')[0].split("_")[1];
return ret
end
+def validate_files(o)
+
+ [
+ o[:path_to_contigs],
+ o[:marker_list],
+ o[:snp_list],
+ o[:mutant_list],
+ o[:reference]
+ ].flatten.compact.each do |f|
+ raise IOError "Unable to read #{f}" unless File.exists? f
+ end
+end
+
options = {}
options[:path_to_contigs] = "/tgac/references/external/projects/iwgsc/css/IWGSC_CSS_all_scaff_v1.fa"
options[:chunks] = 1
options[:bucket_size] = 0
options[:bucket] = 1
@@ -102,10 +115,12 @@
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("-")
min = range_arr[0].to_i
max = range_arr[1].to_i
@@ -265,10 +280,10 @@
container= Bio::PolyploidTools::ExonContainer.new
container.flanking_size=options[:flanking_size]
container.gene_models(temp_fasta_query)
-container.chromosomes(fasta_reference)
+container.chromosomes(target)
container.add_parental({:name=>snp_in})
container.add_parental({:name=>original_name})
snps.each do |snp|
snp.container = container
snp.flanking_size = container.flanking_size
\ No newline at end of file