Xref¶
Xref
¶
- class fastobo.xref.Xref(id, desc=None)¶
A cross-reference to another entity or an external resource.
Xrefs can be used in a
DefClause
to indicate the provenance of the definition, or in aSynonym
to add evidence from literature supporting the origin of the synonym.Example
>>> xref = fastobo.xref.Xref( ... fastobo.id.PrefixedIdent('ISBN', '978-0-321-84268-8'), ... )
- __eq__(value, /)¶
Return self==value.
- __ge__(value, /)¶
Return self>=value.
- __gt__(value, /)¶
Return self>value.
- __hash__ = None¶
- __le__(value, /)¶
Return self<=value.
- __lt__(value, /)¶
Return self<value.
- __ne__(value, /)¶
Return self!=value.
- __new__(**kwargs)¶
- __repr__()¶
Return repr(self).
- __str__()¶
Return str(self).
XrefList
¶
- class fastobo.xref.XrefList(xrefs=None)¶
A list of cross-references.
Example
>>> xrefs = ms[0][1].xrefs >>> print(xrefs) [PSI:MS] >>> xrefs[0] Xref(PrefixedIdent('PSI', 'MS'))
- __contains__(key, /)¶
Return key in self.
- __getitem__(key, /)¶
Return self[key].
- __len__()¶
Return len(self).
- __new__(**kwargs)¶
- __repr__()¶
Return repr(self).
- __str__()¶
Return str(self).
- append(object)¶
Append object to the end of the list.
- Raises:
TypeError – when the object is not of the right type for this container (see type-level documentation for the required type).
- clear()¶
Remove all items from list.
- copy()¶
Return a shallow copy of the list.
- count(value)¶
Return number of occurrences of value.
- Raises:
TypeError – when the object is not of the right type for this container (see type-level documentation for the required type).
- insert(index, object)¶
Insert
object
beforeindex
.If
index
is greater than the number of elements in the list,object
will be added at the end of the list.
- pop(index=-1)¶
Remove and return item at index (default last).
- Raises:
IndexError – when list is empty or index is out of range.
- reverse()¶
Reverse IN PLACE.