Module: GEO::Process::R

Defined in:
lib/MARQ/GEO.rb

Overview

R library wrapper

Constant Summary collapse

@@r =
nil

Class Method Summary collapse

Class Method Details

.GDS(name, prefix, id_field = nil, id_file = nil) ⇒ Object

Use R to load process the dataset



303
304
305
# File 'lib/MARQ/GEO.rb', line 303

def self.GDS(name, prefix, id_field = nil, id_file = nil)
  r.GEO_GDS_process(name, prefix, id_field, id_file, CACHE_DIR)
end

.GPL(name, prefix, id_field = nil) ⇒ Object

Use R to load GPL info



298
299
300
# File 'lib/MARQ/GEO.rb', line 298

def self.GPL(name, prefix, id_field = nil)
  r.GEO_GPL_process(name, prefix, id_field, CACHE_DIR)
end

.GSE(gsms, conditions, do_log, prefix, id_file = nil, fields = nil, title = nil, description = nil) ⇒ Object

Use R to load process the series



308
309
310
# File 'lib/MARQ/GEO.rb', line 308

def self.GSE(gsms, conditions, do_log, prefix, id_file = nil, fields= nil, title = nil, description = nil)
  r.GEO_GSE_process(gsms, conditions, prefix, do_log, id_file, fields, title, description, CACHE_DIR)
end

.rObject

Get the R instance



283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/MARQ/GEO.rb', line 283

def self.r
  if @@r.nil?

    # FIXME: RSruby does not install very well, this require id hidden here.
    require 'rsruby'

    RSRuby.instance.source(MARQ.rootdir + '/R/MA.R')
    RSRuby.instance.source(MARQ.rootdir + '/R/GEO.R')
    RSRuby.instance.source(MARQ.rootdir + '/R/GEOquery_patch.R')
    @@r = RSRuby.instance
  end
  @@r
end