ControlledVocabulary

class pyopenms.ControlledVocabulary

Bases: object

Cython implementation of _ControlledVocabulary

Original C++ documentation is available here

__init__()

Overload:

__init__(self) None

Overload:

__init__(self, in_0: ControlledVocabulary) None

Methods

__init__

Overload:

exists(self, id)

Returns true if the term is in the CV.

getAllChildTerms(self, terms, parent)

Writes all child terms recursively into terms

getTerm(self, id)

Returns a term specified by ID

getTermByName(self, name, desc)

Returns a term specified by name

hasTermWithName(self, name)

Returns true if a term with the given name is in the CV.

isChildOf(self, child, parent)

Returns True if child is a child of parent

loadFromOBO(self, name, filename)

Loads the CV from an OBO file

name(self)

Returns the CV name (set in the load method)

exists(self, id: Union[bytes, str, String]) bool

Returns true if the term is in the CV. Returns false otherwise.

getAllChildTerms(self, terms: Set[bytes], parent: Union[bytes, str, String]) None

Writes all child terms recursively into terms

getTerm(self, id: Union[bytes, str, String]) CVTerm_ControlledVocabulary

Returns a term specified by ID

getTermByName(self, name: Union[bytes, str, String], desc: Union[bytes, str, String]) CVTerm_ControlledVocabulary

Returns a term specified by name

hasTermWithName(self, name: Union[bytes, str, String]) bool

Returns true if a term with the given name is in the CV. Returns false otherwise

isChildOf(self, child: Union[bytes, str, String], parent: Union[bytes, str, String]) bool

Returns True if child is a child of parent

loadFromOBO(self, name: Union[bytes, str, String], filename: Union[bytes, str, String]) None

Loads the CV from an OBO file

name(self) Union[bytes, str, String]

Returns the CV name (set in the load method)