How to use the comparem.hierarchical_clustering.HierarchicalCluster function in comparem

To help you get started, we’ve selected a few comparem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dparks1134 / CompareM / comparem / main.py View on Github external
def hclust(self, options):
        """Hierarchical clustering command"""
        
        if options.similarity and not options.max_sim_value:
            self.logger.error("The 'max_sim_value' must be specified for similarity values.")
            sys.exit(-1)

        self.logger.info('Performing hierarchical clustering.')
        hclust = HierarchicalCluster()
        hclust.run(options.pairwise_value_file,
                    options.method, 
                    options.similarity,
                    options.max_sim_value,
                    options.name_col1,
                    options.name_col2,
                    options.value_col,
                    options.output_tree)
        
        self.logger.info('Hierarchical cluster tree written to: %s' % options.output_tree)