[Bioperl-l] SeqIO::swiss.pm and Annotation::Reference

Hilmar Lapp hlapp@gmx.net
Sun, 17 Sep 2000 16:30:42 +0200

Lorenz Pollak wrote:
> > 1) superfluous empty line after the seq (does this hurt according to the
> > specs?)
> done.
> > 2) empty GN line (again, does this hurt?)
> quickfix but done. :-)
> > 3) truncation of the OS line (at least in some cases)
> > 4) OC line not being written correctly (at least in some cases)
> ok, after having read the swissprot specs (dont know if it
> had been clear to you) i discovered that viruses have some different
> formats in the OS and OC lines. so what i'm doing is checking if the
> kingdom is =~ /viruses/i and then reading and writing the classification
> in a slightly different way.
> not very elegant, but as far as i can tell its at least working.

Very good. Thanks for the fixes.

> > An example is accession P25222 (SwissProt) (mentioned in bug report
> > #168). I can provide the entry if you need it.
> there's also another bug i've discovered by reading and writing
> protein P25222: there is a new format in the RX line of a
> literature reference! even in my swissprot specs file from
> may 2000 i couldnt find anything about this.
> it should be
> RX   MEDLINE; 12345678.
> but it is
> RX   MEDLINE=90278420; PubMed=2161902;
> what shall i do about this? (the Bio::Annotation::Reference Object has no
> property for that PubMed Reference yet)

Well, first I notice that the RX line is dropped from output, may be
because it hasn't been recognized as such during parse due to the deviant

Second, I don't really have a problem with adding a pubmed() method to

So, after inspecting Annotation::Reference I noticed / did the following:
1) Removed comment() because it only duplicated the inherited method.
2) Changed database() to allow for changing the hard-coded default of
MEDLINE (code shouldn't just silently ignore wrong calling attempts, and
if someone wants to have something else as MEDLINE here, why not).
3) added pubmed()
4) overrode optional_id() to become an alias for pubmed()
5) Fixed a bug in primary_id() that did not pass on the argument for set.


Hilmar Lapp                                email: hlapp@gmx.net
NFI Vienna, IFD/Bioinformatics             phone: +43 1 86634 631
A-1235 Vienna                                fax: +43 1 86634 727