diff --git a/lib/classyfire_api.rb b/lib/classyfire_api.rb index b24f8ae..782df44 100644 --- a/lib/classyfire_api.rb +++ b/lib/classyfire_api.rb @@ -1,7 +1,7 @@ require 'JSON' require 'csv' require 'rest-client' -require 'openbabel' +# require 'openbabel' # require 'node_resource.rb' module ClassyFireAPI @@ -167,7 +167,7 @@ module ClassyFireAPI #ID\tSMILES (OR INCHI, OR VALID IUPAC NAME) input <<"#{sline[0]}\t#{sline[1]}" end - input <<"#{sline[0]}" + # input <<"#{sline[0]}" end query_ids = [] @@ -184,16 +184,16 @@ module ClassyFireAPI if i <= subdivised_groups.length puts "\n\n\n\n---------------------- -----------" - # begin + begin puts "submitting #{title}" - puts subdivised_groups[i-1].join("\n") + # puts subdivised_groups[i-1].join("\n") q = submit_query(title,subdivised_groups[i-1].join("\n"),type) # puts q query_ids << JSON.parse(q)['id'] - # rescue Exception => e - # puts e.message - # puts e.backtrace.inspect - # end + rescue Exception => e + puts e.message + puts e.backtrace.inspect + end i = i + 1 else break @@ -241,7 +241,7 @@ module ClassyFireAPI if File.directory?(folder) Dir.foreach(folder) do |filename| puts "Filename: #{filename}" - ClassyFireAPI.submit_query_input_in_chunks(folder+"/"+filename,slice_length, type) unless filename == "." || filename == ".." || filename == ".DS_Store" + ClassyFireAPI.submit_query_input_in_chunks(folder+"/"+filename,slice_length, type) unless filename[0] == "." || File.directory?(filenmae) end else $stderr.puts "#{folder} is not a folder."