Module: GEO::Eutils

Defined in:
lib/MARQ/GEO.rb

Overview

{{{ Eutils

Class Method Summary collapse

Class Method Details

.GPL_datasets(platform) ⇒ Object



34
35
36
37
# File 'lib/MARQ/GEO.rb', line 34

def self.GPL_datasets(platform)
  Open.read("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gds&term=#{platform}[Accession]&retmax=2000").
  scan(/<Id>(\d+?)<\/Id>/).collect{|id| id.first}.select{|id| !id.match(/^(1|2)000/) }.collect{|id| "GDS#{id}"}
end

.GSE_dataset?(gse) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
42
# File 'lib/MARQ/GEO.rb', line 39

def self.GSE_dataset?(gse)
  Open.read("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=geo&term=#{gse}[Accession]&retmax=2000").
  match(/<Id>(\d+?)<\/Id>/) != nil
end

.organism_platforms(org) ⇒ Object



28
29
30
31
32
# File 'lib/MARQ/GEO.rb', line 28

def self.organism_platforms(org)
  name = Organism.name(org)
  Open.read("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gds&term=\"#{name}\"[Organism:exp]+AND+%22gpl%22[Filter]&retmax=10000").
    scan(/<Id>(\d+?)<\/Id>/).collect{|id| id.first}.collect{|id| "GPL#{id.sub(/^100*/,'')}"}
end