Akin#

class panorama.geneFamily.Akin(identifier, reference, *gene_families)#

Bases: object

Represents a group of gene families that are similar across multiple pangenomes.

ID#

The identifier of the Akin instance.

Type:

int

reference#

The reference gene family name.

Type:

str

_families#

A dictionary of gene families in the Akin group.

Type:

dict

__getitem__(name)#

Retrieves a GeneFamily from the Akin group by name.

Parameters:

name (str) – The name of the GeneFamily to retrieve.

Returns:

GeneFamily – The GeneFamily instance with the specified name.

Raises:

KeyError – If the GeneFamily with the given name does not exist in the Akin group.

Return type:

GeneFamily

__init__(identifier, reference, *gene_families)#

Initializes an Akin instance.

Parameters:
  • identifier (int) – The identifier of the Akin instance.

  • reference (GeneFamily) – The reference GeneFamily instance.

  • *gene_families (GeneFamily) – Additional GeneFamily instances to add.

__setitem__(name, family)#

Adds a GeneFamily to the Akin group.

Parameters:
  • name (str) – The name of the GeneFamily.

  • family (GeneFamily) – The GeneFamily instance to add.

Raises:

KeyError – If the GeneFamily with the given name already exists in the Akin group.

add(family)#

Adds a GeneFamily to the Akin group.

Parameters:

family (GeneFamily) – The GeneFamily instance to add.

Raises:

AssertionError – If the provided family is not a GeneFamily instance.

get(name)#

Retrieves a GeneFamily from the Akin group by name.

Parameters:

name (str) – The name of the GeneFamily to retrieve.

Returns:

GeneFamily – The GeneFamily instance with the specified name.

Return type:

GeneFamily