Skip to content

barendt/gene_ontology

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gene_ontology

Parses gene ontology .obo files, links terms through is_a and provides methods to find levels and traverse the tree.

Examples

go = GeneOntology.new.from_file("gene_ontology.obo")
go.header # => a GeneOntology::Header object
go.id_to_term # => a hash from GO id to the GeneOntology::Term
some_term = go.id_to_term.values.first

# traverse the tree upwards, beginning with the current Term
some_term.each do |term|
  term.name =~ /Plasma Membrane/i
end
some_term.level  # => how many levels down from the top 3
                 # molecular_function, biol comp. etc are level 0

See LICENSE

About

simple class for working with GO (gene ontology); also see Bio::GO classes in bioruby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%