Xref#
- class fastobo.xref.Xref(id, desc=None)#
A cross-reference to another entity or an external resource.
Xrefs can be used in a
DefClauseto indicate the provenance of the definition, or in aSynonymto 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.
- __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).
- 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 bool(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
objectbeforeindex.If
indexis greater than the number of elements in the list,objectwill 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.