[BioRuby] Detect error from Bio::Fetch
Yen-Ju Chen
yjchenx at gmail.com
Thu Dec 13 05:22:36 UTC 2007
This is the script I run:
require 'bio'
serv = Bio::Fetch.new()
entry = serv.fetch('swissprot', 'not_existing_id')
swissprot = Bio::SwissProt.new(entry)
p swissprot.entry_name # <== Error raises here
The problem is that Bio.Fetch does not raise an exception or something
else to notify that it cannot find the entry in database. An error
shows up only at 'swissprot.entry_name'. It would be nice to detect
the error early on, either in Bio::Fetch.fetch() or
Bio::SwissProt.new().
Yen-Ju
More information about the BioRuby
mailing list