The Edge class

class ppanggolin.pangenome.Edge(sourceGene, targetGene)[source]

Bases: object

The Edge class represents an edge between two gene families in the pangenome graph. It is associated with all the organisms in which the neighborship is found, and all the involved genes as well.

Parameters
addGenes(sourceGene, targetGene)[source]

Adds genes to the edge. They are supposed to be on the same organism.

Parameters
Raises

Exception – If the genes are not on the same organism.

property genePairs
Returns

A list of all the gene pairs of the Edge

Return type

list[tuple[ppanggolin.genome.Gene, ppanggolin.genome.Gene]]

getOrgDict()[source]
Returns

A dictionnary of the Organisms in which the edge is found, with organisms as key and an iterable of the pairs of genes as value

Return type

dict[ppanggolin.genome.Organism, tuple[ppanggolin.genome.Gene, ppanggolin.genome.Gene]]