python/methylnet/model_interpretability.py
def interpret_embedding_classes(embedding_methyl_array_pkl, pheno_col, metric, trim, output_csv, output_pval_csv):
    """Compare average distance between classes in embedding space."""
    os.makedirs(output_csv[:output_csv.rfind('/')],exist_ok=True)
    methyl_array = MethylationArray.from_pickle(embedding_methyl_array_pkl)
    distance_compute = DistanceMatrixCompute(methyl_array, pheno_col)
    distance_compute.compute_distances(metric, trim)
    distance_compute.return_distances().to_csv(output_csv)
    if output_pval_csv:
        distance_compute.calculate_p_values()
        distance_compute.return_p_values().to_csv(output_pval_csv)
Compare average distance between classes in embedding space.
Compare average distance between classes in embedding space.
Compare average distance between classes in embedding space .
def interpret_embedding_classes(embedding_methyl_array_pkl, pheno_col, metric, trim, output_csv, output_pval_csv):
    os.makedirs(output_csv[:output_csv.rfind('/')],exist_ok=True)
    methyl_array = MethylationArray.from_pickle(embedding_methyl_array_pkl)
    distance_compute = DistanceMatrixCompute(methyl_array, pheno_col)
    distance_compute.compute_distances(metric, trim)
    distance_compute.return_distances().to_csv(output_csv)
    if output_pval_csv:
        distance_compute.calculate_p_values()
        distance_compute.return_p_values().to_csv(output_pval_csv)
def interpret_embedding_classes ( embedding_methyl_array_pkl , pheno_col , metric , trim , output_csv , output_pval_csv ) : os . makedirs ( output_csv [ : output_csv . rfind ( '/' ) ] , exist_ok = True ) methyl_array = MethylationArray . from_pickle ( embedding_methyl_array_pkl ) distance_compute = DistanceMatrixCompute ( methyl_array , pheno_col ) distance_compute . compute_distances ( metric , trim ) distance_compute . return_distances ( ) . to_csv ( output_csv ) if output_pval_csv : distance_compute . calculate_p_values ( ) distance_compute . return_p_values ( ) . to_csv ( output_pval_csv )
Compare average distance between classes in embedding space.
Compare average distance between classes in embedding space .
"""Compare average distance between classes in embedding space."""
embedding_methyl_array_pkl
pheno_col
metric
trim
output_csv
output_pval_csv