torchtree.evolution.taxa#

Classes#

Taxon

Abstract class making an object identifiable.

Taxa

Abstract class making an object identifiable.

Module Contents#

class torchtree.evolution.taxa.Taxon(id_, attributes)[source]#

Bases: torchtree.core.model.Identifiable, collections.UserDict

Abstract class making an object identifiable.

Parameters:

id (str or None) – identifier of object

classmethod from_json(data, dic)[source]#

Abstract method to create object from a dictionary.

Parameters:
  • data (dict[str, Any]) – dictionary representation of a torchtree object.

  • dic (dict[str, Any]) – dictionary containing other torchtree objects keyed by their ID.

Returns:

torchtree object.

Return type:

Any

class torchtree.evolution.taxa.Taxa(id_, taxa)[source]#

Bases: torchtree.core.model.Identifiable, collections.UserList

Abstract class making an object identifiable.

Parameters:

id (str or None) – identifier of object

classmethod from_json(data, dic)[source]#

Abstract method to create object from a dictionary.

Parameters:
  • data (dict[str, Any]) – dictionary representation of a torchtree object.

  • dic (dict[str, Any]) – dictionary containing other torchtree objects keyed by their ID.

Returns:

torchtree object.

Return type:

Any