soprano.analyse.phylogen.genes#
Definitions for the various genes used by PhylogenCluster
Functions
|
Load a gene file and return the (validated) list of genes contained within. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Classes
|
A description of a property, a 'gene', characterizing a structure, to be used with a PhylogenCluster. |
Container class holding gene definitions |
Exceptions
- class soprano.analyse.phylogen.genes.Gene(name, weight=1.0, params={}, parser=None, pair=False)[source]#
Bases:
object
A description of a property, a ‘gene’, characterizing a structure, to be used with a PhylogenCluster. A number of default genes is provided, but custom ones can be created as well by passing a parser. Only default genes can be used in a .genefile with the phylogen.py script though.
Args:name (str): name of the gene. Must be one of the existing ones or acustom one (in which case a parser must be provided aswell). Custom names can’t conflict with existing onesweight (float): weight of the gene to be applied, default is 1.0params (dict): additional parameters to be passed to the gene parserfunction; when not specified, defaults will be usedparser (function<AtomsCollection, **kwargs>=> np.array): parser function to be used when defining customgenes. Must return a two-dimensional Numpy array(axis 0 for the elements of the collection,axis 1 for the values of the gene)is_pair (bool): False if the gene returns a multi dimensional pointfor each structure, True if it only returns pairdistances. Default is False- property is_pair#
Whether the gene can only compare a pair of structures or can also give an absolute value for each structure individually (required for k-means clustering)
- class soprano.analyse.phylogen.genes.GeneDictionary[source]#
Bases:
object
Container class holding gene definitions