X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fpccx%2FExternalNodeBasedCoverageMethod.java;h=76b31345017ee21fd2e459e5553f859a82ffb5c5;hb=b5fe992f707cdad84255eb85040effbee97d61b3;hp=5994bb9a3dbc8fe08baccec6a3a356f029c580d7;hpb=48f7a89be9d34f1930a1f863e608235cc27184c5;p=jalview.git diff --git a/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethod.java b/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethod.java index 5994bb9..76b3134 100644 --- a/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethod.java +++ b/forester/java/src/org/forester/pccx/ExternalNodeBasedCoverageMethod.java @@ -6,7 +6,7 @@ // Copyright (C) 2008-2009 Christian M. Zmasek // Copyright (C) 2008-2009 Burnham Institute for Medical Research // All rights reserved -// +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,13 +16,13 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. -// +// // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.pccx; @@ -47,6 +47,7 @@ public class ExternalNodeBasedCoverageMethod implements CoverageCalculationMetho private static final Color MAXIMAL_COV_COLOR = new Color( 0, 255, 0 ); private static final Color MINIMAL_COV_COLOR = new Color( 255, 0, 0 ); + @Override public Coverage calculateCoverage( final List phylogenies, final List names, final CoverageCalculationOptions options, @@ -89,8 +90,10 @@ public class ExternalNodeBasedCoverageMethod implements CoverageCalculationMetho final SortedMap external_node_scores = ModelingUtils .setUpExternalCoverageHashMap( phylogeny ); for( final Object element : names ) { - scoring_method.calculateScoreForExternalNode( external_node_scores, phylogeny, phylogeny - .getNode( ( String ) element ), options ); + scoring_method.calculateScoreForExternalNode( external_node_scores, + phylogeny, + phylogeny.getNode( ( String ) element ), + options ); } if ( annotate_phylogeny ) { colorizePhylogenyAccordingToCoverage( external_node_scores, phylogeny, normalization_factor ); @@ -117,13 +120,13 @@ public class ExternalNodeBasedCoverageMethod implements CoverageCalculationMetho final PhylogenyNode node = ( PhylogenyNode ) element.getKey(); final double normalized_value = ( Double ) element.getValue() * normalization_factor; PhylogenyMethods.setBranchColorValue( node, ForesterUtil - .calcColor( normalized_value, - min, - max, - median, - ExternalNodeBasedCoverageMethod.MINIMAL_COV_COLOR, - ExternalNodeBasedCoverageMethod.MAXIMAL_COV_COLOR, - ExternalNodeBasedCoverageMethod.MEAN_COVERAGE_COLOR ) ); + .calcColor( normalized_value, + min, + max, + median, + ExternalNodeBasedCoverageMethod.MINIMAL_COV_COLOR, + ExternalNodeBasedCoverageMethod.MAXIMAL_COV_COLOR, + ExternalNodeBasedCoverageMethod.MEAN_COVERAGE_COLOR ) ); } PhylogenyMethods.postorderBranchColorAveragingExternalNodeBased( phylogeny ); }