377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
|
# File 'lib/MARQ/annotations.rb', line 377
def self.analysis(org, list)
puts "GO for #{ org } #{list.length} genes"
gc_org = ORGS[org.to_s]
return [] if gc_org.nil?
job_id = driver.analyze(gc_org,2,0,-1,3,list,%w(GO_Biological_Process ),[])
while (stat = driver.status(job_id)) == 1
sleep 1
end
if stat < 0
return []
else
lines = driver.results(job_id).collect{|l| l.chomp}
lines.shift
lines.collect{|l| Hash[*FIELDS.zip(l.chomp.split(/\t/)).flatten]}
end
rescue
puts $!.message
puts $!.backtrace
end
|