X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fevoinference%2FTestPhylogenyReconstruction.java;h=0e554f875160fedc31cd95c012587f5b62bedb38;hb=0b39293d1577083551ba528d0ac7afcacbf69dde;hp=71f418a9814e8ddedaf727ed8afe33e74915b3fa;hpb=6b13ba9c7a74f37fd06abe5a7e52defc3d563861;p=jalview.git diff --git a/forester/java/src/org/forester/evoinference/TestPhylogenyReconstruction.java b/forester/java/src/org/forester/evoinference/TestPhylogenyReconstruction.java index 71f418a..0e554f8 100644 --- a/forester/java/src/org/forester/evoinference/TestPhylogenyReconstruction.java +++ b/forester/java/src/org/forester/evoinference/TestPhylogenyReconstruction.java @@ -34,7 +34,6 @@ import java.util.Date; import java.util.List; import java.util.Set; -import org.forester.archaeopteryx.Archaeopteryx; import org.forester.evoinference.distance.NeighborJoining; import org.forester.evoinference.distance.NeighborJoiningF; import org.forester.evoinference.distance.NeighborJoiningR; @@ -438,7 +437,7 @@ public class TestPhylogenyReconstruction { private static boolean testDistanceCalculationMethods( final File test_dir ) { try { final Msa msa0 = GeneralMsaParser.parse( new FileInputStream( test_dir + ForesterUtil.FILE_SEPARATOR - + "bcl.aln" ) ); + + "bcl.aln" ) ); final BasicSymmetricalDistanceMatrix pwd0 = PairwiseDistanceCalculator.calcKimuraDistances( msa0 ); if ( pwd0.getSize() != 120 ) { return false; @@ -466,7 +465,7 @@ public class TestPhylogenyReconstruction { final String p1_str = "((((((a,b)ab,c)ac,d)ad,(e,f)ef)af,(g,h)gh)ah,i)r"; final Phylogeny p1 = factory1.create( p1_str, new NHXParser() )[ 0 ]; CharacterStateMatrix m1 = new BasicCharacterStateMatrix( 9, - 1 ); + 1 ); m1.setIdentifier( 0, "a" ); m1.setIdentifier( 1, "b" ); m1.setIdentifier( 2, "c" ); @@ -539,7 +538,7 @@ public class TestPhylogenyReconstruction { final String p2_str = "((((((a,b)ab,c)ac,d)ad,(e,f)ef)af,(g,h,i)gi)ai,((j,k,l)jl,(m,n,o)mo,(p,q,r)pr)jr)root"; final Phylogeny p2 = factory2.create( p2_str, new NHXParser() )[ 0 ]; final CharacterStateMatrix m2 = new BasicCharacterStateMatrix( 18, - 4 ); + 4 ); m2.setIdentifier( 0, "a" ); m2.setIdentifier( 1, "b" ); m2.setIdentifier( 2, "c" ); @@ -848,7 +847,7 @@ public class TestPhylogenyReconstruction { final String p10_str = "((((((a,b)ab,c)ac,d)ad,(e,f)ef)af,(g,h)gh)ah,i)r"; final Phylogeny p10 = factory10.create( p10_str, new NHXParser() )[ 0 ]; final CharacterStateMatrix m10 = new BasicCharacterStateMatrix( 9, - 1 ); + 1 ); m10.setIdentifier( 0, "a" ); m10.setIdentifier( 1, "b" ); m10.setIdentifier( 2, "c" ); @@ -891,7 +890,7 @@ public class TestPhylogenyReconstruction { final String p1_str = "((((((a,b,y)aby,c)ac,d)ad,(e,f)ef)af,(g,h)gh)ah,i)r"; final Phylogeny p1 = factory1.create( p1_str, new NHXParser() )[ 0 ]; final CharacterStateMatrix m1 = new BasicCharacterStateMatrix( 10, - 1 ); + 1 ); m1.setIdentifier( 0, "a" ); m1.setIdentifier( 1, "b" ); m1.setIdentifier( 2, "y" ); @@ -962,7 +961,7 @@ public class TestPhylogenyReconstruction { final String p2_str = "((((((a,b,y)aby,c,d)cad,e,f)af,(g,h)gh)ah,i))r"; final Phylogeny p2 = factory2.create( p2_str, new NHXParser() )[ 0 ]; final CharacterStateMatrix m2 = new BasicCharacterStateMatrix( 10, - 1 ); + 1 ); m2.setIdentifier( 0, "a" ); m2.setIdentifier( 1, "b" ); m2.setIdentifier( 2, "y" ); @@ -2082,7 +2081,7 @@ public class TestPhylogenyReconstruction { //NeighborJoiningR njr = NeighborJoiningR.createInstance( true, 6 ); nj = NeighborJoining.createInstance( true, 6 ); final Phylogeny p2 = nj.execute( m ); - Archaeopteryx.createApplication( p2 ); + //Archaeopteryx.createApplication( p2 ); p2.reRoot( p2.getNode( "Bovine" ) ); if ( isUnequal( p2.getNode( "Chimp" ).getDistanceToParent(), 0.151675 ) ) { return false; @@ -2122,7 +2121,7 @@ public class TestPhylogenyReconstruction { return false; } if ( isUnequal( p2.getNode( "Chimp" ).getParent().getParent().getParent().getParent().getParent() - .getDistanceToParent(), 0.458845 ) ) { + .getDistanceToParent(), 0.458845 ) ) { return false; } m = new BasicSymmetricalDistanceMatrix( 4 ); @@ -2237,11 +2236,11 @@ public class TestPhylogenyReconstruction { return false; } if ( isUnequal( p2f.getNode( "Chimp" ).getParent().getParent().getParent().getParent() - .getDistanceToParent(), 0.42027 ) ) { + .getDistanceToParent(), 0.42027 ) ) { return false; } if ( isUnequal( p2f.getNode( "Chimp" ).getParent().getParent().getParent().getParent().getParent() - .getDistanceToParent(), 0.458845 ) ) { + .getDistanceToParent(), 0.458845 ) ) { return false; } } @@ -2629,7 +2628,7 @@ public class TestPhylogenyReconstruction { m2.setRow( "1.59050 1.46290 0.55830 0.47100 0.30830 0.26920 0.00000", 6 ); final NeighborJoiningR nj2 = NeighborJoiningR.createInstance( true, 6 ); final Phylogeny p2 = nj2.execute( m2 ); - Archaeopteryx.createApplication( p2 ); + // Archaeopteryx.createApplication( p2 ); p2.reRoot( p2.getNode( "Bovine" ) ); if ( isUnequal( p2.getNode( "Chimp" ).getDistanceToParent(), 0.151675 ) ) { System.out.println( p2.getNode( "Chimp" ).getDistanceToParent() ); @@ -2670,7 +2669,7 @@ public class TestPhylogenyReconstruction { return false; } if ( isUnequal( p2.getNode( "Chimp" ).getParent().getParent().getParent().getParent().getParent() - .getDistanceToParent(), 0.458845 ) ) { + .getDistanceToParent(), 0.458845 ) ) { return false; } //