[BioRuby] KEGG API
Naohisa Goto
ngoto at gen-info.osaka-u.ac.jp
Thu Jul 8 19:34:19 UTC 2010
Hi,
It is reproduced with SOAP4R 1.5.8, the latest release version of SOAP4R.
It can not be reproduced with SOAP4R 1.5.5 bundled with Ruby 1.8.7-p299.
>From the revision 1683 of SOAP4R, it does not add mappings for already
defined methods.
http://dev.ctor.org/soap4r/changeset/1683
In Debian (and Ubuntu) package version of Ruby 1.8.7, the patch is
applied to prevent memory exhaust problem as a security fix.
The workaround is to use SOAP::Mapping::Object#[].
For example, use rel["type"] instead of rel.type.
api = Bio::KEGG::API.new
relations = api.get_element_relations_by_pathway('path:bsu00010')
relations.each do |rel|
puts rel.element_id1
puts rel.element_id2
puts rel["type"]
rel.subtypes.each do |sub|
puts sub.element_id
puts sub.relation
puts sub["type"]
end
end
> Dear All
>
> I have a question about KEGG API on BioRuby.
> When I use "type" method, "deprecated" message was returned.
> While, the method "type" is still working, refer to KEGG manual.
>
> ## Script I used is below
>
> relations = get_element_relations_by_
> pathway('path:bsu00010')
> relations.each do |rel|
> puts rel.element_id1
> puts rel.element_id2
> puts rel.type
> rel.subtypes.each do |sub|
> puts sub.element_id
> puts sub.relation
> puts sub.type
> end
> end
>
> Result for sub.type => "sub.type was deprecated use class"
>
>
> How can I receive type property in the class
> "get_element_relations_by_pathway" ?
>
> With best wishes,
>
> Daiji Endoh
> _______________________________________________
> BioRuby Project - http://www.bioruby.org/
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby
--
Naohisa Goto
ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org
More information about the BioRuby
mailing list