Module: Annotations::GO::Genecodis::WS

Defined in:
lib/MARQ/annotations.rb

Class Method Summary collapse

Class Method Details

.analysis(org, list) ⇒ Object



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

.driverObject



370
371
372
373
374
375
# File 'lib/MARQ/annotations.rb', line 370

def self.driver
  require 'soap/wsdlDriver'
  wsdl_url = File.join('http://genecodis.dacya.ucm.es/static/wsdl/genecodisWS.wsdl')
  driver = SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver
  driver
end