コード例 #1
0
def test():
    data, otus, samples = ctwc__data_handler.get_sample_biom_table()
    tree = ctwc__data_handler.get_gg_97_otu_tree()
    _, cols_dist = ctwc__distance_matrix.get_distance_matrices(data, tree, samples, otus, skip_rows=True)
    picked_indices, max_rank, filtered_data, filtered_dist_matrix, _ , _ = filter_cols_by_top_rank(data, cols_dist, otus, True)

    INFO("Picked {0} indices".format(len(picked_indices)))
    clust, labels, ag = ctwc__cluster_1d.cluster_rows(filtered_data.transpose(), cols_dist)
コード例 #2
0
def filter_rows_by_top_rank(data, rows_dist, entry_names=None, debug=False):
    DEBUG("Starting to cluster data...")
    clust, labels, ag = ctwc__cluster_1d.cluster_rows(data, rows_dist)
    INFO("Clustered labels: {0}".format(labels))
    return __filter_rows_by_top_rank(data, rows_dist, clust, labels, ag, entry_names, debug)