PyOpenWorm.document module

exception PyOpenWorm.document.PubmedRetrievalException[source]

Bases: Exception

exception PyOpenWorm.document.WormbaseRetrievalException[source]

Bases: Exception

class PyOpenWorm.document.BaseDocument(**kwargs)[source]

Bases: PyOpenWorm.dataObject.DataObject

class PyOpenWorm.document.Document(bibtex=None, doi=None, pubmed=None, wormbase=None, **kwargs)[source]

Bases: PyOpenWorm.document.BaseDocument

A representation of some document.

Possible keys include:

pmid, pubmed: a pubmed id or url (e.g., 24098140)
wbid, wormbase: a wormbase id or url (e.g., WBPaper00044287)
doi: a Digitial Object id or url (e.g., s00454-010-9273-0)
uri: a URI specific to the document, preferably usable for accessing
     the document
defined_augment(self)[source]

This fuction must return False if identifier_augment() would raise an IdentifierMissingException. Override it when defining a non-standard identifier for subclasses of DataObjects.

identifier_augment(self)[source]

Override this method to define an identifier in lieu of one explicity set.

One must also override defined_augment() to return True whenever this method could return a valid identifier. IdentifierMissingException should be raised if an identifier cannot be generated by this method.

Raises:
IdentifierMissingException
update_from_wormbase(self, replace_existing=False)[source]

Queries wormbase for additional data to fill in the Document.

If replace_existing is set to True, then existing values will be cleared.

author

An author of the document

date

Alias to year

doi

A Digital Object Identifier (DOI), optional

pmid

A PubMed ID (PMID) that points to a paper

title

The title of the document

uri

A non-standard URI for the document

wbid

An ID from WormBase.org that points to a record, optional

wormbaseid

An alias to wbid

year

The year (e.g., publication year) of the document