[BioRuby] Bio::GO details

Marc Hoeppner marc.hoeppner at molbio.su.se
Fri Feb 27 06:54:05 UTC 2009


Hi Kevin,

if you have a mapping of your mosquito genes to FlyBase accession 
numbers, the fastest way to get this information would probably be the 
Ensembl api (http://wiki.github.com/jandot/ruby-ensembl-api).

The code would look something like this, given you have this mapping in 
say a csv-type file (comma separated)


require 'ensembl'

Ensembl::Core::DBConnection.connect('drosophila_melanogaster')

infile = IO.readlines(ARGV.shift) # reading your comma-separated 
accession mapping file (one line per mapping)

infile.each do |line|

    accs = line.split(",")                 # Split the comma-sep. 
entries into an array
    drosphila_acc = accs.shift       # the first entry is the Drosophila acc
    mosq_acc = accs.shift             # the second entry is you Mosq. acc

    gene = Ensembl::Core::Gene.find_by_stable_id(drosophila_acc)
   
    print "#{mosq_acc}"

    gene.go_terms.each do |go|
   
         print ",#{go}"
   
    end
   
    print "\n"

end

That would print each mosq. accession/uniq identifier and all  the GO 
terms from the Drosphila homologue (orthologue, I assume) into one line, 
comma separated - which can then be opened in Excel as a spread sheet.
Now, if you need to get information on what is behind these terms, the 
geneontology.org website should be a good starting point for finding 
analysis-tools.

Hope that helped,

Marc
   


> Greetings RUBY gurus,
>
> I am relatively new to using Bioruby and am hoping that someone might 
> be able to point me to some documentation on using the GO class.  I 
> have a bunch of sequences from a mosquito cDNA microarray and have a 
> large number of them with strong homology to Drosophila sequences.  
> This I have taken care of using Bio::Blast.
>
> Now I want to see if I can find the GO information for the Drosophila 
> homologs to see if I can gain some insight into my dataset.  I know 
> enough programming to get myself into trouble, and would like to work 
> on some scripts to get the GO information, but haven't been able to 
> find any documentation that I could even use to get started.
>
> Any links or citations that come to mind - I would appreciate it.
>
> Cheers,
> Kevin
>
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby


-- 

Marc P. Hoeppner
PhD student
Department of Molecular Biology and Functional Genomics
Stockholm University, 10691 Stockholm, Sweden

marc.hoeppner at molbio.su.se
Tel: +46 (0)8 - 164195




More information about the BioRuby mailing list