From: cmzmasek@gmail.com Date: Sat, 3 May 2014 00:21:19 +0000 (+0000) Subject: inprogress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c35f521208003091267e14a57624b665d3f79608;p=jalview.git inprogress --- diff --git a/forester/java/src/org/forester/msa_compactor/MsaCompactor.java b/forester/java/src/org/forester/msa_compactor/MsaCompactor.java index 58953a8..37de654 100644 --- a/forester/java/src/org/forester/msa_compactor/MsaCompactor.java +++ b/forester/java/src/org/forester/msa_compactor/MsaCompactor.java @@ -503,19 +503,8 @@ public class MsaCompactor { return master_phy; } - private final Phylogeny pi( final List to_remove_ids ) { + private final Phylogeny calcTree( final List to_remove_ids ) { final Phylogeny phy = inferNJphylogeny( PWD_DISTANCE_METHOD.KIMURA_DISTANCE, _msa, false, "" ); - for( int i = 0; i < to_remove_ids.size(); ++i ) { - final String id = to_remove_ids.get( i ); - final PhylogenyNode n = phy.getNode( id ); - n.setName( n.getName() + " [" + ( i + 1 ) + "]" ); - final NodeVisualData vis = new NodeVisualData(); - vis.setFillType( NodeFill.SOLID ); - vis.setShape( NodeShape.RECTANGLE ); - vis.setSize( 6 ); - vis.setNodeColor( new Color( i > 255 ? 0 : 255 - i, 0, 0 ) ); - n.getNodeData().setNodeVisualData( vis ); - } PhylogenyMethods.midpointRoot( phy ); PhylogenyMethods.orderAppearance( phy.getRoot(), true, true, DESCENDANT_SORT_PRIORITY.NODE_NAME ); final boolean x = PhylogenyMethods.extractFastaInformation( phy ); @@ -534,6 +523,21 @@ public class MsaCompactor { } } } + return phy; + } + + private final Phylogeny pi( Phylogeny phy, final List to_remove_ids ) { + for( int i = 0; i < to_remove_ids.size(); ++i ) { + final String id = to_remove_ids.get( i ); + final PhylogenyNode n = phy.getNode( id ); + n.setName( n.getName() + " [" + ( i + 1 ) + "]" ); + final NodeVisualData vis = new NodeVisualData(); + vis.setFillType( NodeFill.SOLID ); + vis.setShape( NodeShape.RECTANGLE ); + vis.setSize( 6 ); + vis.setNodeColor( new Color( i > 255 ? 0 : 255 - i, 0, 0 ) ); + n.getNodeData().setNodeVisualData( vis ); + } final Configuration config = new Configuration(); config.setDisplayAsPhylogram( true ); config.setUseStyle( true );