[BioRuby-cvs] bioruby/lib/bio/db/kegg compound.rb,0.13,0.14
Katayama Toshiaki
k at dev.open-bio.org
Thu Mar 8 00:10:07 UTC 2007
Update of /home/repository/bioruby/bioruby/lib/bio/db/kegg
In directory dev.open-bio.org:/tmp/cvs-serv13858
Modified Files:
compound.rb
Log Message:
* glycans method is added
* names method is changed to return array of strings which ';' is strippe
and surrounding spaces are consumed
Index: compound.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/kegg/compound.rb,v
retrieving revision 0.13
retrieving revision 0.14
diff -C2 -d -r0.13 -r0.14
*** compound.rb 15 Jan 2007 04:34:32 -0000 0.13
--- compound.rb 8 Mar 2007 00:10:05 -0000 0.14
***************
*** 32,39 ****
# NAME
def names
! lines_fetch('NAME')
end
def name
! names[0]
end
--- 32,40 ----
# NAME
def names
! field_fetch('NAME').split(/\s*;\s*/)
end
+
def name
! names.first
end
***************
*** 48,51 ****
--- 49,60 ----
end
+ # GLYCAN
+ def glycans
+ unless @data['GLYCAN']
+ @data['GLYCAN'] = fetch('GLYCAN').split(/\s+/)
+ end
+ @data['GLYCAN']
+ end
+
# REACTION
def reactions
More information about the bioruby-cvs
mailing list