[BioRuby-cvs] bioruby/lib/bio/shell/plugin obda.rb,1.4,1.5
Katayama Toshiaki
k at pub.open-bio.org
Sun Nov 27 21:09:54 EST 2005
Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin
In directory pub.open-bio.org:/tmp/cvs-serv8554/bio/shell/plugin
Modified Files:
obda.rb
Log Message:
* obdadbs, bioflat methods are added
Index: obda.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/obda.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** obda.rb 24 Nov 2005 19:32:49 -0000 1.4
--- obda.rb 28 Nov 2005 02:09:52 -0000 1.5
***************
*** 42,45 ****
--- 42,49 ----
def obda_get_entry(dbname, entry_id)
db = obda.get_database(dbname)
+ unless db
+ warn "Error: No such database (#{dbname})"
+ return
+ end
entry = db.get_by_id(entry_id)
if block_given?
***************
*** 51,55 ****
end
! end
--- 55,71 ----
end
! def obdadbs
! result = obda.databases.map {|db| db.database}
! display result
! return result
! end
+ def biofetch(db, id, style = 'raw', format = 'default')
+ serv = Bio::Fetch.new("http://www.ebi.ac.uk/cgi-bin/dbfetch")
+ result = serv.fetch(db, id, style, format)
+ display result
+ return result
+ end
+
+ end
More information about the bioruby-cvs
mailing list