epistasis.matrix module

epistasis.matrix.encode_vectors(binary_genotypes, model_type='global')

Encode a set of binary genotypes is input vectors for the given model

epistasis.matrix.get_model_matrix(binary_genotypes, sites, model_type='global')

Get a model matrix for a given set of genotypes and coefficients.

Parameters:
  • binary_genotypes (list or array) – List of genotypes in their binary representation (see gpmap.utils.genotypes_to_binary)
  • sites (list) – List of epistatic interaction sites.
  • model_type (string) – Type of epistasis model (global/Hadamard, local/Biochemical).
epistasis.matrix.get_pandas_matrix(binary_genotypes, sites, matrix=None, model_type='global')

Get epistasis model matrix as a Pandas DataFrame.

This is useful for visualizing the matrix in a Jupyter Notebook.

Parameters:
  • binary_genotypes (list or array) – List of genotypes in their binary representation (see gpmap.utils.genotypes_to_binary)
  • sites (list) – List of epistatic interaction sites.
  • model_type (string) – Type of epistasis model (global/Hadamard, local/Biochemical).