openbabel
This commit is contained in:
parent
7b532839d9
commit
0bb37b1178
|
@ -1,7 +1,7 @@
|
||||||
require 'JSON'
|
require 'JSON'
|
||||||
require 'csv'
|
require 'csv'
|
||||||
require 'rest-client'
|
require 'rest-client'
|
||||||
require 'openbabel'
|
# require 'openbabel'
|
||||||
# require 'node_resource.rb'
|
# require 'node_resource.rb'
|
||||||
|
|
||||||
module ClassyFireAPI
|
module ClassyFireAPI
|
||||||
|
@ -167,7 +167,7 @@ module ClassyFireAPI
|
||||||
#ID\tSMILES (OR INCHI, OR VALID IUPAC NAME)
|
#ID\tSMILES (OR INCHI, OR VALID IUPAC NAME)
|
||||||
input <<"#{sline[0]}\t#{sline[1]}"
|
input <<"#{sline[0]}\t#{sline[1]}"
|
||||||
end
|
end
|
||||||
input <<"#{sline[0]}"
|
# input <<"#{sline[0]}"
|
||||||
end
|
end
|
||||||
|
|
||||||
query_ids = []
|
query_ids = []
|
||||||
|
@ -184,16 +184,16 @@ module ClassyFireAPI
|
||||||
|
|
||||||
if i <= subdivised_groups.length
|
if i <= subdivised_groups.length
|
||||||
puts "\n\n\n\n---------------------- -----------"
|
puts "\n\n\n\n---------------------- -----------"
|
||||||
# begin
|
begin
|
||||||
puts "submitting #{title}"
|
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)
|
q = submit_query(title,subdivised_groups[i-1].join("\n"),type)
|
||||||
# puts q
|
# puts q
|
||||||
query_ids << JSON.parse(q)['id']
|
query_ids << JSON.parse(q)['id']
|
||||||
# rescue Exception => e
|
rescue Exception => e
|
||||||
# puts e.message
|
puts e.message
|
||||||
# puts e.backtrace.inspect
|
puts e.backtrace.inspect
|
||||||
# end
|
end
|
||||||
i = i + 1
|
i = i + 1
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
|
@ -241,7 +241,7 @@ module ClassyFireAPI
|
||||||
if File.directory?(folder)
|
if File.directory?(folder)
|
||||||
Dir.foreach(folder) do |filename|
|
Dir.foreach(folder) do |filename|
|
||||||
puts "Filename: #{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
|
end
|
||||||
else
|
else
|
||||||
$stderr.puts "#{folder} is not a folder."
|
$stderr.puts "#{folder} is not a folder."
|
||||||
|
|
Loading…
Reference in New Issue