Esempio n. 1
0
def pymeda_pipeline(predictions,
                    raw_data,
                    title="PyMeda Plots",
                    cluster_levels=2,
                    path="./"):
    features = get_pymeda_features(predictions, raw_data)
    df = get_data_frame(features)
    meda = pymeda.Meda(data=df, title=title, cluster_levels=cluster_levels)
    meda.generate_report(path)
    return
def pymeda_pipeline(predictions, raw_data, title = "PyMeda Plots", cluster_levels = 2, path = "./"):
    connected_components = label_predictions(predictions)[0]
    synapse_centroids = calculate_synapse_centroids(connected_components)
    features = get_aggregate_sum(synapse_centroids, raw_data)
    df = get_data_frame(features)
    sys.stdout = open(os.devnull, 'w')
    meda = pymeda.Meda(data = df, title = title, cluster_levels = cluster_levels)
    sys.stdout = sys.__stdout__
    #try:
    meda.generate_report(path)
    #except:
    #    print("Too many points, cannot generate plots. Fix incoming!")
    return