コード例 #1
0
    def bl_table(self, options):
        """Produce table with number of lineage for increasing mean branch lengths."""

        check_file_exists(options.input_tree)
        check_file_exists(options.taxon_category)

        b = BranchLengthDistribution()
        b.table(options.input_tree, options.taxon_category, options.step_size,
                options.output_table)

        self.logger.info('Done.')
コード例 #2
0
    def bl_dist(self, options):
        """Calculate distribution of branch lengths at each taxonomic rank."""

        check_file_exists(options.input_tree)
        make_sure_path_exists(options.output_dir)

        b = BranchLengthDistribution()
        b.run(options.input_tree, options.trusted_taxa_file,
              options.min_children, options.taxonomy_file, options.output_dir)

        self.logger.info('Done.')
コード例 #3
0
    def bl_decorate(self, options):
        """Decorate tree based using a mean branch length criterion."""

        check_file_exists(options.input_tree)

        b = BranchLengthDistribution()
        b.decorate(options.input_tree, options.taxonomy_file,
                   options.threshold, options.rank,
                   options.retain_named_lineages, options.keep_labels,
                   options.prune, options.output_tree)

        self.logger.info('Done.')
コード例 #4
0
ファイル: main.py プロジェクト: dparks1134/PhyloRank
    def bl_table(self, options):
        """Produce table with number of lineage for increasing mean branch lengths."""

        check_file_exists(options.input_tree)
        check_file_exists(options.taxon_category)

        b = BranchLengthDistribution()
        b.table(options.input_tree,
                options.taxon_category,
                options.step_size,
                options.output_table)

        self.logger.info('Done.')
コード例 #5
0
    def bl_optimal(self, options):
        """Determine branch length for best congruency with existing taxonomy."""

        b = BranchLengthDistribution()
        optimal_bl, correct_taxa, incorrect_taxa = b.optimal(
            options.input_tree, options.rank, options.min_dist,
            options.max_dist, options.step_size, options.output_table)

        prec = float(correct_taxa) / (correct_taxa + incorrect_taxa)

        self.logger.info('Optimal branch length is %f.' % optimal_bl)
        self.logger.info(
            'This results in %d correct and %d incorrect taxa (precision = %.2f).'
            % (correct_taxa, incorrect_taxa, prec))
コード例 #6
0
ファイル: main.py プロジェクト: dparks1134/PhyloRank
    def bl_dist(self, options):
        """Calculate distribution of branch lengths at each taxonomic rank."""

        check_file_exists(options.input_tree)
        make_sure_path_exists(options.output_dir)

        b = BranchLengthDistribution()
        b.run(options.input_tree,
                options.trusted_taxa_file,
                options.min_children,
                options.taxonomy_file,
                options.output_dir)

        self.logger.info('Done.')
コード例 #7
0
ファイル: main.py プロジェクト: dparks1134/PhyloRank
 def bl_optimal(self, options):
     """Determine branch length for best congruency with existing taxonomy."""
     
     b = BranchLengthDistribution()
     optimal_bl, correct_taxa, incorrect_taxa = b.optimal(options.input_tree, 
                                                             options.rank,
                                                             options.min_dist,
                                                             options.max_dist,
                                                             options.step_size,
                                                             options.output_table)
     
     prec = float(correct_taxa) / (correct_taxa + incorrect_taxa)
     
     self.logger.info('Optimal branch length is %f.' % optimal_bl)
     self.logger.info('This results in %d correct and %d incorrect taxa (precision = %.2f).' % (correct_taxa, incorrect_taxa, prec))
コード例 #8
0
ファイル: main.py プロジェクト: dparks1134/PhyloRank
 def bl_decorate(self, options):
     """Decorate tree based using a mean branch length criterion."""
     
     check_file_exists(options.input_tree)
     
     b = BranchLengthDistribution()
     b.decorate(options.input_tree, 
                 options.taxonomy_file,
                 options.threshold, 
                 options.rank, 
                 options.retain_named_lineages,
                 options.keep_labels,
                 options.prune,
                 options.output_tree)
     
     self.logger.info('Done.')