コード例 #1
0
def load_clusters(clusters):
    '''Loads clusters from pickled objects.
       The count and cafe results are added to the pickled clusters and
       can then be processed further. (Analysis, new pickling.)'''
    clusters = pickle.load(open(clusters, "r"))
    cafe, count = Cafe(), Count()
    cafe.load(options.cafe_in)
    count.load(options.count_in)
    tree = Tree(options.tree, format=1)
    add_num_to_nodes(tree)
    add_cafe_and_count_to_nodes(tree)
    clusters = map_count_to_tree(clusters, count, tree)
    clusters = map_cafe_to_tree(clusters, cafe, tree)
    return clusters
コード例 #2
0
def main():
    cafe = Cafe()
    clusters = pickle.load(open(options.pickle, "r"))
    species = species_list(options.species)
    cafe.write(clusters, species)