Beispiel #1
0
def sample_dendrograms(p):
    samples_dict = DeserializeFromFile(p.files.sample_map_filtered_samples_dict_file_path)
    debug("Generating dendrograms for sample map...", p.files.log_file)
    ranks = GetCopy(c.ranks[p.type])
    if p.type == "rdp":
        ranks.remove("domain")
    framework.tools.hcluster.generate(
        samples_dict,
        DeserializeFromFile(p.files.otu_library_file_path),
        pie_charts_dir=p.dirs.pie_charts_dir,
        dendrogram_prefix=c.pie_chart_dendrogram_file_prefix,
        save_dir=p.dirs.sample_map_dendrograms_dir,
        map=helper_functions.get_sample_map_dict(p),
        ranks=ranks,
    )
Beispiel #2
0
    def get_sample_maps(self):
        analysis_id = self.request_dict['analysis_id']

        p = Meta(analysis_id)

        maps = []

        # if instance specified, return only that, otherwise return all sample maps.
        sample_map_instances = []
        if self.request_dict.has_key('instance'):
            sample_map_instances.append(self.request_dict['instance'])
        else:
            sample_map_instances = p.dirs.get_sample_map_instances()

        for instance in sample_map_instances:
            p.dirs.change_current_sample_map_instance(p.files, instance)
            maps.append(helper_functions.get_sample_map_dict(p))

        self.write_socket({'response': 'OK', 'sample_maps': maps})