in progress
[jalview.git] / forester / java / src / org / forester / test / Test.java
index 3753c8b..1c76c8d 100644 (file)
@@ -40,7 +40,11 @@ import java.util.Locale;
 import java.util.Set;
 import java.util.SortedSet;
 
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+
 import org.forester.application.support_transfer;
+import org.forester.archaeopteryx.AptxUtil;
 import org.forester.archaeopteryx.TreePanelUtil;
 import org.forester.archaeopteryx.webservices.WebserviceUtil;
 import org.forester.development.DevelopmentTools;
@@ -105,7 +109,7 @@ import org.forester.sdi.SDI;
 import org.forester.sdi.SDIR;
 import org.forester.sdi.TestGSDI;
 import org.forester.sequence.BasicSequence;
-import org.forester.sequence.Sequence;
+import org.forester.sequence.MolecularSequence;
 import org.forester.species.BasicSpecies;
 import org.forester.species.Species;
 import org.forester.surfacing.TestSurfacing;
@@ -124,39 +128,36 @@ import org.forester.util.SequenceAccessionTools;
 import org.forester.ws.seqdb.SequenceDatabaseEntry;
 import org.forester.ws.seqdb.SequenceDbWsTools;
 import org.forester.ws.seqdb.UniProtTaxonomy;
-import org.forester.ws.wabi.TxSearch;
-import org.forester.ws.wabi.TxSearch.RANKS;
-import org.forester.ws.wabi.TxSearch.TAX_NAME_CLASS;
-import org.forester.ws.wabi.TxSearch.TAX_RANK;
+
 
 @SuppressWarnings( "unused")
 public final class Test {
 
     private final static String  PATH_TO_RESOURCES         = System.getProperty( "user.dir" )
-                                                                   + ForesterUtil.getFileSeparator() + "resources"
-                                                                   + ForesterUtil.getFileSeparator();
+            + ForesterUtil.getFileSeparator() + "resources"
+            + ForesterUtil.getFileSeparator();
     private final static String  PATH_TO_TEST_DATA         = System.getProperty( "user.dir" )
-                                                                   + ForesterUtil.getFileSeparator() + "test_data"
-                                                                   + ForesterUtil.getFileSeparator();
-    private final static boolean PERFORM_DB_TESTS          = false;
+            + ForesterUtil.getFileSeparator() + "test_data"
+            + ForesterUtil.getFileSeparator();
+    private final static boolean PERFORM_DB_TESTS          = true;
     private static final boolean PERFORM_WEB_TREE_ACCESS   = true;
     private static final String  PHYLOXML_LOCAL_XSD        = PATH_TO_RESOURCES + "phyloxml_schema/"
-                                                                   + ForesterConstants.PHYLO_XML_VERSION + "/"
-                                                                   + ForesterConstants.PHYLO_XML_XSD;
+            + ForesterConstants.PHYLO_XML_VERSION + "/"
+            + ForesterConstants.PHYLO_XML_XSD;
     private static final String  PHYLOXML_REMOTE_XSD       = ForesterConstants.PHYLO_XML_LOCATION + "/"
-                                                                   + ForesterConstants.PHYLO_XML_VERSION + "/"
-                                                                   + ForesterConstants.PHYLO_XML_XSD;
+            + ForesterConstants.PHYLO_XML_VERSION + "/"
+            + ForesterConstants.PHYLO_XML_XSD;
     private final static boolean USE_LOCAL_PHYLOXML_SCHEMA = true;
     private final static double  ZERO_DIFF                 = 1.0E-9;
 
-    public static boolean isEqual( final double a, final double b ) {
+    private static boolean isEqual( final double a, final double b ) {
         return ( ( Math.abs( a - b ) ) < Test.ZERO_DIFF );
     }
 
     public static void main( final String[] args ) {
         System.out.println( "[Java version: " + ForesterUtil.JAVA_VERSION + " " + ForesterUtil.JAVA_VENDOR + "]" );
         System.out.println( "[OS: " + ForesterUtil.OS_NAME + " " + ForesterUtil.OS_ARCH + " " + ForesterUtil.OS_VERSION
-                + "]" );
+                            + "]" );
         Locale.setDefault( Locale.US );
         System.out.println( "[Locale: " + Locale.getDefault() + "]" );
         int failed = 0;
@@ -180,6 +181,7 @@ public final class Test {
             System.exit( -1 );
         }
         final long start_time = new Date().getTime();
+        
         System.out.print( "Basic node methods: " );
         if ( Test.testBasicNodeMethods() ) {
             System.out.println( "OK." );
@@ -288,6 +290,15 @@ public final class Test {
             succeeded++;
         }
         System.out.println( "OK." );
+        System.out.print( "Taxonomy data extraction: " );
+        if ( Test.testExtractTaxonomyDataFromNodeName() ) {
+            System.out.println( "OK." );
+            succeeded++;
+        }
+        else {
+            System.out.println( "failed." );
+            failed++;
+        }
         System.out.print( "Taxonomy code extraction: " );
         if ( Test.testExtractTaxonomyCodeFromNodeName() ) {
             System.out.println( "OK." );
@@ -333,6 +344,15 @@ public final class Test {
             System.out.println( "failed." );
             failed++;
         }
+        System.out.print( "Node construction and parsing of NHX (node level): " );
+        if ( Test.testNHXNodeParsing2() ) {
+            System.out.println( "OK." );
+            succeeded++;
+        }
+        else {
+            System.out.println( "failed." );
+            failed++;
+        }
         System.out.print( "NHX parsing iterating: " );
         if ( Test.testNHParsingIter() ) {
             System.out.println( "OK." );
@@ -351,6 +371,15 @@ public final class Test {
             System.out.println( "failed." );
             failed++;
         }
+        System.out.print( "NH parsing - special chars: " );
+        if ( Test.testNHParsingSpecialChars() ) {
+            System.out.println( "OK." );
+            succeeded++;
+        }
+        else {
+            System.out.println( "failed." );
+            failed++;
+        }
         System.out.print( "Conversion to NHX (node level): " );
         if ( Test.testNHXconversion() ) {
             System.out.println( "OK." );
@@ -477,6 +506,15 @@ public final class Test {
             System.out.println( "failed." );
             failed++;
         }
+        System.out.print( "UTF-8 parsing from file: " );
+        if ( Test.testUTF8ParsingFromFile() ) {
+            System.out.println( "OK." );
+            succeeded++;
+        }
+        else {
+            System.out.println( "failed." );
+            failed++;
+        }
         System.out.print( "Copying of node data: " );
         if ( Test.testCopyOfNodeData() ) {
             System.out.println( "OK." );
@@ -912,6 +950,15 @@ public final class Test {
             System.out.println( "failed." );
             failed++;
         }
+        System.out.print( "MSA entropy: " );
+        if ( Test.testMsaEntropy() ) {
+            System.out.println( "OK." );
+            succeeded++;
+        }
+        else {
+            System.out.println( "failed." );
+            failed++;
+        }
         if ( PERFORM_DB_TESTS ) {
             System.out.print( "Uniprot Entry Retrieval: " );
             if ( Test.testUniprotEntryRetrieval() ) {
@@ -952,8 +999,8 @@ public final class Test {
             }
         }
         if ( PERFORM_WEB_TREE_ACCESS ) {
-            System.out.print( "NHX parsing from URL: " );
-            if ( Test.testNHXparsingFromURL() ) {
+            System.out.print( "TreeBase acccess: " );
+            if ( Test.testTreeBaseReading() ) {
                 System.out.println( "OK." );
                 succeeded++;
             }
@@ -961,8 +1008,8 @@ public final class Test {
                 System.out.println( "failed." );
                 failed++;
             }
-            System.out.print( "phyloXML parsing from URL: " );
-            if ( Test.testPhyloXMLparsingFromURL() ) {
+            System.out.print( "ToL access: " );
+            if ( Test.testToLReading() ) {
                 System.out.println( "OK." );
                 succeeded++;
             }
@@ -970,8 +1017,8 @@ public final class Test {
                 System.out.println( "failed." );
                 failed++;
             }
-            System.out.print( "TreeBase acccess: " );
-            if ( Test.testTreeBaseReading() ) {
+            System.out.print( "NHX parsing from URL: " );
+            if ( Test.testNHXparsingFromURL() ) {
                 System.out.println( "OK." );
                 succeeded++;
             }
@@ -979,9 +1026,17 @@ public final class Test {
                 System.out.println( "failed." );
                 failed++;
             }
-            //
-            System.out.print( "ToL access: " );
-            if ( Test.testToLReading() ) {
+            System.out.print( "NHX parsing from URL 2: " );
+            if ( Test.testNHXparsingFromURL2() ) {
+                System.out.println( "OK." );
+                succeeded++;
+            }
+            else {
+                System.out.println( "failed." );
+                failed++;
+            }
+            System.out.print( "phyloXML parsing from URL: " );
+            if ( Test.testPhyloXMLparsingFromURL() ) {
                 System.out.println( "OK." );
                 succeeded++;
             }
@@ -989,7 +1044,6 @@ public final class Test {
                 System.out.println( "failed." );
                 failed++;
             }
-            //
             System.out.print( "TreeFam access: " );
             if ( Test.testTreeFamReading() ) {
                 System.out.println( "OK." );
@@ -999,8 +1053,6 @@ public final class Test {
                 System.out.println( "failed." );
                 failed++;
             }
-            //
-            //
             System.out.print( "Pfam tree access: " );
             if ( Test.testPfamTreeReading() ) {
                 System.out.println( "OK." );
@@ -1029,7 +1081,7 @@ public final class Test {
         }
     }
 
-    public static boolean testEngulfingOverlapRemoval() {
+    private static boolean testEngulfingOverlapRemoval() {
         try {
             final Domain d0 = new BasicDomain( "d0", 0, 8, ( short ) 1, ( short ) 1, 0.1, 1 );
             final Domain d1 = new BasicDomain( "d1", 0, 1, ( short ) 1, ( short ) 1, 0.1, 1 );
@@ -1128,7 +1180,74 @@ public final class Test {
         return true;
     }
 
-    public static final boolean testNHXparsingFromURL() {
+    private static final boolean testNHXparsingFromURL2() {
+        try {
+            final String s = "https://sites.google.com/site/cmzmasek/home/software/archaeopteryx/examples/simple/simple_1.nh";
+            final Phylogeny phys[] = AptxUtil.readPhylogeniesFromUrl( new URL( s ),
+                                                                      false,
+                                                                      false,
+                                                                      false,
+                                                                      TAXONOMY_EXTRACTION.NO,
+                                                                      false );
+            if ( ( phys == null ) || ( phys.length != 5 ) ) {
+                return false;
+            }
+            if ( !phys[ 0 ].toNewHampshire().equals( "((((A,B),C),D),(E,F));" ) ) {
+                System.out.println( phys[ 0 ].toNewHampshire() );
+                return false;
+            }
+            if ( !phys[ 1 ].toNewHampshire().equals( "((1,2,3),(4,5,6),(7,8,9));" ) ) {
+                System.out.println( phys[ 1 ].toNewHampshire() );
+                return false;
+            }
+            final Phylogeny phys2[] = AptxUtil.readPhylogeniesFromUrl( new URL( s ),
+                                                                       false,
+                                                                       false,
+                                                                       false,
+                                                                       TAXONOMY_EXTRACTION.NO,
+                                                                       false );
+            if ( ( phys2 == null ) || ( phys2.length != 5 ) ) {
+                return false;
+            }
+            if ( !phys2[ 0 ].toNewHampshire().equals( "((((A,B),C),D),(E,F));" ) ) {
+                System.out.println( phys2[ 0 ].toNewHampshire() );
+                return false;
+            }
+            if ( !phys2[ 1 ].toNewHampshire().equals( "((1,2,3),(4,5,6),(7,8,9));" ) ) {
+                System.out.println( phys2[ 1 ].toNewHampshire() );
+                return false;
+            }
+            final Phylogeny phys3[] = AptxUtil.readPhylogeniesFromUrl( new URL( "http://swisstree.vital-it.ch:80/"
+                    + "SwissTree/ST001/consensus_tree.nhx" ), false, false, false, TAXONOMY_EXTRACTION.NO, false );
+            if ( ( phys3 == null ) || ( phys3.length != 1 ) ) {
+                return false;
+            }
+            if ( !phys3[ 0 ]
+                    .toNewHampshire()
+                    .equals( "((((POP23a_CIOIN_ENSCING00000016202,POP23b_CIOIN_ENSCING00000016169),POP23_CIOSA_ENSCSAVG00000000248),((POP23a_BRAFL_C3ZMF1,POP23b_BRAFL_121417),(((POP3_ORYLA_ENSORLG00000019669,POP3_GASAC_ENSGACG00000014023,POP3_DANRE_Q6JWW1),(POP3_XENTR_B1H1F6,(POP3_CHICK_Q9DG25,(POP3_ORNAN_ENSOANG00000004179,POP3_MONDO_ENSMODG00000018033,((POP3_MOUSE_Q9ES81,POP3_RAT_Q3BCU3),POP3_RABIT_ENSOCUG00000025973,POP3_MACMU_ENSMMUG00000014473,POP3_HUMAN_Q9HBV1))))),(((POP2_GASAC_ENSGACG00000001420,POP2_ORYLA_ENSORLG00000008627,POP2_TAKRU_ENSTRUG00000015933),POP2_DANRE_ENSDARG00000069922),POP2_XENTR_ENSXETG00000018064,(((POP2_TAEGU_ENSTGUG00000013383,POP2_CHICK_Q6T9Z5),POP2_ANOCA_ENSACAG00000003557),((POP2_MACEU_ENSMEUG00000015825,POP2_MONDO_ENSMODG00000018205),((POP2_RABIT_ENSOCUG00000009515,(POP2_RAT_Q6P722,POP2_MOUSE_Q9ES82)),(POP2_MACMU_ENSMMUG00000000905,POP2_HUMAN_Q9HBU9)))))))),((POP1_CIOSA_ENSCSAVG00000000247,POP1_CIOIN_ENSCING00000000496),((POP1_DANRE_Q5PQZ7,(POP1_ORYLA_ENSORLG00000019663,POP1_GASAC_ENSGACG00000014015,POP1_TAKRU_ENSORLG00000019663)),(POP1_XENTR_B1H1G2,(POP1_ANOCA_ENSACAG00000003910,(POP1_TAEGU_ENSTGUG00000012218,POP1_CHICK_Q9DG23)),POP1_ORNAN_ENSOANG00000004180,POP1_MONDO_ENSMODG00000018034,(POP1_RABIT_ENSOCUG00000016944,(POP1_RAT_Q3BCU4,POP1_MOUSE_Q9ES83),(POP1_HUMAN_Q8NE79,POP1_MACMU_ENSMMUG00000014471))))));" ) ) {
+                System.out.println( phys3[ 0 ].toNewHampshire() );
+                return false;
+            }
+            final Phylogeny phys4[] = AptxUtil.readPhylogeniesFromUrl( new URL( "http://swisstree.vital-it.ch:80/"
+                    + "SwissTree/ST001/consensus_tree.nhx" ), false, false, false, TAXONOMY_EXTRACTION.NO, false );
+            if ( ( phys4 == null ) || ( phys4.length != 1 ) ) {
+                return false;
+            }
+            if ( !phys4[ 0 ]
+                    .toNewHampshire()
+                    .equals( "((((POP23a_CIOIN_ENSCING00000016202,POP23b_CIOIN_ENSCING00000016169),POP23_CIOSA_ENSCSAVG00000000248),((POP23a_BRAFL_C3ZMF1,POP23b_BRAFL_121417),(((POP3_ORYLA_ENSORLG00000019669,POP3_GASAC_ENSGACG00000014023,POP3_DANRE_Q6JWW1),(POP3_XENTR_B1H1F6,(POP3_CHICK_Q9DG25,(POP3_ORNAN_ENSOANG00000004179,POP3_MONDO_ENSMODG00000018033,((POP3_MOUSE_Q9ES81,POP3_RAT_Q3BCU3),POP3_RABIT_ENSOCUG00000025973,POP3_MACMU_ENSMMUG00000014473,POP3_HUMAN_Q9HBV1))))),(((POP2_GASAC_ENSGACG00000001420,POP2_ORYLA_ENSORLG00000008627,POP2_TAKRU_ENSTRUG00000015933),POP2_DANRE_ENSDARG00000069922),POP2_XENTR_ENSXETG00000018064,(((POP2_TAEGU_ENSTGUG00000013383,POP2_CHICK_Q6T9Z5),POP2_ANOCA_ENSACAG00000003557),((POP2_MACEU_ENSMEUG00000015825,POP2_MONDO_ENSMODG00000018205),((POP2_RABIT_ENSOCUG00000009515,(POP2_RAT_Q6P722,POP2_MOUSE_Q9ES82)),(POP2_MACMU_ENSMMUG00000000905,POP2_HUMAN_Q9HBU9)))))))),((POP1_CIOSA_ENSCSAVG00000000247,POP1_CIOIN_ENSCING00000000496),((POP1_DANRE_Q5PQZ7,(POP1_ORYLA_ENSORLG00000019663,POP1_GASAC_ENSGACG00000014015,POP1_TAKRU_ENSORLG00000019663)),(POP1_XENTR_B1H1G2,(POP1_ANOCA_ENSACAG00000003910,(POP1_TAEGU_ENSTGUG00000012218,POP1_CHICK_Q9DG23)),POP1_ORNAN_ENSOANG00000004180,POP1_MONDO_ENSMODG00000018034,(POP1_RABIT_ENSOCUG00000016944,(POP1_RAT_Q3BCU4,POP1_MOUSE_Q9ES83),(POP1_HUMAN_Q8NE79,POP1_MACMU_ENSMMUG00000014471))))));" ) ) {
+                System.out.println( phys4[ 0 ].toNewHampshire() );
+                return false;
+            }
+        }
+        catch ( final Exception e ) {
+            e.printStackTrace();
+            return false;
+        }
+        return true;
+    }
+
+    private static final boolean testNHXparsingFromURL() {
         try {
             final String s = "https://sites.google.com/site/cmzmasek/home/software/archaeopteryx/examples/simple/simple_1.nh";
             final URL u = new URL( s );
@@ -1145,7 +1264,8 @@ public final class Test {
                 System.out.println( phys[ 1 ].toNewHampshire() );
                 return false;
             }
-            final Phylogeny[] phys2 = factory.create( u.openStream(), new NHXParser() );
+            final URL u2 = new URL( s );
+            final Phylogeny[] phys2 = factory.create( u2.openStream(), new NHXParser() );
             if ( ( phys2 == null ) || ( phys2.length != 5 ) ) {
                 return false;
             }
@@ -1155,8 +1275,8 @@ public final class Test {
             }
             final PhylogenyFactory factory2 = ParserBasedPhylogenyFactory.getInstance();
             final NHXParser p = new NHXParser();
-            final URL u2 = new URL( s );
-            p.setSource( u2 );
+            final URL u3 = new URL( s );
+            p.setSource( u3 );
             if ( !p.hasNext() ) {
                 return false;
             }
@@ -1188,12 +1308,14 @@ public final class Test {
             }
         }
         catch ( final Exception e ) {
+            System.out.println( e.toString() );
             e.printStackTrace();
+            return false;
         }
         return true;
     }
 
-    public static boolean testOverlapRemoval() {
+    private static boolean testOverlapRemoval() {
         try {
             final Domain d0 = new BasicDomain( "d0", ( short ) 2, ( short ) 5, ( short ) 1, ( short ) 1, 0.1, 1 );
             final Domain d1 = new BasicDomain( "d1", ( short ) 7, ( short ) 10, ( short ) 1, ( short ) 1, 0.1, 1 );
@@ -1347,15 +1469,14 @@ public final class Test {
         return true;
     }
 
-    public static final boolean testPfamTreeReading() {
+    private static final boolean testPfamTreeReading() {
         try {
             final URL u = new URL( WebserviceUtil.PFAM_SERVER + "/family/PF" + "01849" + "/tree/download" );
             final NHXParser parser = new NHXParser();
             parser.setTaxonomyExtraction( NHXParser.TAXONOMY_EXTRACTION.PFAM_STYLE_STRICT );
             parser.setReplaceUnderscores( false );
             parser.setGuessRootedness( true );
-            final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance();
-            final Phylogeny[] phys = factory.create( u.openStream(), parser );
+            final Phylogeny[] phys = ForesterUtil.readPhylogeniesFromUrl( u, parser);
             if ( ( phys == null ) || ( phys.length != 1 ) ) {
                 return false;
             }
@@ -1365,31 +1486,37 @@ public final class Test {
         }
         catch ( final Exception e ) {
             e.printStackTrace();
+            return false;
         }
         return true;
     }
 
-    public static final boolean testPhyloXMLparsingFromURL() {
+    private static final boolean testPhyloXMLparsingFromURL() {
         try {
             final String s = "https://sites.google.com/site/cmzmasek/home/software/archaeopteryx/examples/archaeopteryx_a/apaf_bcl2.xml";
             final URL u = new URL( s );
-            final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance();
-            final Phylogeny[] phys = factory.create( u.openStream(), PhyloXmlParser.createPhyloXmlParser() );
+            final Phylogeny[] phys = ForesterUtil.readPhylogeniesFromUrl( u, PhyloXmlParser.createPhyloXmlParser() );
+            
             if ( ( phys == null ) || ( phys.length != 2 ) ) {
                 return false;
             }
+            final Phylogeny[] phys2 = ForesterUtil.readPhylogeniesFromUrl( u, PhyloXmlParser.createPhyloXmlParser() );
+            
+            if ( ( phys2 == null ) || ( phys2.length != 2 ) ) {
+                return false;
+            }
         }
         catch ( final Exception e ) {
             e.printStackTrace();
+            return false;
         }
         return true;
     }
 
-    public static final boolean testToLReading() {
+    private static final boolean testToLReading() {
         try {
             final URL u = new URL( WebserviceUtil.TOL_URL_BASE + "15079" );
-            final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance();
-            final Phylogeny[] phys = factory.create( u.openStream(), new TolParser() );
+            final Phylogeny[] phys = ForesterUtil.readPhylogeniesFromUrl( u, new TolParser() );
             if ( ( phys == null ) || ( phys.length != 1 ) ) {
                 return false;
             }
@@ -1402,47 +1529,138 @@ public final class Test {
             if ( phys[ 0 ].getNumberOfExternalNodes() < 5 ) {
                 return false;
             }
+            //
+            final URL u2 = new URL( WebserviceUtil.TOL_URL_BASE + "17706" );
+            final Phylogeny[] phys2 = ForesterUtil.readPhylogeniesFromUrl( u2, new TolParser() );
+            if ( ( phys2 == null ) || ( phys2.length != 1 ) ) {
+                return false;
+            }
+            if ( !phys2[ 0 ].getRoot().getNodeData().getTaxonomy().getIdentifier().getValue().equals( "17706" ) ) {
+                return false;
+            }
+            if ( phys2[ 0 ].getNumberOfExternalNodes() < 5 ) {
+                return false;
+            }
         }
         catch ( final Exception e ) {
             e.printStackTrace();
+            return false;
         }
         return true;
     }
 
-    public static final boolean testTreeBaseReading() {
+    private static final boolean testTreeBaseReading() {
         try {
-            final URL u = new URL( WebserviceUtil.TREEBASE_PHYLOWS_TREE_URL_BASE + "825?format=nexus" );
+            final URL u = new URL( WebserviceUtil.TREEBASE_PHYLOWS_TREE_URL_BASE + "72557?format=nexus" );  
             final NexusPhylogeniesParser parser = new NexusPhylogeniesParser();
             parser.setReplaceUnderscores( true );
-            final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance();
-            final Phylogeny[] phys = factory.create( u.openStream(), parser );
+            final Phylogeny[] phys = ForesterUtil.readPhylogeniesFromUrl( u, parser );
             if ( ( phys == null ) || ( phys.length != 1 ) ) {
                 return false;
             }
+            final URL u_1 = new URL( WebserviceUtil.TREEBASE_PHYLOWS_TREE_URL_BASE + "2406?format=nexus" );  
+            final NexusPhylogeniesParser parser_1 = new NexusPhylogeniesParser();
+            final Phylogeny[] phys_1 = ForesterUtil.readPhylogeniesFromUrl( u_1, parser_1 );
+            if ( ( phys_1 == null ) || ( phys_1.length != 1 ) ) {
+                return false;
+            }
+            final URL u_2 = new URL( WebserviceUtil.TREEBASE_PHYLOWS_TREE_URL_BASE + "422?format=nexus" );  
+            final NexusPhylogeniesParser parser_2 = new NexusPhylogeniesParser();
+            final Phylogeny[] phys_2 = ForesterUtil.readPhylogeniesFromUrl( u_2, parser_2 );
+            if ( ( phys_2 == null ) || ( phys_2.length != 1 ) ) {
+                return false;
+            }
+            final URL u_3 = new URL( WebserviceUtil.TREEBASE_PHYLOWS_TREE_URL_BASE + "2654?format=nexus" );  
+            final NexusPhylogeniesParser parser_3 = new NexusPhylogeniesParser();
+            final Phylogeny[] phys_3 = ForesterUtil.readPhylogeniesFromUrl( u_3, parser_3 );
+             if ( ( phys_3 == null ) || ( phys_3.length != 1 ) ) {
+                return false;
+            }
+            final URL u_4 = new URL( WebserviceUtil.TREEBASE_PHYLOWS_TREE_URL_BASE + "825?format=nexus" );  
+            final NexusPhylogeniesParser parser_4 = new NexusPhylogeniesParser();
+            final Phylogeny[] phys_4 = ForesterUtil.readPhylogeniesFromUrl( u_4, parser_4 );
+             if ( ( phys_4 == null ) || ( phys_4.length != 1 ) ) {
+                return false;
+            }
             final URL u2 = new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "15613?format=nexus" );
             final NexusPhylogeniesParser parser2 = new NexusPhylogeniesParser();
             parser2.setReplaceUnderscores( true );
-            final PhylogenyFactory factory2 = ParserBasedPhylogenyFactory.getInstance();
-            final Phylogeny[] phys2 = factory2.create( u2.openStream(), parser2 );
+            final Phylogeny[] phys2 = ForesterUtil.readPhylogeniesFromUrl( u2, parser2 );
             if ( ( phys2 == null ) || ( phys2.length != 9 ) ) {
                 return false;
             }
+            final URL u3 = new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "14909?format=nexus" );
+            final NexusPhylogeniesParser parser3 = new NexusPhylogeniesParser();
+            final Phylogeny[] phys3 = ForesterUtil.readPhylogeniesFromUrl( u3, parser3 );
+            if ( ( phys3 == null ) || ( phys3.length != 2 ) ) {
+                return false;
+            }
+            final Phylogeny[] phys4 = ForesterUtil.readPhylogeniesFromUrl( new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "14525?format=nexus" ),
+                    new NexusPhylogeniesParser() );
+            if ( ( phys4 == null ) || ( phys4.length != 1 ) ) {
+                return false;
+            }
+            final Phylogeny[] phys5 = ForesterUtil.readPhylogeniesFromUrl( new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "15632?format=nexus" ) ,
+                    new NexusPhylogeniesParser() );
+            if ( ( phys5 == null ) || ( phys5.length != 1 ) ) {
+                return false;
+            }
+            final Phylogeny[] phys6 = ForesterUtil.readPhylogeniesFromUrl( new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "10190?format=nexus" ) ,
+                    new NexusPhylogeniesParser() );
+            if ( ( phys6 == null ) || ( phys6.length != 1 ) ) {
+                return false;
+            }
+            final Phylogeny[] phys7 = ForesterUtil.readPhylogeniesFromUrl( new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "13246?format=nexus" ) ,
+                    new NexusPhylogeniesParser() );
+            if ( ( phys7 == null ) || ( phys7.length != 2 ) ) {
+                return false;
+            }
+            final Phylogeny[] phys8 = ForesterUtil.readPhylogeniesFromUrl( new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "11662?format=nexus" ) ,
+                    new NexusPhylogeniesParser() );
+            if ( ( phys8 == null ) || ( phys8.length != 2 ) ) {
+                return false;
+            }
+            final Phylogeny[] phys9 = ForesterUtil.readPhylogeniesFromUrl( new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "562?format=nexus" ) ,
+                    new NexusPhylogeniesParser() );
+            if ( ( phys9 == null ) || ( phys9.length != 4 ) ) {
+                return false;
+            }
+            final Phylogeny[] phys16424 = ForesterUtil.readPhylogeniesFromUrl( new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "16424?format=nexus" ) ,
+                    new NexusPhylogeniesParser() );
+            if ( ( phys16424 == null ) || ( phys16424.length != 1 ) ) {
+                return false;
+            }
+            final Phylogeny[] phys17878 = ForesterUtil.readPhylogeniesFromUrl( new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "17878?format=nexus" ) ,
+                    new NexusPhylogeniesParser() );
+            if ( ( phys17878 == null ) || ( phys17878.length != 17 ) ) {
+                return false;
+            }
+            final Phylogeny[] phys18804 = ForesterUtil.readPhylogeniesFromUrl( new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "18804?format=nexus" ) ,
+                    new NexusPhylogeniesParser() );
+            if ( ( phys18804 == null ) || ( phys18804.length != 2 ) ) {
+                return false;
+            }
+            final Phylogeny[] phys346 = ForesterUtil.readPhylogeniesFromUrl( new URL( WebserviceUtil.TREEBASE_PHYLOWS_STUDY_URL_BASE + "346?format=nexus" ) ,
+                    new NexusPhylogeniesParser() );
+            if ( ( phys346 == null ) || ( phys346.length != 1 ) ) {
+                return false;
+            }
         }
         catch ( final Exception e ) {
             e.printStackTrace();
+            return false;
         }
         return true;
     }
 
-    public static final boolean testTreeFamReading() {
+    private static final boolean testTreeFamReading() {
         try {
             final URL u = new URL( WebserviceUtil.TREE_FAM_URL_BASE + "101004" + "/tree/newick" );
             final NHXParser parser = new NHXParser();
             parser.setTaxonomyExtraction( NHXParser.TAXONOMY_EXTRACTION.NO );
             parser.setReplaceUnderscores( false );
             parser.setGuessRootedness( true );
-            final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance();
-            final Phylogeny[] phys = factory.create( u.openStream(), parser );
+            final Phylogeny[] phys = ForesterUtil.readPhylogeniesFromUrl( u, parser );
             if ( ( phys == null ) || ( phys.length != 1 ) ) {
                 return false;
             }
@@ -1452,6 +1670,7 @@ public final class Test {
         }
         catch ( final Exception e ) {
             e.printStackTrace();
+            return false;
         }
         return true;
     }
@@ -1467,7 +1686,7 @@ public final class Test {
 
     private static boolean testAminoAcidSequence() {
         try {
-            final Sequence aa1 = BasicSequence.createAaSequence( "aa1", "aAklm-?xX*z$#" );
+            final MolecularSequence aa1 = BasicSequence.createAaSequence( "aa1", "aAklm-?xX*z$#" );
             if ( aa1.getLength() != 13 ) {
                 return false;
             }
@@ -1480,15 +1699,15 @@ public final class Test {
             if ( !new String( aa1.getMolecularSequence() ).equals( "AAKLM-XXX*ZXX" ) ) {
                 return false;
             }
-            final Sequence aa2 = BasicSequence.createAaSequence( "aa3", "ARNDCQEGHILKMFPSTWYVX*-BZOJU" );
-            if ( !new String( aa2.getMolecularSequence() ).equals( "ARNDCQEGHILKMFPSTWYVX*-BZXXU" ) ) {
+            final MolecularSequence aa2 = BasicSequence.createAaSequence( "aa3", "ARNDCQEGHILKMFPSTWYVX*-BZOJU" );
+            if ( !new String( aa2.getMolecularSequence() ).equals( "ARNDCQEGHILKMFPSTWYVX*-BZOXU" ) ) {
                 return false;
             }
-            final Sequence dna1 = BasicSequence.createDnaSequence( "dna1", "ACGTUX*-?RYMKWSN" );
+            final MolecularSequence dna1 = BasicSequence.createDnaSequence( "dna1", "ACGTUX*-?RYMKWSN" );
             if ( !new String( dna1.getMolecularSequence() ).equals( "ACGTNN*-NRYMKWSN" ) ) {
                 return false;
             }
-            final Sequence rna1 = BasicSequence.createRnaSequence( "rna1", "..ACGUTX*-?RYMKWSN" );
+            final MolecularSequence rna1 = BasicSequence.createRnaSequence( "rna1", "..ACGUTX*-?RYMKWSN" );
             if ( !new String( rna1.getMolecularSequence() ).equals( "--ACGUNN*-NRYMKWSN" ) ) {
                 return false;
             }
@@ -1598,12 +1817,258 @@ public final class Test {
         }
         return true;
     }
+    
+    private static boolean testUTF8ParsingFromFile() {
+        try {
+            final PhyloXmlParser xml_parser = PhyloXmlParser.createPhyloXmlParser();
+            final Phylogeny[] phylogenies_xml = ParserBasedPhylogenyFactory.getInstance().create( new File( Test.PATH_TO_TEST_DATA + "chars.xml" ),
+                                                              xml_parser );
+            if ( xml_parser.getErrorCount() > 0 ) {
+                System.out.println( xml_parser.getErrorMessages().toString() );
+                return false;
+            }
+            if ( phylogenies_xml.length != 1 ) {
+                return false;
+            }
+         
+            final Phylogeny[] phylogenies_xml2 = ParserBasedPhylogenyFactory.getInstance().create( new StringBuffer( phylogenies_xml[0].toPhyloXML( 0 )),
+                                                                                                   xml_parser );
+            
+            final Phylogeny[] phylogenies_nh = ParserBasedPhylogenyFactory.getInstance().create( new File( Test.PATH_TO_TEST_DATA + "chars.nh" ), new NHXParser() );
+            if ( phylogenies_nh.length != 1 ) {
+                return false;
+            }
+           
+            final Phylogeny[] phylogenies_nex = ParserBasedPhylogenyFactory.getInstance().create( new File( Test.PATH_TO_TEST_DATA + "chars.nex" ), new NexusPhylogeniesParser() );
+            if ( phylogenies_nex.length != 1 ) {
+                return false;
+            }
+          
+            final String[] xml_n = phylogenies_xml[0].getAllExternalNodeNames();
+            final String[] xml_n2 = phylogenies_xml2[0].getAllExternalNodeNames();
+            final String[] nh_n = phylogenies_nh[0].getAllExternalNodeNames();
+            final String[] nex_n = phylogenies_nex[0].getAllExternalNodeNames();
+            final String n0 = "AQ~!@#$%^&*()_+-=\\{}|;:\"<>?,./";
+            final String n1 = "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜˜˜™š›œžŸ¡¢£¤¥¦§¨©ª«¬®¯°±¹²³´µ¶·¸º»¼¿À÷þÿ";
+            final String n2 = "漢字ひらがなカタカナ";
+            final String n3 = "อักษรไทย";
+            final String n4 = "繁體字";
+            final String n5 = "한글";
+            final String n6 = "देवनागरी";
+            
+            final String n7 = "chữ Quốc ngữ";
+            final String n8 = "ру́сский язы́к";
+            final String n9 = "អក្សរខ្មែរ";
+            
+            if ( !xml_n[0].equals( n0 ) ) {
+                System.out.println( xml_n[0] );
+                System.out.println( n0 );
+                return false;
+            }
+            if ( !xml_n2[0].equals( n0 ) ) {
+                System.out.println( xml_n2[0] );
+                System.out.println( n0 );
+                return false;
+            }
+            if ( !nh_n[0].equals( n0 ) ) {
+                System.out.println( nh_n[0] );
+                System.out.println( n0 );
+                return false;
+            }
+            if ( !nex_n[0].equals( n0 ) ) {
+                System.out.println( nex_n[0] );
+                System.out.println( n0 );
+                return false;
+            }
+            
+            if ( !xml_n[1].equals( n1 ) ) {
+                System.out.println( xml_n[1] );
+                System.out.println( n1 );
+                return false;
+            }
+            if ( !xml_n2[1].equals( n1 ) ) {
+                System.out.println( xml_n2[1] );
+                System.out.println( n1 );
+                return false;
+            }
+            if ( !nh_n[1].equals( n1 ) ) {
+                System.out.println( nh_n[1] );
+                System.out.println( n1 );
+                return false;
+            }
+            if ( !nex_n[1].equals( n1 ) ) {
+                System.out.println( nex_n[1] );
+                System.out.println( n1 );
+                return false;
+            }
+            
+            if ( !xml_n[2].equals( n2 ) ) {
+                System.out.println( xml_n[2] );
+                System.out.println( n2 );
+                return false;
+            }
+            if ( !xml_n2[2].equals( n2 ) ) {
+                System.out.println( xml_n2[2] );
+                System.out.println( n2 );
+                return false;
+            }
+            if ( !nh_n[2].equals( n2 ) ) {
+                System.out.println( nh_n[2] );
+                System.out.println( n2 );
+                return false;
+            }
+            if ( !nex_n[2].equals( n2 ) ) {
+                System.out.println( nex_n[2] );
+                System.out.println( n2 );
+                return false;
+            }
+            //
+            if ( !xml_n[3].equals( n3 ) ) {
+                System.out.println( xml_n[3] );
+                System.out.println( n3 );
+                return false;
+            }
+            if ( !xml_n2[3].equals( n3 ) ) {
+                System.out.println( xml_n2[3] );
+                System.out.println( n3 );
+                return false;
+            }
+            if ( !nh_n[3].equals( n3 ) ) {
+                System.out.println( nh_n[3] );
+                System.out.println( n3 );
+                return false;
+            }
+            if ( !nex_n[3].equals( n3 ) ) {
+                System.out.println( nex_n[3] );
+                System.out.println( n3 );
+                return false;
+            }
+            //
+            if ( !xml_n[4].equals( n4 ) ) {
+                System.out.println( xml_n[4] );
+                System.out.println( n4 );
+                return false;
+            }
+            if ( !nh_n[4].equals( n4 ) ) {
+                System.out.println( nh_n[4] );
+                System.out.println( n4 );
+                return false;
+            }
+            if ( !nex_n[4].equals( n4 ) ) {
+                System.out.println( nex_n[4] );
+                System.out.println( n4 );
+                return false;
+            }
+            //
+            if ( !xml_n[5].equals( n5 ) ) {
+                System.out.println( xml_n[5] );
+                System.out.println( n5 );
+                return false;
+            }
+            if ( !nh_n[5].equals( n5 ) ) {
+                System.out.println( nh_n[5] );
+                System.out.println( n5 );
+                return false;
+            }
+            if ( !nex_n[5].equals( n5 ) ) {
+                System.out.println( nex_n[5] );
+                System.out.println( n5 );
+                return false;
+            }
+            //
+            if ( !xml_n[6].equals( n6 ) ) {
+                System.out.println( xml_n[6] );
+                System.out.println( n6 );
+                return false;
+            }
+            if ( !nh_n[6].equals( n6 ) ) {
+                System.out.println( nh_n[6] );
+                System.out.println( n6 );
+                return false;
+            }
+            if ( !nex_n[6].equals( n6 ) ) {
+                System.out.println( nex_n[6] );
+                System.out.println( n6 );
+                return false;
+            }
+            //
+            if ( !xml_n[7].equals( n7 ) ) {
+                System.out.println( xml_n[7] );
+                System.out.println( n7 );
+                return false;
+            }
+            if ( !nh_n[7].equals( n7 ) ) {
+                System.out.println( nh_n[7] );
+                System.out.println( n7 );
+                return false;
+            }
+            if ( !nex_n[7].equals( n7 ) ) {
+                System.out.println( nex_n[7] );
+                System.out.println( n7 );
+                return false;
+            }
+            if ( !xml_n[8].equals( n8 ) ) {
+                System.out.println( xml_n[8] );
+                System.out.println( n8 );
+                return false;
+            }
+            if ( !nh_n[8].equals( n8 ) ) {
+                System.out.println( nh_n[8] );
+                System.out.println( n8 );
+                return false;
+            }
+            if ( !nex_n[8].equals( n8 ) ) {
+                System.out.println( nex_n[8] );
+                System.out.println( n8 );
+                return false;
+            }
+            if ( !xml_n[9].equals( n9 ) ) {
+                System.out.println( xml_n[9] );
+                System.out.println( n9 );
+                return false;
+            }
+            if ( !xml_n2[9].equals( n9 ) ) {
+                System.out.println( xml_n2[9] );
+                System.out.println( n9 );
+                return false;
+            }
+            if ( !nh_n[9].equals( n9 ) ) {
+                System.out.println( nh_n[9] );
+                System.out.println( n9 );
+                return false;
+            }
+            if ( !nex_n[9].equals( n9 ) ) {
+                System.out.println( nex_n[9] );
+                System.out.println( n9 );
+                return false;
+            }
+            if (!phylogenies_xml[0].toNewHampshire().equals( 
+                                                            phylogenies_nh[0].toNewHampshire() ) ) {
+                System.out.println( phylogenies_xml[0].toNewHampshire() );
+                System.out.println( phylogenies_nh[0].toNewHampshire() );
+                return false;
+            }
+            if (!phylogenies_xml[0].toNewHampshire().equals( 
+                                                            phylogenies_nex[0].toNewHampshire() ) ) {
+                System.out.println( phylogenies_xml[0].toNewHampshire() );
+                System.out.println( phylogenies_nex[0].toNewHampshire() );
+                return false;
+            }
+        }
+        catch ( final Exception e ) {
+            e.printStackTrace( System.out );
+            return false;
+        }
+        return true;
+    }
+    
+    
 
     private static boolean testBasicPhyloXMLparsing() {
         try {
             final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance();
             final PhyloXmlParser xml_parser = PhyloXmlParser.createPhyloXmlParser();
-            final Phylogeny[] phylogenies_0 = factory.create( Test.PATH_TO_TEST_DATA + "phyloxml_test_t1.xml",
+            final Phylogeny[] phylogenies_0 = factory.create( new File( Test.PATH_TO_TEST_DATA + "phyloxml_test_t1.xml" ),
                                                               xml_parser );
             if ( xml_parser.getErrorCount() > 0 ) {
                 System.out.println( xml_parser.getErrorMessages().toString() );
@@ -1678,6 +2143,21 @@ public final class Test {
             if ( !t3.getIdentifier().getProvider().equals( "treebank" ) ) {
                 return false;
             }
+            if ( !t3.getNode( "root node" ).isDuplication() ) {
+                return false;
+            }
+            if ( !t3.getNode( "node a" ).isDuplication() ) {
+                return false;
+            }
+            if ( t3.getNode( "node a" ).isSpeciation() ) {
+                return false;
+            }
+            if ( t3.getNode( "node bc" ).isDuplication() ) {
+                return false;
+            }
+            if ( !t3.getNode( "node bc" ).isSpeciation() ) {
+                return false;
+            }
             if ( !t3.getNode( "root node" ).getNodeData().getSequence().getType().equals( "protein" ) ) {
                 return false;
             }
@@ -1802,7 +2282,7 @@ public final class Test {
             else {
                 xml_parser.setValidateAgainstSchema( PHYLOXML_REMOTE_XSD );
             }
-            final Phylogeny[] phylogenies_0 = factory.create( Test.PATH_TO_TEST_DATA + "phyloxml_test_t1.xml",
+            final Phylogeny[] phylogenies_0 = factory.create( new File( Test.PATH_TO_TEST_DATA + "phyloxml_test_t1.xml" ),
                                                               xml_parser );
             if ( xml_parser.getErrorCount() > 0 ) {
                 System.out.println( xml_parser.getErrorMessages().toString() );
@@ -1968,6 +2448,7 @@ public final class Test {
             }
             if ( !( t3_rt.getNode( "root node" ).getNodeData().getReference().getDescription()
                     .equals( "Aguinaldo, A. M. A.; J. M. Turbeville, L. S. Linford, M. C. Rivera, J. R. Garey, R. A. Raff, & J. A. Lake (1997). \"Evidence for a clade of nematodes, arthropods and other moulting animals\". Nature 387 (6632): 489–493." ) ) ) {
+                System.out.println( t3_rt.getNode( "root node" ).getNodeData().getReference().getDescription() );
                 return false;
             }
             if ( !t3_rt.getNode( "root node" ).getNodeData().getTaxonomy().getTaxonomyCode().equals( "ECDYS" ) ) {
@@ -2005,7 +2486,7 @@ public final class Test {
                 return false;
             }
             if ( t3_rt.getNode( "node bc" ).getNodeData().getSequence().getDomainArchitecture().getDomain( 0 )
-                    .getConfidence() != 2144 ) {
+                    .getConfidence() != 0 ) {
                 return false;
             }
             if ( !t3_rt.getNode( "node bc" ).getNodeData().getSequence().getDomainArchitecture().getDomain( 0 ).getId()
@@ -2086,7 +2567,6 @@ public final class Test {
             if ( !t3_rt.getNode( "node b" ).getNodeData().getBinaryCharacters().getType().equals( "characters" ) ) {
                 return false;
             }
-            //
             if ( !t3_rt.getNode( "node ba" ).getNodeData().getDate().getDesc().equals( "Silurian" ) ) {
                 return false;
             }
@@ -2155,7 +2635,7 @@ public final class Test {
                     xml_parser.setValidateAgainstSchema( PHYLOXML_REMOTE_XSD );
                 }
             }
-            final Phylogeny[] phylogenies_0 = factory.create( Test.PATH_TO_TEST_DATA + "phyloxml_test_t1.xml",
+            final Phylogeny[] phylogenies_0 = factory.create( new File( Test.PATH_TO_TEST_DATA + "phyloxml_test_t1.xml" ),
                                                               xml_parser );
             if ( xml_parser.getErrorCount() > 0 ) {
                 System.out.println( xml_parser.getErrorMessages().toString() );
@@ -2190,7 +2670,7 @@ public final class Test {
                 return false;
             }
             final String x2 = Test.PATH_TO_TEST_DATA + "phyloxml_test_t1.xml";
-            final Phylogeny[] phylogenies_1 = factory.create( x2, xml_parser );
+            final Phylogeny[] phylogenies_1 = factory.create( new File( x2 ), xml_parser );
             if ( xml_parser.getErrorCount() > 0 ) {
                 System.out.println( "errors:" );
                 System.out.println( xml_parser.getErrorMessages().toString() );
@@ -2199,7 +2679,7 @@ public final class Test {
             if ( phylogenies_1.length != 4 ) {
                 return false;
             }
-            final Phylogeny[] phylogenies_2 = factory.create( Test.PATH_TO_TEST_DATA + "phyloxml_test_t3.xml",
+            final Phylogeny[] phylogenies_2 = factory.create( new File(Test.PATH_TO_TEST_DATA + "phyloxml_test_t3.xml" ),
                                                               xml_parser );
             if ( xml_parser.getErrorCount() > 0 ) {
                 System.out.println( "errors:" );
@@ -2212,7 +2692,7 @@ public final class Test {
             if ( phylogenies_2[ 0 ].getNumberOfExternalNodes() != 2 ) {
                 return false;
             }
-            final Phylogeny[] phylogenies_3 = factory.create( Test.PATH_TO_TEST_DATA + "phyloxml_test_t4.xml",
+            final Phylogeny[] phylogenies_3 = factory.create( new File( Test.PATH_TO_TEST_DATA + "phyloxml_test_t4.xml" ),
                                                               xml_parser );
             if ( xml_parser.getErrorCount() > 0 ) {
                 System.out.println( xml_parser.getErrorMessages().toString() );
@@ -2234,7 +2714,7 @@ public final class Test {
             if ( !a.getNode( "node b1" ).getNodeData().getTaxonomy().getCommonName().equals( "b1 species" ) ) {
                 return false;
             }
-            final Phylogeny[] phylogenies_4 = factory.create( Test.PATH_TO_TEST_DATA + "special_characters.xml",
+            final Phylogeny[] phylogenies_4 = factory.create( new File( Test.PATH_TO_TEST_DATA + "special_characters.xml") ,
                                                               xml_parser );
             if ( xml_parser.getErrorCount() > 0 ) {
                 System.out.println( xml_parser.getErrorMessages().toString() );
@@ -2858,7 +3338,7 @@ public final class Test {
                 return false;
             }
             final StringBuffer sb5 = new StringBuffer( "(((A11:2)A1:2,(A21:1,A22:2,A23)A2:11,A3:2)A:2,B:10,C:3,D:8)" );
-            final Phylogeny t5 = factory.create( sb5, new NHXParser() )[ 0 ];
+            final Phylogeny t5 = factory.create( sb5.toString(), new NHXParser() )[ 0 ];
             if ( t5.getNumberOfExternalNodes() != 8 ) {
                 return false;
             }
@@ -2866,17 +3346,17 @@ public final class Test {
                 return false;
             }
             final StringBuffer sb6 = new StringBuffer( "(X,Y,Z,(((A111)A11:2)A1:2,(X,Y,Z,A21:1,A22:2,A23)A2:11,A3:2)A:2,B:10,C:3,D:8)" );
-            final Phylogeny t6 = factory.create( sb6, new NHXParser() )[ 0 ];
+            final Phylogeny t6 = factory.create( sb6.toString(), new NHXParser() )[ 0 ];
             if ( t6.getHeight() != 15 ) {
                 return false;
             }
             final StringBuffer sb7 = new StringBuffer( "(((A11:2)A1:2,(A21:1,A22:2,A23)A2:11,A3:2)A:2,B:10,C:15,D:8)" );
-            final Phylogeny t7 = factory.create( sb7, new NHXParser() )[ 0 ];
+            final Phylogeny t7 = factory.create( sb7.toString(), new NHXParser() )[ 0 ];
             if ( t7.getHeight() != 15 ) {
                 return false;
             }
             final StringBuffer sb8 = new StringBuffer( "(((A11:11)A1:2,(A21:2,A22:2,A23,A24,AA:)A2:11,A3:2)A:2,B:15,C:15,D:15)" );
-            final Phylogeny t8 = factory.create( sb8, new NHXParser() )[ 0 ];
+            final Phylogeny t8 = factory.create( sb8.toString(), new NHXParser() )[ 0 ];
             if ( t8.getNumberOfExternalNodes() != 10 ) {
                 return false;
             }
@@ -2960,7 +3440,6 @@ public final class Test {
             if ( !isEqual( t_bx.getNode( "acd" ).getBranchData().getConfidence( 0 ).getValue(), 1 ) ) {
                 return false;
             }
-            //
             final Phylogeny[] t2 = factory
                     .create( "((((a,b),c),d),e);(((a,b),c),(d,e));(((((a,b),c),d),e),f);((((a,b),c),(d,e)),f);(((a,b),c),d,e);((a,b,c),d,e);",
                              new NHXParser() );
@@ -2970,7 +3449,6 @@ public final class Test {
             for( final Phylogeny target : t2 ) {
                 ConfidenceAssessor.evaluate( "bootstrap", ev2, target, false, 1 );
             }
-            //
             final Phylogeny t4 = factory.create( "((((((A,B)ab,C)abc,D)abcd,E)abcde,F)abcdef,G)abcdefg",
                                                  new NHXParser() )[ 0 ];
             final Phylogeny[] ev4 = factory.create( "(((A,B),C),(X,Y));((F,G),((A,B,C),(D,E)))", new NHXParser() );
@@ -3905,10 +4383,6 @@ public final class Test {
                 System.out.println( entry.getSequenceName() );
                 return false;
             }
-            // if ( !entry.getSequenceSymbol().equals( "" ) ) {
-            //     System.out.println( entry.getSequenceSymbol() );
-            //     return false;
-            // }
             if ( !entry.getGeneName().equals( "treX-like" ) ) {
                 System.out.println( entry.getGeneName() );
                 return false;
@@ -3925,10 +4399,9 @@ public final class Test {
                 System.out.println( entry.getAnnotations().first().getRefSource() );
                 return false;
             }
-            if ( entry.getCrossReferences().size() != 5 ) {
+            if ( entry.getCrossReferences().size() < 1 ) {
                 return false;
             }
-            //
             final SequenceDatabaseEntry entry1 = SequenceDbWsTools.obtainEntry( "ABJ16409" );
             if ( !entry1.getAccession().equals( "ABJ16409" ) ) {
                 return false;
@@ -3949,10 +4422,9 @@ public final class Test {
                 System.out.println( entry1.getGeneName() );
                 return false;
             }
-            if ( entry1.getCrossReferences().size() != 6 ) {
+            if ( entry1.getCrossReferences().size() < 1 ) {
                 return false;
             }
-            //
             final SequenceDatabaseEntry entry2 = SequenceDbWsTools.obtainEntry( "NM_184234" );
             if ( !entry2.getAccession().equals( "NM_184234" ) ) {
                 return false;
@@ -3974,10 +4446,15 @@ public final class Test {
                 System.out.println( entry2.getGeneName() );
                 return false;
             }
-            if ( entry2.getCrossReferences().size() != 3 ) {
+            if ( entry2.getCrossReferences().size() < 1 ) {
+                return false;
+            }
+            if ( !entry2.getChromosome().equals( "20" ) ) {
+                return false;
+            }
+            if ( !entry2.getMap().equals( "20q11.22" ) ) {
                 return false;
             }
-            //
             final SequenceDatabaseEntry entry3 = SequenceDbWsTools.obtainEntry( "HM043801" );
             if ( !entry3.getAccession().equals( "HM043801" ) ) {
                 return false;
@@ -4001,11 +4478,9 @@ public final class Test {
             if ( !ForesterUtil.isEmpty( entry3.getGeneName() ) ) {
                 return false;
             }
-            if ( entry3.getCrossReferences().size() != 8 ) {
+            if ( entry3.getCrossReferences().size() < 1 ) {
                 return false;
             }
-            //
-            //
             final SequenceDatabaseEntry entry4 = SequenceDbWsTools.obtainEntry( "AAA36557.1" );
             if ( !entry4.getAccession().equals( "AAA36557" ) ) {
                 return false;
@@ -4026,21 +4501,6 @@ public final class Test {
                 System.out.println( entry4.getGeneName() );
                 return false;
             }
-            //   if ( !entry4.getChromosome().equals( "ras" ) ) {
-            //     System.out.println( entry4.getChromosome() );
-            //     return false;
-            // }
-            // if ( !entry4.getMap().equals( "ras" ) ) {
-            //     System.out.println( entry4.getMap() );
-            //     return false;
-            // }
-            //TODO FIXME gi...
-            //
-            //TODO fails:
-            //            final SequenceDatabaseEntry entry5 = SequenceDbWsTools.obtainEntry( "M30539" );
-            //            if ( !entry5.getAccession().equals( "HM043801" ) ) {
-            //                return false;
-            //            }
             final SequenceDatabaseEntry entry5 = SequenceDbWsTools.obtainEntry( "AAZ45343.1" );
             if ( !entry5.getAccession().equals( "AAZ45343" ) ) {
                 return false;
@@ -4057,6 +4517,25 @@ public final class Test {
                 System.out.println( entry5.getTaxonomyIdentifier() );
                 return false;
             }
+            final SequenceDatabaseEntry entry6 = SequenceDbWsTools.obtainEntry( "M30539" );
+            if ( !entry6.getAccession().equals( "M30539" ) ) {
+                return false;
+            }
+            if ( !entry6.getGeneName().equals( "ras" ) ) {
+                return false;
+            }
+            if ( !entry6.getSequenceName().equals( "Human SK2 c-Ha-ras-1 oncogene-encoded protein gene, exon 1" ) ) {
+                return false;
+            }
+            if ( !entry6.getTaxonomyIdentifier().equals( "9606" ) ) {
+                return false;
+            }
+            if ( !entry6.getTaxonomyScientificName().equals( "Homo sapiens" ) ) {
+                return false;
+            }
+            if ( entry6.getCrossReferences().size() < 1 ) {
+                return false;
+            }
         }
         catch ( final IOException e ) {
             System.out.println();
@@ -4391,30 +4870,68 @@ public final class Test {
             if ( !ParserUtils.extractScientificNameFromNodeName( "Macrocera sp. 123" ).equals( "Macrocera sp." ) ) {
                 return false;
             }
-            if ( !ParserUtils.extractScientificNameFromNodeName( "Macrocera sp. K12" ).equals( "Macrocera sp." ) ) {
+            if ( !ParserUtils.extractScientificNameFromNodeName( "Macrocera sp. K12" ).equals( "Macrocera sp." ) ) {
+                return false;
+            }
+            if ( !ParserUtils.extractScientificNameFromNodeName( "something Macrocera sp. K12" )
+                    .equals( "Macrocera sp." ) ) {
+                return false;
+            }
+            if ( !ParserUtils.extractScientificNameFromNodeName( "Macrocera sp" ).equals( "Macrocera sp." ) ) {
+                return false;
+            }
+            if ( !ParserUtils.extractScientificNameFromNodeName( "Sesamum rigidum ssp merenskyanum 07 48" )
+                    .equals( "Sesamum rigidum subsp. merenskyanum" ) ) {
+                return false;
+            }
+            if ( !ParserUtils.extractScientificNameFromNodeName( "Sesamum rigidum ssp. merenskyanum" )
+                    .equals( "Sesamum rigidum subsp. merenskyanum" ) ) {
+                return false;
+            }
+            if ( !ParserUtils.extractScientificNameFromNodeName( "Sesamum rigidum (ssp. merenskyanum)" )
+                    .equals( "Sesamum rigidum (subsp. merenskyanum)" ) ) {
+                return false;
+            }
+            if ( !ParserUtils.extractScientificNameFromNodeName( "Sesamum rigidum (ssp merenskyanum)" )
+                    .equals( "Sesamum rigidum (subsp. merenskyanum)" ) ) {
+                return false;
+            }
+        }
+        catch ( final Exception e ) {
+            e.printStackTrace( System.out );
+            return false;
+        }
+        return true;
+    }
+
+    private static boolean testExtractTaxonomyDataFromNodeName() {
+        try {
+            PhylogenyNode n = new PhylogenyNode( "tr|B1AM49|B1AM49_HUMAN" );
+            if ( !ParserUtils.extractTaxonomyDataFromNodeName( n, TAXONOMY_EXTRACTION.AGGRESSIVE ).equals( "HUMAN" ) ) {
                 return false;
             }
-            if ( !ParserUtils.extractScientificNameFromNodeName( "something Macrocera sp. K12" )
-                    .equals( "Macrocera sp." ) ) {
+            n = new PhylogenyNode( "tr|B1AM49|B1AM49_HUMAN~1-2" );
+            if ( !ParserUtils.extractTaxonomyDataFromNodeName( n, TAXONOMY_EXTRACTION.AGGRESSIVE ).equals( "HUMAN" ) ) {
                 return false;
             }
-            if ( !ParserUtils.extractScientificNameFromNodeName( "Macrocera sp" ).equals( "Macrocera sp." ) ) {
+            n = new PhylogenyNode( "tr|B1AM49|HNRPR_HUMAN" );
+            if ( !ParserUtils.extractTaxonomyDataFromNodeName( n, TAXONOMY_EXTRACTION.AGGRESSIVE ).equals( "HUMAN" ) ) {
                 return false;
             }
-            if ( !ParserUtils.extractScientificNameFromNodeName( "Sesamum rigidum ssp merenskyanum 07 48" )
-                    .equals( "Sesamum rigidum subsp. merenskyanum" ) ) {
+            n = new PhylogenyNode( "tr|B1AM49|HNRPR_HUMAN|" );
+            if ( !ParserUtils.extractTaxonomyDataFromNodeName( n, TAXONOMY_EXTRACTION.AGGRESSIVE ).equals( "HUMAN" ) ) {
                 return false;
             }
-            if ( !ParserUtils.extractScientificNameFromNodeName( "Sesamum rigidum ssp. merenskyanum" )
-                    .equals( "Sesamum rigidum subsp. merenskyanum" ) ) {
+            n = new PhylogenyNode( "tr|B1AM49|HNRPR_HUMAN~12" );
+            if ( !ParserUtils.extractTaxonomyDataFromNodeName( n, TAXONOMY_EXTRACTION.AGGRESSIVE ).equals( "HUMAN" ) ) {
                 return false;
             }
-            if ( !ParserUtils.extractScientificNameFromNodeName( "Sesamum rigidum (ssp. merenskyanum)" )
-                    .equals( "Sesamum rigidum (subsp. merenskyanum)" ) ) {
+            n = new PhylogenyNode( "HNRPR_HUMAN" );
+            if ( !ParserUtils.extractTaxonomyDataFromNodeName( n, TAXONOMY_EXTRACTION.AGGRESSIVE ).equals( "HUMAN" ) ) {
                 return false;
             }
-            if ( !ParserUtils.extractScientificNameFromNodeName( "Sesamum rigidum (ssp merenskyanum)" )
-                    .equals( "Sesamum rigidum (subsp. merenskyanum)" ) ) {
+            n = new PhylogenyNode( "HNRPR_HUMAN_X" );
+            if ( !ParserUtils.extractTaxonomyDataFromNodeName( n, TAXONOMY_EXTRACTION.AGGRESSIVE ).equals( "HUMAN" ) ) {
                 return false;
             }
         }
@@ -4500,17 +5017,17 @@ public final class Test {
             }
             if ( !ParserUtils.extractTaxonomyCodeFromNodeName( "BCL2_MOUSE function = 23445",
                                                                TAXONOMY_EXTRACTION.PFAM_STYLE_RELAXED )
-                    .equals( "MOUSE" ) ) {
+                                                               .equals( "MOUSE" ) ) {
                 return false;
             }
             if ( !ParserUtils.extractTaxonomyCodeFromNodeName( "BCL2_MOUSE+function = 23445",
                                                                TAXONOMY_EXTRACTION.PFAM_STYLE_RELAXED )
-                    .equals( "MOUSE" ) ) {
+                                                               .equals( "MOUSE" ) ) {
                 return false;
             }
             if ( !ParserUtils.extractTaxonomyCodeFromNodeName( "BCL2_MOUSE|function = 23445",
                                                                TAXONOMY_EXTRACTION.PFAM_STYLE_RELAXED )
-                    .equals( "MOUSE" ) ) {
+                                                               .equals( "MOUSE" ) ) {
                 return false;
             }
             if ( ParserUtils.extractTaxonomyCodeFromNodeName( "BCL2_MOUSEfunction = 23445",
@@ -4745,12 +5262,22 @@ public final class Test {
 
     private static boolean testFastaParser() {
         try {
-            if ( !FastaParser.isLikelyFasta( new FileInputStream( PATH_TO_TEST_DATA + "fasta_0.fasta" ) ) ) {
+            FileInputStream fis1 = new FileInputStream( PATH_TO_TEST_DATA + "fasta_0.fasta" );
+            if ( !FastaParser.isLikelyFasta( fis1 ) ) {
+                fis1.close();
                 return false;
             }
-            if ( FastaParser.isLikelyFasta( new FileInputStream( PATH_TO_TEST_DATA + "msa_3.txt" ) ) ) {
+            else {
+                fis1.close();
+            }
+            FileInputStream fis2 = new FileInputStream( PATH_TO_TEST_DATA + "msa_3.txt" );
+            if ( FastaParser.isLikelyFasta( fis2 ) ) {
+                fis2.close();
                 return false;
             }
+            else {
+                fis2.close();
+            }
             final Msa msa_0 = FastaParser.parseMsa( new FileInputStream( PATH_TO_TEST_DATA + "fasta_0.fasta" ) );
             if ( !msa_0.getSequenceAsString( 0 ).toString().equalsIgnoreCase( "ACGTGKXFMFDMXEXXXSFMFMF" ) ) {
                 return false;
@@ -4761,7 +5288,7 @@ public final class Test {
             if ( !msa_0.getSequenceAsString( 1 ).toString().equalsIgnoreCase( "DKXASDFXSFXFKFKSXDFKSLX" ) ) {
                 return false;
             }
-            if ( !msa_0.getSequenceAsString( 2 ).toString().equalsIgnoreCase( "SXDFKSXLFSFPWEXPRXWXERR" ) ) {
+            if ( !msa_0.getSequenceAsString( 2 ).toString().equalsIgnoreCase( "SXDFKSXLFSFPWEXPROWXERR" ) ) {
                 return false;
             }
             if ( !msa_0.getSequenceAsString( 3 ).toString().equalsIgnoreCase( "AAAAAAAAAAAAAAAAAAAAAAA" ) ) {
@@ -5681,10 +6208,10 @@ public final class Test {
         final String test_dir = Test.PATH_TO_TEST_DATA;
         try {
             final HmmscanPerDomainTableParser parser1 = new HmmscanPerDomainTableParser( new File( test_dir
-                    + ForesterUtil.getFileSeparator() + "hmmscan30b3_output_1" ), "MONBR", INDIVIDUAL_SCORE_CUTOFF.NONE );
+                                                                                                   + ForesterUtil.getFileSeparator() + "hmmscan30b3_output_1" ), "MONBR", INDIVIDUAL_SCORE_CUTOFF.NONE );
             parser1.parse();
             final HmmscanPerDomainTableParser parser2 = new HmmscanPerDomainTableParser( new File( test_dir
-                    + ForesterUtil.getFileSeparator() + "hmmscan30b3_output_2" ), "MONBR", INDIVIDUAL_SCORE_CUTOFF.NONE );
+                                                                                                   + ForesterUtil.getFileSeparator() + "hmmscan30b3_output_2" ), "MONBR", INDIVIDUAL_SCORE_CUTOFF.NONE );
             final List<Protein> proteins = parser2.parse();
             if ( parser2.getProteinsEncountered() != 4 ) {
                 return false;
@@ -6049,11 +6576,11 @@ public final class Test {
 
     private static boolean testMsaQualityMethod() {
         try {
-            final Sequence s0 = BasicSequence.createAaSequence( "a", "ABAXEFGHIJJE-" );
-            final Sequence s1 = BasicSequence.createAaSequence( "b", "ABBXEFGHIJJBB" );
-            final Sequence s2 = BasicSequence.createAaSequence( "c", "AXCXEFGHIJJ--" );
-            final Sequence s3 = BasicSequence.createAaSequence( "d", "AXDDEFGHIJ---" );
-            final List<Sequence> l = new ArrayList<Sequence>();
+            final MolecularSequence s0 = BasicSequence.createAaSequence( "a", "ABAXEFGHIJJE-" );
+            final MolecularSequence s1 = BasicSequence.createAaSequence( "b", "ABBXEFGHIJJBB" );
+            final MolecularSequence s2 = BasicSequence.createAaSequence( "c", "AXCXEFGHIJJ--" );
+            final MolecularSequence s3 = BasicSequence.createAaSequence( "d", "AXDDEFGHIJ---" );
+            final List<MolecularSequence> l = new ArrayList<MolecularSequence>();
             l.add( s0 );
             l.add( s1 );
             l.add( s2 );
@@ -6088,15 +6615,80 @@ public final class Test {
         return true;
     }
 
+    private static boolean testMsaEntropy() {
+        try {
+            final MolecularSequence s0 = BasicSequence.createAaSequence( "a", "AAAAAAA" );
+            final MolecularSequence s1 = BasicSequence.createAaSequence( "b", "AAAIACC" );
+            final MolecularSequence s2 = BasicSequence.createAaSequence( "c", "AAIIIIF" );
+            final MolecularSequence s3 = BasicSequence.createAaSequence( "d", "AIIIVVW" );
+            final List<MolecularSequence> l = new ArrayList<MolecularSequence>();
+            l.add( s0 );
+            l.add( s1 );
+            l.add( s2 );
+            l.add( s3 );
+            final Msa msa = BasicMsa.createInstance( l );
+            //TODO need to DO the tests!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            //FIXME
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 20, msa, 0 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 20, msa, 1 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 20, msa, 2 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 20, msa, 3 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 20, msa, 4 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 20, msa, 5 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 20, msa, 6 ) );
+            //            System.out.println();
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 6, msa, 0 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 6, msa, 1 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 6, msa, 2 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 6, msa, 3 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 6, msa, 4 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 6, msa, 5 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 6, msa, 6 ) );
+            final List<MolecularSequence> l2 = new ArrayList<MolecularSequence>();
+            l2.add( BasicSequence.createAaSequence( "1", "AAAAAAA" ) );
+            l2.add( BasicSequence.createAaSequence( "2", "AAAIACC" ) );
+            l2.add( BasicSequence.createAaSequence( "3", "AAIIIIF" ) );
+            l2.add( BasicSequence.createAaSequence( "4", "AIIIVVW" ) );
+            l2.add( BasicSequence.createAaSequence( "5", "AAAAAAA" ) );
+            l2.add( BasicSequence.createAaSequence( "6", "AAAIACC" ) );
+            l2.add( BasicSequence.createAaSequence( "7", "AAIIIIF" ) );
+            l2.add( BasicSequence.createAaSequence( "8", "AIIIVVW" ) );
+            l2.add( BasicSequence.createAaSequence( "9", "AAAAAAA" ) );
+            l2.add( BasicSequence.createAaSequence( "10", "AAAIACC" ) );
+            l2.add( BasicSequence.createAaSequence( "11", "AAIIIIF" ) );
+            l2.add( BasicSequence.createAaSequence( "12", "AIIIVVW" ) );
+            l2.add( BasicSequence.createAaSequence( "13", "AAIIIIF" ) );
+            l2.add( BasicSequence.createAaSequence( "14", "AIIIVVW" ) );
+            l2.add( BasicSequence.createAaSequence( "15", "AAAAAAA" ) );
+            l2.add( BasicSequence.createAaSequence( "16", "AAAIACC" ) );
+            l2.add( BasicSequence.createAaSequence( "17", "AAIIIIF" ) );
+            l2.add( BasicSequence.createAaSequence( "18", "AIIIVVW" ) );
+            l2.add( BasicSequence.createAaSequence( "19", "AAAAAAA" ) );
+            l2.add( BasicSequence.createAaSequence( "20", "AAAIACC" ) );
+            l2.add( BasicSequence.createAaSequence( "21", "AAIIIIF" ) );
+            l2.add( BasicSequence.createAaSequence( "22", "AIIIVVW" ) );
+            final Msa msa2 = BasicMsa.createInstance( l2 );
+            //            System.out.println();
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 20, msa2, 0 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 20, msa2, 1 ) );
+            //            System.out.println( MsaMethods.calcNormalizedShannonsEntropy( 20, msa2, 2 ) );
+        }
+        catch ( final Exception e ) {
+            e.printStackTrace( System.out );
+            return false;
+        }
+        return true;
+    }
+
     private static boolean testDeleteableMsa() {
         try {
-            final Sequence s0 = BasicSequence.createAaSequence( "a", "AAAA" );
-            final Sequence s1 = BasicSequence.createAaSequence( "b", "BAAA" );
-            final Sequence s2 = BasicSequence.createAaSequence( "c", "CAAA" );
-            final Sequence s3 = BasicSequence.createAaSequence( "d", "DAAA" );
-            final Sequence s4 = BasicSequence.createAaSequence( "e", "EAAA" );
-            final Sequence s5 = BasicSequence.createAaSequence( "f", "FAAA" );
-            final List<Sequence> l0 = new ArrayList<Sequence>();
+            final MolecularSequence s0 = BasicSequence.createAaSequence( "a", "AAAA" );
+            final MolecularSequence s1 = BasicSequence.createAaSequence( "b", "BAAA" );
+            final MolecularSequence s2 = BasicSequence.createAaSequence( "c", "CAAA" );
+            final MolecularSequence s3 = BasicSequence.createAaSequence( "d", "DAAA" );
+            final MolecularSequence s4 = BasicSequence.createAaSequence( "e", "EAAA" );
+            final MolecularSequence s5 = BasicSequence.createAaSequence( "f", "FAAA" );
+            final List<MolecularSequence> l0 = new ArrayList<MolecularSequence>();
             l0.add( s0 );
             l0.add( s1 );
             l0.add( s2 );
@@ -6104,13 +6696,13 @@ public final class Test {
             l0.add( s4 );
             l0.add( s5 );
             final DeleteableMsa dmsa0 = DeleteableMsa.createInstance( l0 );
-            dmsa0.deleteRow( "b" );
+            dmsa0.deleteRow( "b", false );
             if ( !dmsa0.getIdentifier( 1 ).equals( "c" ) ) {
                 return false;
             }
-            dmsa0.deleteRow( "e" );
-            dmsa0.deleteRow( "a" );
-            dmsa0.deleteRow( "f" );
+            dmsa0.deleteRow( "e", false );
+            dmsa0.deleteRow( "a", false );
+            dmsa0.deleteRow( "f", false );
             if ( dmsa0.getLength() != 4 ) {
                 return false;
             }
@@ -6132,19 +6724,19 @@ public final class Test {
             if ( dmsa0.getColumnAt( 0 ).size() != 2 ) {
                 return false;
             }
-            dmsa0.deleteRow( "c" );
-            dmsa0.deleteRow( "d" );
+            dmsa0.deleteRow( "c", false );
+            dmsa0.deleteRow( "d", false );
             if ( dmsa0.getNumberOfSequences() != 0 ) {
                 return false;
             }
             //
-            final Sequence s_0 = BasicSequence.createAaSequence( "a", "--A---B-C--X----" );
-            final Sequence s_1 = BasicSequence.createAaSequence( "b", "--B-----C-------" );
-            final Sequence s_2 = BasicSequence.createAaSequence( "c", "--C--AB-C------Z" );
-            final Sequence s_3 = BasicSequence.createAaSequence( "d", "--D--AA-C-------" );
-            final Sequence s_4 = BasicSequence.createAaSequence( "e", "--E--AA-C-------" );
-            final Sequence s_5 = BasicSequence.createAaSequence( "f", "--F--AB-CD--Y---" );
-            final List<Sequence> l1 = new ArrayList<Sequence>();
+            final MolecularSequence s_0 = BasicSequence.createAaSequence( "a", "--A---B-C--X----" );
+            final MolecularSequence s_1 = BasicSequence.createAaSequence( "b", "--B-----C-------" );
+            final MolecularSequence s_2 = BasicSequence.createAaSequence( "c", "--C--AB-C------Z" );
+            final MolecularSequence s_3 = BasicSequence.createAaSequence( "d", "--D--AA-C-------" );
+            final MolecularSequence s_4 = BasicSequence.createAaSequence( "e", "--E--AA-C-------" );
+            final MolecularSequence s_5 = BasicSequence.createAaSequence( "f", "--F--AB-CD--Y---" );
+            final List<MolecularSequence> l1 = new ArrayList<MolecularSequence>();
             l1.add( s_0 );
             l1.add( s_1 );
             l1.add( s_2 );
@@ -6153,9 +6745,9 @@ public final class Test {
             l1.add( s_5 );
             final DeleteableMsa dmsa1 = DeleteableMsa.createInstance( l1 );
             dmsa1.deleteGapOnlyColumns();
-            dmsa1.deleteRow( "a" );
-            dmsa1.deleteRow( "f" );
-            dmsa1.deleteRow( "d" );
+            dmsa1.deleteRow( "a", false );
+            dmsa1.deleteRow( "f", false );
+            dmsa1.deleteRow( "d", false );
             dmsa1.deleteGapOnlyColumns();
             if ( !dmsa1.getSequenceAsString( 0 ).toString().equals( "B--C-" ) ) {
                 return false;
@@ -6166,7 +6758,7 @@ public final class Test {
             if ( !dmsa1.getSequenceAsString( 2 ).toString().equals( "EAAC-" ) ) {
                 return false;
             }
-            dmsa1.deleteRow( "c" );
+            dmsa1.deleteRow( "c", false );
             dmsa1.deleteGapOnlyColumns();
             final Writer w0 = new StringWriter();
             dmsa1.write( w0, MSA_FORMAT.FASTA );
@@ -6178,14 +6770,13 @@ public final class Test {
             if ( !dmsa1.getSequenceAsString( 1 ).toString().equals( "EAAC" ) ) {
                 return false;
             }
-            //
-            final Sequence s__0 = BasicSequence.createAaSequence( "a", "A------" );
-            final Sequence s__1 = BasicSequence.createAaSequence( "b", "BB-----" );
-            final Sequence s__2 = BasicSequence.createAaSequence( "c", "CCC----" );
-            final Sequence s__3 = BasicSequence.createAaSequence( "d", "DDDD---" );
-            final Sequence s__4 = BasicSequence.createAaSequence( "e", "EEEEE--" );
-            final Sequence s__5 = BasicSequence.createAaSequence( "f", "FFFFFF-" );
-            final List<Sequence> l2 = new ArrayList<Sequence>();
+            final MolecularSequence s__0 = BasicSequence.createAaSequence( "a", "A------" );
+            final MolecularSequence s__1 = BasicSequence.createAaSequence( "b", "BB-----" );
+            final MolecularSequence s__2 = BasicSequence.createAaSequence( "c", "CCC----" );
+            final MolecularSequence s__3 = BasicSequence.createAaSequence( "d", "DDDD---" );
+            final MolecularSequence s__4 = BasicSequence.createAaSequence( "e", "EEEEE--" );
+            final MolecularSequence s__5 = BasicSequence.createAaSequence( "f", "FFFFFF-" );
+            final List<MolecularSequence> l2 = new ArrayList<MolecularSequence>();
             l2.add( s__0 );
             l2.add( s__1 );
             l2.add( s__2 );
@@ -6214,24 +6805,29 @@ public final class Test {
                 return false;
             }
             dmsa2.deleteGapColumns( 0 );
-            dmsa2.deleteRow( "a" );
-            dmsa2.deleteRow( "b" );
-            dmsa2.deleteRow( "f" );
-            dmsa2.deleteRow( "e" );
+            dmsa2.deleteRow( "a", false );
+            dmsa2.deleteRow( "b", false );
+            dmsa2.deleteRow( "f", false );
+            dmsa2.deleteRow( "e", false );
             dmsa2.setIdentifier( 0, "new_c" );
             dmsa2.setIdentifier( 1, "new_d" );
             dmsa2.setResidueAt( 0, 0, 'x' );
-            dmsa2.deleteRow( "new_d" );
+            final MolecularSequence s = dmsa2.deleteRow( "new_d", true );
+            if ( !s.getMolecularSequenceAsString().equals( "D" ) ) {
+                return false;
+            }
             final Writer w = new StringWriter();
             dmsa2.write( w, MSA_FORMAT.PHYLIP );
             final String phylip = w.toString();
-            if ( !phylip.equals( "new_c x" + ForesterUtil.LINE_SEPARATOR ) ) {
+            if ( !phylip.equals( "1 1" + ForesterUtil.LINE_SEPARATOR + "new_c x" + ForesterUtil.LINE_SEPARATOR ) ) {
+                System.out.println( phylip );
                 return false;
             }
             final Writer w2 = new StringWriter();
             dmsa2.write( w2, MSA_FORMAT.FASTA );
             final String fasta = w2.toString();
             if ( !fasta.equals( ">new_c" + ForesterUtil.LINE_SEPARATOR + "x" + ForesterUtil.LINE_SEPARATOR ) ) {
+                System.out.println( fasta );
                 return false;
             }
         }
@@ -6248,7 +6844,7 @@ public final class Test {
             PhylogenyNode n;
             List<PhylogenyNode> ext = new ArrayList<PhylogenyNode>();
             final StringBuffer sb0 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h))fgh)cdefgh)abcdefgh" );
-            final Phylogeny t0 = factory.create( sb0, new NHXParser() )[ 0 ];
+            final Phylogeny t0 = factory.create( sb0.toString(), new NHXParser() )[ 0 ];
             t0.getNode( "cd" ).setCollapse( true );
             t0.getNode( "cde" ).setCollapse( true );
             n = t0.getFirstExternalNode();
@@ -6276,7 +6872,7 @@ public final class Test {
             }
             ext.clear();
             final StringBuffer sb1 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h))fgh)cdefgh)abcdefgh" );
-            final Phylogeny t1 = factory.create( sb1, new NHXParser() )[ 0 ];
+            final Phylogeny t1 = factory.create( sb1.toString(), new NHXParser() )[ 0 ];
             t1.getNode( "ab" ).setCollapse( true );
             t1.getNode( "cd" ).setCollapse( true );
             t1.getNode( "cde" ).setCollapse( true );
@@ -6301,11 +6897,9 @@ public final class Test {
             if ( !ext.get( 4 ).getName().equals( "h" ) ) {
                 return false;
             }
-            //
-            //
             ext.clear();
             final StringBuffer sb2 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h)gh)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t2 = factory.create( sb2, new NHXParser() )[ 0 ];
+            final Phylogeny t2 = factory.create( sb2.toString(), new NHXParser() )[ 0 ];
             t2.getNode( "ab" ).setCollapse( true );
             t2.getNode( "cd" ).setCollapse( true );
             t2.getNode( "cde" ).setCollapse( true );
@@ -6331,11 +6925,9 @@ public final class Test {
             if ( !ext.get( 3 ).getName().equals( "gh" ) ) {
                 return false;
             }
-            //
-            //
             ext.clear();
             final StringBuffer sb3 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h)gh)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t3 = factory.create( sb3, new NHXParser() )[ 0 ];
+            final Phylogeny t3 = factory.create( sb3.toString(), new NHXParser() )[ 0 ];
             t3.getNode( "ab" ).setCollapse( true );
             t3.getNode( "cd" ).setCollapse( true );
             t3.getNode( "cde" ).setCollapse( true );
@@ -6359,11 +6951,9 @@ public final class Test {
             if ( !ext.get( 2 ).getName().equals( "fgh" ) ) {
                 return false;
             }
-            //
-            //
             ext.clear();
             final StringBuffer sb4 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h)gh)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t4 = factory.create( sb4, new NHXParser() )[ 0 ];
+            final Phylogeny t4 = factory.create( sb4.toString(), new NHXParser() )[ 0 ];
             t4.getNode( "ab" ).setCollapse( true );
             t4.getNode( "cd" ).setCollapse( true );
             t4.getNode( "cde" ).setCollapse( true );
@@ -6377,10 +6967,8 @@ public final class Test {
             if ( n.getNextExternalNodeWhileTakingIntoAccountCollapsedNodes() != null ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb5 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h))fgh)cdefgh)abcdefgh" );
-            final Phylogeny t5 = factory.create( sb5, new NHXParser() )[ 0 ];
+            final Phylogeny t5 = factory.create( sb5.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             n = t5.getFirstExternalNode();
             while ( n != null ) {
@@ -6414,10 +7002,8 @@ public final class Test {
             if ( !ext.get( 7 ).getName().equals( "h" ) ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb6 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h))fgh)cdefgh)abcdefgh" );
-            final Phylogeny t6 = factory.create( sb6, new NHXParser() )[ 0 ];
+            final Phylogeny t6 = factory.create( sb6.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t6.getNode( "ab" ).setCollapse( true );
             n = t6.getNode( "ab" );
@@ -6449,10 +7035,8 @@ public final class Test {
             if ( !ext.get( 6 ).getName().equals( "h" ) ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb7 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h))fgh)cdefgh)abcdefgh" );
-            final Phylogeny t7 = factory.create( sb7, new NHXParser() )[ 0 ];
+            final Phylogeny t7 = factory.create( sb7.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t7.getNode( "cd" ).setCollapse( true );
             n = t7.getNode( "a" );
@@ -6484,10 +7068,8 @@ public final class Test {
             if ( !ext.get( 6 ).getName().equals( "h" ) ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb8 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h))fgh)cdefgh)abcdefgh" );
-            final Phylogeny t8 = factory.create( sb8, new NHXParser() )[ 0 ];
+            final Phylogeny t8 = factory.create( sb8.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t8.getNode( "cd" ).setCollapse( true );
             t8.getNode( "c" ).setCollapse( true );
@@ -6522,10 +7104,8 @@ public final class Test {
             if ( !ext.get( 6 ).getName().equals( "h" ) ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb9 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h)gh)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t9 = factory.create( sb9, new NHXParser() )[ 0 ];
+            final Phylogeny t9 = factory.create( sb9.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t9.getNode( "gh" ).setCollapse( true );
             n = t9.getNode( "a" );
@@ -6557,10 +7137,8 @@ public final class Test {
             if ( !ext.get( 6 ).getName().equals( "gh" ) ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb10 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h)gh)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t10 = factory.create( sb10, new NHXParser() )[ 0 ];
+            final Phylogeny t10 = factory.create( sb10.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t10.getNode( "gh" ).setCollapse( true );
             t10.getNode( "g" ).setCollapse( true );
@@ -6594,10 +7172,8 @@ public final class Test {
             if ( !ext.get( 6 ).getName().equals( "gh" ) ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb11 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h)gh)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t11 = factory.create( sb11, new NHXParser() )[ 0 ];
+            final Phylogeny t11 = factory.create( sb11.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t11.getNode( "gh" ).setCollapse( true );
             t11.getNode( "fgh" ).setCollapse( true );
@@ -6627,10 +7203,8 @@ public final class Test {
             if ( !ext.get( 5 ).getName().equals( "fgh" ) ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb12 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h)gh)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t12 = factory.create( sb12, new NHXParser() )[ 0 ];
+            final Phylogeny t12 = factory.create( sb12.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t12.getNode( "gh" ).setCollapse( true );
             t12.getNode( "fgh" ).setCollapse( true );
@@ -6663,10 +7237,8 @@ public final class Test {
             if ( !ext.get( 5 ).getName().equals( "fgh" ) ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb13 = new StringBuffer( "((a,b)ab,(((c,d)cd,e)cde,(f,(g,h)gh)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t13 = factory.create( sb13, new NHXParser() )[ 0 ];
+            final Phylogeny t13 = factory.create( sb13.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t13.getNode( "ab" ).setCollapse( true );
             t13.getNode( "b" ).setCollapse( true );
@@ -6695,10 +7267,8 @@ public final class Test {
             if ( !ext.get( 4 ).getName().equals( "fgh" ) ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb14 = new StringBuffer( "((a,b,0)ab,(((c,d)cd,e)cde,(f,(g,h,1,2)gh,0)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t14 = factory.create( sb14, new NHXParser() )[ 0 ];
+            final Phylogeny t14 = factory.create( sb14.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t14.getNode( "ab" ).setCollapse( true );
             t14.getNode( "a" ).setCollapse( true );
@@ -6727,10 +7297,8 @@ public final class Test {
             if ( !ext.get( 4 ).getName().equals( "fgh" ) ) {
                 return false;
             }
-            //
-            //
             final StringBuffer sb15 = new StringBuffer( "((a,b,0)ab,(((c,d)cd,e)cde,x,(f,(g,h,1,2)gh,0)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t15 = factory.create( sb15, new NHXParser() )[ 0 ];
+            final Phylogeny t15 = factory.create( sb15.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t15.getNode( "ab" ).setCollapse( true );
             t15.getNode( "a" ).setCollapse( true );
@@ -6765,7 +7333,7 @@ public final class Test {
             //
             //
             final StringBuffer sb16 = new StringBuffer( "((a,b,0)ab,(((c,d)cd,e)cde,x,(f,(g,h,1,2)gh,0)fgh)cdefgh)abcdefgh" );
-            final Phylogeny t16 = factory.create( sb16, new NHXParser() )[ 0 ];
+            final Phylogeny t16 = factory.create( sb16.toString(), new NHXParser() )[ 0 ];
             ext.clear();
             t16.getNode( "ab" ).setCollapse( true );
             t16.getNode( "a" ).setCollapse( true );
@@ -7131,11 +7699,11 @@ public final class Test {
                 return false;
             }
             if ( !isEqual( 0.48039661496919533, phylogenies[ 0 ].getNode( "Diadocidia_spinosula" )
-                    .getDistanceToParent() ) ) {
+                           .getDistanceToParent() ) ) {
                 return false;
             }
             if ( !isEqual( 0.3959796191512233, phylogenies[ 0 ].getNode( "Diadocidia_stanfordensis" )
-                    .getDistanceToParent() ) ) {
+                           .getDistanceToParent() ) ) {
                 return false;
             }
             if ( !phylogenies[ 0 ].getName().equals( "Family Diadocidiidae MLT (Imported_tree_0)" ) ) {
@@ -7185,7 +7753,6 @@ public final class Test {
             if ( phy != null ) {
                 return false;
             }
-            //
             p.reset();
             if ( !p.hasNext() ) {
                 return false;
@@ -7207,7 +7774,6 @@ public final class Test {
             if ( phy != null ) {
                 return false;
             }
-            ////
             p.setSource( Test.PATH_TO_TEST_DATA + "nexus_test_2.nex" );
             if ( !p.hasNext() ) {
                 return false;
@@ -7229,7 +7795,6 @@ public final class Test {
             if ( phy != null ) {
                 return false;
             }
-            //
             p.reset();
             if ( !p.hasNext() ) {
                 return false;
@@ -7251,7 +7816,6 @@ public final class Test {
             if ( phy != null ) {
                 return false;
             }
-            //
             p.setSource( Test.PATH_TO_TEST_DATA + "nexus_test_3.nex" );
             if ( !p.hasNext() ) {
                 return false;
@@ -7989,10 +8553,10 @@ public final class Test {
             if ( !p1b.toNewHampshire().equals( "(';A;',';B;1;');" ) ) {
                 return false;
             }
-            final Phylogeny p2 = factory.create( new StringBuffer( "(A,B2)" ), new NHXParser() )[ 0 ];
+            final Phylogeny p2 = factory.create( new StringBuffer( "(A,B2)" ).toString(), new NHXParser() )[ 0 ];
             final Phylogeny p3 = factory.create( new char[] { '(', 'A', ',', 'B', '3', ')' }, new NHXParser() )[ 0 ];
             final Phylogeny p4 = factory.create( "(A,B4);", new NHXParser() )[ 0 ];
-            final Phylogeny p5 = factory.create( new StringBuffer( "(A,B5);" ), new NHXParser() )[ 0 ];
+            final Phylogeny p5 = factory.create( new StringBuffer( "(A,B5);" ).toString(), new NHXParser() )[ 0 ];
             final Phylogeny[] p7 = factory.create( "(A,B7);(C,D7)", new NHXParser() );
             final Phylogeny[] p8 = factory.create( "(A,B8) (C,D8)", new NHXParser() );
             final Phylogeny[] p9 = factory.create( "(A,B9)\n(C,D9)", new NHXParser() );
@@ -8000,9 +8564,9 @@ public final class Test {
             final Phylogeny[] p11 = factory.create( "(A,B11);(C,D11) (E,F11)\t(G,H11)", new NHXParser() );
             final Phylogeny[] p12 = factory.create( "(A,B12) (C,D12) (E,F12) (G,H12)", new NHXParser() );
             final Phylogeny[] p13 = factory.create( " ; (;A; , ; B ; 1  3 ; \n)\t ( \n ;"
-                                                            + " C ; ,; D;13;);;;;;;(;E;,;F;13 ;) ; "
-                                                            + "; ; ( \t\n\r\b; G ;, ;H ;1 3; )  ;  ;   ;",
-                                                    new NHXParser() );
+                    + " C ; ,; D;13;);;;;;;(;E;,;F;13 ;) ; "
+                    + "; ; ( \t\n\r\b; G ;, ;H ;1 3; )  ;  ;   ;",
+                    new NHXParser() );
             if ( !p13[ 0 ].toNewHampshireX().equals( "(';A;',';B;13;')" ) ) {
                 return false;
             }
@@ -8250,21 +8814,21 @@ public final class Test {
             if ( p46.length != 0 ) {
                 return false;
             }
-            final Phylogeny p47 = factory.create( new StringBuffer( "((A,B)ab:2[0.44],C)" ), new NHXParser() )[ 0 ];
+            final Phylogeny p47 = factory.create( new StringBuffer( "((A,B)ab:2[0.44],C)" ).toString(), new NHXParser() )[ 0 ];
             if ( !isEqual( 0.44, p47.getNode( "ab" ).getBranchData().getConfidence( 0 ).getValue() ) ) {
                 return false;
             }
-            final Phylogeny p48 = factory.create( new StringBuffer( "((A,B)ab:2[88],C)" ), new NHXParser() )[ 0 ];
+            final Phylogeny p48 = factory.create( new StringBuffer( "((A,B)ab:2[88],C)" ).toString(), new NHXParser() )[ 0 ];
             if ( !isEqual( 88, p48.getNode( "ab" ).getBranchData().getConfidence( 0 ).getValue() ) ) {
                 return false;
             }
             final Phylogeny p49 = factory
-                    .create( new StringBuffer( "((A,B)a[comment:a,b;(a)]b:2[0.44][comment(a,b,b);],C)" ),
+                    .create( new StringBuffer( "((A,B)a[comment:a,b;(a)]b:2[0.44][comment(a,b,b);],C)" ).toString(),
                              new NHXParser() )[ 0 ];
             if ( !isEqual( 0.44, p49.getNode( "ab" ).getBranchData().getConfidence( 0 ).getValue() ) ) {
                 return false;
             }
-            final Phylogeny p50 = factory.create( new StringBuffer( "((\"A\",B)ab:2[88],C)" ), new NHXParser() )[ 0 ];
+            final Phylogeny p50 = factory.create( new StringBuffer( "((\"A\",B)ab:2[88],C)" ).toString(), new NHXParser() )[ 0 ];
             if ( p50.getNode( "A" ) == null ) {
                 return false;
             }
@@ -8279,21 +8843,21 @@ public final class Test {
                     .equals( "((A,B)88:2.0,C);" ) ) {
                 return false;
             }
-            final Phylogeny p51 = factory.create( new StringBuffer( "((\"A(A\",B)ab:2[88],C)" ), new NHXParser() )[ 0 ];
+            final Phylogeny p51 = factory.create( new StringBuffer( "((\"A(A\",B)ab:2[88],C)" ).toString(), new NHXParser() )[ 0 ];
             if ( p51.getNode( "A(A" ) == null ) {
                 return false;
             }
-            final Phylogeny p52 = factory.create( new StringBuffer( "(('A(A',B)ab:2[88],C)" ), new NHXParser() )[ 0 ];
+            final Phylogeny p52 = factory.create( new StringBuffer( "(('A(A',B)ab:2[88],C)" ).toString(), new NHXParser() )[ 0 ];
             if ( p52.getNode( "A(A" ) == null ) {
                 return false;
             }
             final Phylogeny p53 = factory
-                    .create( new StringBuffer( "(('A(A',\"B (x (a' ,b) f(x);\"[com])[ment]ab:2[88],C)" ),
+                    .create( new StringBuffer( "(('A(A',\"B (x (a' ,b) f(x);\"[com])[ment]ab:2[88],C)" ).toString(),
                              new NHXParser() )[ 0 ];
             if ( p53.getNode( "B (x (a' ,b) f(x);" ) == null ) {
                 return false;
             }
-            final Phylogeny p54 = factory.create( new StringBuffer( "((A,B):[88],C)" ), new NHXParser() )[ 0 ];
+            final Phylogeny p54 = factory.create( new StringBuffer( "((A,B):[88],C)" ).toString(), new NHXParser() )[ 0 ];
             if ( p54.getNode( "A" ) == null ) {
                 return false;
             }
@@ -8301,7 +8865,7 @@ public final class Test {
                 return false;
             }
             final Phylogeny p55 = factory
-                    .create( new StringBuffer( "((\"lcl|HPV32_L1.:1  s\":0.195593,\"lcl|HPV30_L1.1|;a\":0.114237):0.0359322,\"lcl|HPV56_L1.1|,d\":0.0727412,\"lcl|HPV66_L1.1x\":0.0798012);" ),
+                    .create( new StringBuffer( "((\"lcl|HPV32_L1.:1  s\":0.195593,\"lcl|HPV30_L1.1|;a\":0.114237):0.0359322,\"lcl|HPV56_L1.1|,d\":0.0727412,\"lcl|HPV66_L1.1x\":0.0798012);" ).toString(),
                              new NHXParser() )[ 0 ];
             if ( !p55
                     .toNewHampshire()
@@ -8310,7 +8874,7 @@ public final class Test {
                 return false;
             }
             final Phylogeny p56 = factory
-                    .create( new StringBuffer( "((\"lcl|HPV32_L1.:1      s\":0.195593,\"lcl|HPV30_L1.1|;a\":0.114\n237):0.0359322,\"lcl|HPV56_L1.1|,d\":0.0727412,\"lcl|HPV66_L1.1:x\":0.0798012);" ),
+                    .create( new StringBuffer( "((\"lcl|HPV32_L1.:1      s\":0.195593,\"lcl|HPV30_L1.1|;a\":0.114\n237):0.0359322,\"lcl|HPV56_L1.1|,d\":0.0727412,\"lcl|HPV66_L1.1:x\":0.0798012);" ).toString(),
                              new NHXParser() )[ 0 ];
             if ( !p56
                     .toNewHampshire()
@@ -8319,7 +8883,7 @@ public final class Test {
                 return false;
             }
             final Phylogeny p57 = factory
-                    .create( new StringBuffer( "((\"lcl|HPV32_L1.:1      s\":0.195593,\"lcl|HPV30_L1.1|;a\":0.114\n237):0.0359322,\"lcl|HPV56_L1.1|,d\":0.0727412,\"lcl|HPV66_L1.1:x\":0.0798012);" ),
+                    .create( new StringBuffer( "((\"lcl|HPV32_L1.:1      s\":0.195593,\"lcl|HPV30_L1.1|;a\":0.114\n237):0.0359322,\"lcl|HPV56_L1.1|,d\":0.0727412,\"lcl|HPV66_L1.1:x\":0.0798012);" ).toString(),
                              new NHXParser() )[ 0 ];
             if ( !p57
                     .toNewHampshire()
@@ -8328,25 +8892,25 @@ public final class Test {
                 return false;
             }
             final String s58 = "('Homo \"man\" sapiens:1',\"Homo 'man' sapiens;\")';root \"1_ )';";
-            final Phylogeny p58 = factory.create( new StringBuffer( s58 ), new NHXParser() )[ 0 ];
+            final Phylogeny p58 = factory.create( s58, new NHXParser() )[ 0 ];
             if ( !p58.toNewHampshire().equals( s58 ) ) {
                 System.out.println( p58.toNewHampshire() );
                 return false;
             }
             final String s59 = "('Homo \"man sapiens:1',\"Homo 'man sapiens\")\"root; '1_ )\";";
-            final Phylogeny p59 = factory.create( new StringBuffer( s59 ), new NHXParser() )[ 0 ];
+            final Phylogeny p59 = factory.create( s59 , new NHXParser() )[ 0 ];
             if ( !p59.toNewHampshire().equals( s59 ) ) {
                 System.out.println( p59.toNewHampshire() );
                 return false;
             }
             final String s60 = "('\" ;,:\":\"',\"'abc def' g's_\",'=:0.45+,.:%~`!@#$%^&*()_-+={} | ;,');";
-            final Phylogeny p60 = factory.create( new StringBuffer( s60 ), new NHXParser() )[ 0 ];
+            final Phylogeny p60 = factory.create( s60, new NHXParser() )[ 0 ];
             if ( !p60.toNewHampshire().equals( s60 ) ) {
                 System.out.println( p60.toNewHampshire() );
                 return false;
             }
             final String s61 = "('H[omo] \"man\" sapiens:1',\"H[omo] 'man' sapiens;\",H[omo] sapiens)';root \"1_ )';";
-            final Phylogeny p61 = factory.create( new StringBuffer( s61 ), new NHXParser() )[ 0 ];
+            final Phylogeny p61 = factory.create( s61, new NHXParser() )[ 0 ];
             if ( !p61.toNewHampshire()
                     .equals( "('H{omo} \"man\" sapiens:1',\"H{omo} 'man' sapiens;\",Hsapiens)';root \"1_ )';" ) ) {
                 System.out.println( p61.toNewHampshire() );
@@ -8359,7 +8923,36 @@ public final class Test {
         }
         return true;
     }
-
+    
+    private static boolean testNHParsingSpecialChars() {
+        try {
+            final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance();   
+            final String i0 = "(A!+=~QWERTY!@#$%^&*-,€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜˜˜™š›œžŸ¡¢£¤¥¦§¨©ª«¬®¯°±¹²³´µ¶·¸º»¼¿À÷þÿ)";
+            final Phylogeny p0 = factory.create( i0, new NHXParser() )[ 0 ];
+            if ( !p0.toNewHampshireX().equals( i0 ) ) {
+                System.out.println();
+                System.out.println( p0.toNewHampshireX() );
+                System.out.println( i0 );
+                return false;
+            }
+            final String i1 = "(हिंदी,한글,ไทย,'Tiếng Việt',ひらがなカタカナ漢字,繁體字,русский)";
+            final Phylogeny p1 = factory.create( i1, new NHXParser() )[ 0 ];
+            if ( !p1.toNewHampshireX().equals( i1 ) ) {
+                System.out.println();
+                System.out.println( p1.toNewHampshireX() );
+                System.out.println( i1 );
+                return false;
+            }
+        }
+        catch ( final Exception e ) {
+            e.printStackTrace( System.out );
+            return false;
+        }
+        return true;
+    }
+    
+    
+    
     private static boolean testNHParsingIter() {
         try {
             final String p0_str = "(A,B);";
@@ -8845,7 +9438,7 @@ public final class Test {
             if ( !n7.toNewHampshire( true, PhylogenyNode.NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS )
                     .equals( "'gks:dr-m4 \" ` `@:[]sadq04'" ) ) {
                 System.out.println( n7
-                        .toNewHampshire( true, PhylogenyNode.NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS ) );
+                                    .toNewHampshire( true, PhylogenyNode.NH_CONVERSION_SUPPORT_VALUE_STYLE.IN_SQUARE_BRACKETS ) );
                 return false;
             }
         }
@@ -9221,6 +9814,151 @@ public final class Test {
         return true;
     }
 
+    
+    private static boolean testNHXNodeParsing2() {
+        try {
+          
+            final PhylogenyNode n0_0 = PhylogenyNode
+                    .createInstanceFromNhxString( "n0:[ignore me 123]:1E-3", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n0_0.getName().equals( "n0" ) ) {
+                return false;
+            }
+            if ( !isEqual( n0_0.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            final PhylogenyNode n0_1 = PhylogenyNode
+                    .createInstanceFromNhxString( "n0[ignore me 123]:1E-3", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n0_1.getName().equals( "n0" ) ) {
+                return false;
+            }
+            if ( !isEqual( n0_1.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            final PhylogenyNode n0_2 = PhylogenyNode
+                    .createInstanceFromNhxString( "n0:1E-3[ignore me 123]", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n0_2.getName().equals( "n0" ) ) {
+                return false;
+            }
+            if ( !isEqual( n0_2.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            final PhylogenyNode n0_3 = PhylogenyNode
+                    .createInstanceFromNhxString( "n0:1E-3:[ignore me 123]", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n0_3.getName().equals( "n0" ) ) {
+                return false;
+            }
+            if ( !isEqual( n0_3.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            final PhylogenyNode n0_4 = PhylogenyNode
+                    .createInstanceFromNhxString( "n0:0.001:[ignore me 123]", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n0_4.getName().equals( "n0" ) ) {
+                return false;
+            }
+            if ( !isEqual( n0_4.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            final PhylogenyNode n1_0 = PhylogenyNode
+                    .createInstanceFromNhxString( "xyz|A/American_duck/NH/00321/|Duck|Canada[&!color=#FFFFFF]", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n1_0.getName().equals( "xyz|A/American duck/NH/00321/|Duck|Canada" ) ) {
+                return false;
+            }
+            if ( n1_0.getBranchData().getBranchColor().getValue().getGreen()!=255 ) {
+               return false;
+            }
+            final PhylogenyNode n1_1 = PhylogenyNode
+                    .createInstanceFromNhxString( "xyz|A/American_duck/NH/00321/|Duck|Canada[&!color=#FFFFFF]:0.001", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n1_1.getName().equals( "xyz|A/American duck/NH/00321/|Duck|Canada" ) ) {
+                return false;
+            }
+            if ( n1_1.getBranchData().getBranchColor().getValue().getGreen()!=255 ) {
+               return false;
+            }
+            if ( !isEqual( n1_1.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            final PhylogenyNode n1_2 = PhylogenyNode
+                    .createInstanceFromNhxString( "xyz|A/American_duck/NH/00321/|Duck|Canada:0.001[&!color=#FFFFFF]", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n1_2.getName().equals( "xyz|A/American duck/NH/00321/|Duck|Canada" ) ) {
+                return false;
+            }
+            if ( n1_2.getBranchData().getBranchColor().getValue().getGreen()!=255 ) {
+               return false;
+            }
+            if ( !isEqual( n1_2.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            final PhylogenyNode n1_3 = PhylogenyNode
+                    .createInstanceFromNhxString( "xyz|A/American_duck/NH/00321/|Duck|Canada:1e-3[&boostrap=69,&!color=#FFFFFF]", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n1_3.getName().equals( "xyz|A/American duck/NH/00321/|Duck|Canada" ) ) {
+                return false;
+            }
+            if ( n1_3.getBranchData().getBranchColor().getValue().getGreen()!=255 ) {
+               return false;
+            }
+            if ( !isEqual( n1_3.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            if ( !isEqual( n1_3.getBranchData().getConfidence( 0 ).getValue(), 69 ) ) {
+                return false;
+            }
+            if ( !n1_3.getBranchData().getConfidence( 0 ).getType().equals( "bootstrap" ) ) {
+                return false;
+            }
+            final PhylogenyNode n1_4 = PhylogenyNode
+                    .createInstanceFromNhxString( "xyz|A/American_duck/NH/00321/|Duck|Canada[&bootstrap=69,&!colour=#FFFFFF]:1e-3", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n1_4.getName().equals( "xyz|A/American duck/NH/00321/|Duck|Canada" ) ) {
+                return false;
+            }
+            if ( n1_4.getBranchData().getBranchColor().getValue().getGreen()!=255 ) {
+               return false;
+            }
+            if ( !isEqual( n1_4.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            if ( !isEqual( n1_4.getBranchData().getConfidence( 0 ).getValue(), 69 ) ) {
+                return false;
+            }
+            if ( !n1_4.getBranchData().getConfidence( 0 ).getType().equals( "bootstrap" ) ) {
+                return false;
+            }
+            final PhylogenyNode n1_5 = PhylogenyNode
+                    .createInstanceFromNhxString( "xyz|A/American_duck/NH/00321/|Duck|Canada:1e-3[69.0]", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n1_5.getName().equals( "xyz|A/American duck/NH/00321/|Duck|Canada" ) ) {
+                return false;
+            }
+            if ( !isEqual( n1_5.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            if ( !isEqual( n1_5.getBranchData().getConfidence( 0 ).getValue(), 69 ) ) {
+                return false;
+            }       
+            final PhylogenyNode n1_6 = PhylogenyNode
+                    .createInstanceFromNhxString( "xyz|A/American_duck/NH/00321/|Duck|Canada[&prob=0.9500000000000000e+00,prob_stddev=0.1100000000000000e+00]:1e-3", NHXParser.TAXONOMY_EXTRACTION.NO, true, true );
+            if ( !n1_6.getName().equals( "xyz|A/American duck/NH/00321/|Duck|Canada" ) ) {
+                return false;
+            }
+           
+            if ( !isEqual( n1_6.getDistanceToParent(), 0.001 ) ) {
+                return false;
+            }
+            if ( !isEqual( n1_6.getBranchData().getConfidence( 0 ).getStandardDeviation(), 0.11 ) ) {
+                return false;
+            }
+            if ( !isEqual( n1_6.getBranchData().getConfidence( 0 ).getValue(), 0.95 ) ) {
+                return false;
+            }
+            if ( !n1_6.getBranchData().getConfidence( 0 ).getType().equals( "posterior probability" ) ) {
+                return false;
+            }
+        }
+        catch ( final Exception e ) {
+            e.printStackTrace( System.out );
+            return false;
+        }
+        return true;
+    }
+    
     private static boolean testNHXParsing() {
         try {
             final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance();
@@ -9290,6 +10028,11 @@ public final class Test {
             if ( !p11.toNewHampshireX().equals( "(('A: \"':0.2,B:0.3):0.5[&&NHX:B=91],C:0.1)root:0.1[&&NHX:B=100]" ) ) {
                 return false;
             }
+            final Phylogeny p12 = factory.create( "((A:0.2,B:0.3):0.5[&&NHX:B=91],C:0.1)root:0.1[&&NHX:B=100]",
+                                                  new NHXParser() )[ 0 ];
+            if ( !p12.toNewHampshireX().equals( "((A:0.2,B:0.3):0.5[&&NHX:B=91],C:0.1)root:0.1[&&NHX:B=100]" ) ) {
+                return false;
+            }
         }
         catch ( final Exception e ) {
             e.printStackTrace( System.out );
@@ -9328,15 +10071,15 @@ public final class Test {
             }
             final Phylogeny p2 = factory
                     .create( "(1[something_else(?)s,prob=0.9500000000000000e+00{}(((,p)rob_stddev=0.110000000000e+00,"
-                                     + "prob_range={1.000000000000000e+00,1.000000000000000e+00},prob(percent)=\"100\","
-                                     + "prob+-sd=\"100+-0\"]:4.129000000000000e-02[&length_mean=4.153987461671767e-02,"
-                                     + "length_median=4.129000000000000e-02,length_95%HPD={3.217800000000000e-02,"
-                                     + "5.026800000000000e-02}],2[&prob=0.810000000000000e+00,prob_stddev=0.000000000000000e+00,"
-                                     + "prob_range={1.000000000000000e+00,1.000000000000000e+00},prob(percent)=\"100\","
-                                     + "prob+-sd=\"100+-0\"]:6.375699999999999e-02[&length_mean=6.395210411945065e-02,"
-                                     + "length_median=6.375699999999999e-02,length_95%HPD={5.388600000000000e-02,"
-                                     + "7.369400000000000e-02}])",
-                             new NHXParser() )[ 0 ];
+                            + "prob_range={1.000000000000000e+00,1.000000000000000e+00},prob(percent)=\"100\","
+                            + "prob+-sd=\"100+-0\"]:4.129000000000000e-02[&length_mean=4.153987461671767e-02,"
+                            + "length_median=4.129000000000000e-02,length_95%HPD={3.217800000000000e-02,"
+                            + "5.026800000000000e-02}],2[&prob=0.810000000000000e+00,prob_stddev=0.000000000000000e+00,"
+                            + "prob_range={1.000000000000000e+00,1.000000000000000e+00},prob(percent)=\"100\","
+                            + "prob+-sd=\"100+-0\"]:6.375699999999999e-02[&length_mean=6.395210411945065e-02,"
+                            + "length_median=6.375699999999999e-02,length_95%HPD={5.388600000000000e-02,"
+                            + "7.369400000000000e-02}])",
+                            new NHXParser() )[ 0 ];
             if ( p2.getNode( "1" ) == null ) {
                 return false;
             }
@@ -9538,7 +10281,7 @@ public final class Test {
                     xml_parser.setValidateAgainstSchema( PHYLOXML_REMOTE_XSD );
                 }
             }
-            final Phylogeny[] phylogenies_0 = factory.create( Test.PATH_TO_TEST_DATA + "phyloxml_distribution.xml",
+            final Phylogeny[] phylogenies_0 = factory.create( new File( Test.PATH_TO_TEST_DATA + "phyloxml_distribution.xml" ),
                                                               xml_parser );
             if ( xml_parser.getErrorCount() > 0 ) {
                 System.out.println( xml_parser.getErrorMessages().toString() );
@@ -10467,13 +11210,13 @@ public final class Test {
             // J. of Comput Bio. Vol. 4, No 2, pp.177-187
             final Phylogeny species6 = factory
                     .create( "(((1:[&&NHX:S=1],5:[&&NHX:S=5])1-5,((4:[&&NHX:S=4],6:[&&NHX:S=6])4-6,2:[&&NHX:S=2])4-6-2)1-5-4-6-2,"
-                                     + "((9:[&&NHX:S=9],3:[&&NHX:S=3])9-3,(8:[&&NHX:S=8],7:[&&NHX:S=7])8-7)9-3-8-7)",
-                             new NHXParser() )[ 0 ];
+                            + "((9:[&&NHX:S=9],3:[&&NHX:S=3])9-3,(8:[&&NHX:S=8],7:[&&NHX:S=7])8-7)9-3-8-7)",
+                            new NHXParser() )[ 0 ];
             final Phylogeny gene6 = factory
                     .create( "(((1:0.1[&&NHX:S=1],2:0.1[&&NHX:S=2])1-2:0.1,3:0.1[&&NHX:S=3])1-2-3:0.1,"
-                                     + "((4:0.1[&&NHX:S=4],(5:0.1[&&NHX:S=5],6:0.1[&&NHX:S=6])5-6:0.1)4-5-6:0.1,"
-                                     + "(7:0.1[&&NHX:S=7],(8:0.1[&&NHX:S=8],9:0.1[&&NHX:S=9])8-9:0.1)7-8-9:0.1)4-5-6-7-8-9:0.1)r;",
-                             new NHXParser() )[ 0 ];
+                            + "((4:0.1[&&NHX:S=4],(5:0.1[&&NHX:S=5],6:0.1[&&NHX:S=6])5-6:0.1)4-5-6:0.1,"
+                            + "(7:0.1[&&NHX:S=7],(8:0.1[&&NHX:S=8],9:0.1[&&NHX:S=9])8-9:0.1)7-8-9:0.1)4-5-6-7-8-9:0.1)r;",
+                            new NHXParser() )[ 0 ];
             species6.setRooted( true );
             gene6.setRooted( true );
             final SDI sdi6 = new SDI( gene6, species6 );
@@ -10807,15 +11550,15 @@ public final class Test {
             }
             final Phylogeny species6 = factory
                     .create( "(((1:[&&NHX:S=1],5:[&&NHX:S=5])1-5,((4:[&&NHX:S=4],6:[&&NHX:S=6])4-6,2:[&&NHX:S=2])4-6-2)1-5-4-6-2,"
-                                     + "((9:[&&NHX:S=9],3:[&&NHX:S=3])9-3,(8:[&&NHX:S=8],7:[&&NHX:S=7])8-7)9-3-8-7)",
-                             new NHXParser() )[ 0 ];
+                            + "((9:[&&NHX:S=9],3:[&&NHX:S=3])9-3,(8:[&&NHX:S=8],7:[&&NHX:S=7])8-7)9-3-8-7)",
+                            new NHXParser() )[ 0 ];
             final Phylogeny gene6 = factory
                     .create( "((5:0.1[&&NHX:S=5],6:0.1[&&NHX:S=6])5-6:0.05[&&NHX:S=6],(4:0.1[&&NHX:S=4],"
-                                     + "(((1:0.1[&&NHX:S=1],2:0.1[&&NHX:S=2])1-2:0.1[&&NHX:S=2],3:0.25[&&NHX:S=3])1-2-3:0.2[&&NHX:S=2],"
-                                     + "(7:0.1[&&NHX:S=7],(8:0.1[&&NHX:S=8],"
-                                     + "9:0.1[&&NHX:S=9])8-9:0.1[&&NHX:S=9])7-8-9:0.1[&&NHX:S=8])"
-                                     + "4-5-6-7-8-9:0.1[&&NHX:S=5])4-5-6:0.05[&&NHX:S=5])",
-                             new NHXParser() )[ 0 ];
+                            + "(((1:0.1[&&NHX:S=1],2:0.1[&&NHX:S=2])1-2:0.1[&&NHX:S=2],3:0.25[&&NHX:S=3])1-2-3:0.2[&&NHX:S=2],"
+                            + "(7:0.1[&&NHX:S=7],(8:0.1[&&NHX:S=8],"
+                            + "9:0.1[&&NHX:S=9])8-9:0.1[&&NHX:S=9])7-8-9:0.1[&&NHX:S=8])"
+                            + "4-5-6-7-8-9:0.1[&&NHX:S=5])4-5-6:0.05[&&NHX:S=5])",
+                            new NHXParser() )[ 0 ];
             species6.setRooted( true );
             gene6.setRooted( true );
             Phylogeny[] p6 = sdi_unrooted.infer( gene6, species6, false, true, true, true, 10 );
@@ -10861,15 +11604,15 @@ public final class Test {
             p6 = null;
             final Phylogeny species7 = factory
                     .create( "(((1:[&&NHX:S=1],5:[&&NHX:S=5])1-5,((4:[&&NHX:S=4],6:[&&NHX:S=6])4-6,2:[&&NHX:S=2])4-6-2)1-5-4-6-2,"
-                                     + "((9:[&&NHX:S=9],3:[&&NHX:S=3])9-3,(8:[&&NHX:S=8],7:[&&NHX:S=7])8-7)9-3-8-7)",
-                             new NHXParser() )[ 0 ];
+                            + "((9:[&&NHX:S=9],3:[&&NHX:S=3])9-3,(8:[&&NHX:S=8],7:[&&NHX:S=7])8-7)9-3-8-7)",
+                            new NHXParser() )[ 0 ];
             final Phylogeny gene7 = factory
                     .create( "((5:0.1[&&NHX:S=5],6:0.1[&&NHX:S=6])5-6:0.05[&&NHX:S=6],(4:0.1[&&NHX:S=4],"
-                                     + "(((1:0.1[&&NHX:S=1],2:0.1[&&NHX:S=2])1-2:0.1[&&NHX:S=2],3:0.25[&&NHX:S=3])1-2-3:0.2[&&NHX:S=2],"
-                                     + "(7:0.1[&&NHX:S=7],(8:0.1[&&NHX:S=8],"
-                                     + "9:0.1[&&NHX:S=9])8-9:0.1[&&NHX:S=9])7-8-9:0.1[&&NHX:S=8])"
-                                     + "4-5-6-7-8-9:0.1[&&NHX:S=5])4-5-6:0.05[&&NHX:S=5])",
-                             new NHXParser() )[ 0 ];
+                            + "(((1:0.1[&&NHX:S=1],2:0.1[&&NHX:S=2])1-2:0.1[&&NHX:S=2],3:0.25[&&NHX:S=3])1-2-3:0.2[&&NHX:S=2],"
+                            + "(7:0.1[&&NHX:S=7],(8:0.1[&&NHX:S=8],"
+                            + "9:0.1[&&NHX:S=9])8-9:0.1[&&NHX:S=9])7-8-9:0.1[&&NHX:S=8])"
+                            + "4-5-6-7-8-9:0.1[&&NHX:S=5])4-5-6:0.05[&&NHX:S=5])",
+                            new NHXParser() )[ 0 ];
             species7.setRooted( true );
             gene7.setRooted( true );
             Phylogeny[] p7 = sdi_unrooted.infer( gene7, species7, true, true, true, true, 10 );
@@ -10915,15 +11658,15 @@ public final class Test {
             p7 = null;
             final Phylogeny species8 = factory
                     .create( "(((1:[&&NHX:S=1],5:[&&NHX:S=5])1-5,((4:[&&NHX:S=4],6:[&&NHX:S=6])4-6,2:[&&NHX:S=2])4-6-2)1-5-4-6-2,"
-                                     + "((9:[&&NHX:S=9],3:[&&NHX:S=3])9-3,(8:[&&NHX:S=8],7:[&&NHX:S=7])8-7)9-3-8-7)",
-                             new NHXParser() )[ 0 ];
+                            + "((9:[&&NHX:S=9],3:[&&NHX:S=3])9-3,(8:[&&NHX:S=8],7:[&&NHX:S=7])8-7)9-3-8-7)",
+                            new NHXParser() )[ 0 ];
             final Phylogeny gene8 = factory
                     .create( "((5:0.1[&&NHX:S=5],6:0.1[&&NHX:S=6])5-6:0.05[&&NHX:S=6],(4:0.1[&&NHX:S=4],"
-                                     + "(((1:0.1[&&NHX:S=1],2:0.1[&&NHX:S=2])1-2:0.1[&&NHX:S=2],3:0.25[&&NHX:S=3])1-2-3:0.2[&&NHX:S=2],"
-                                     + "(7:0.1[&&NHX:S=7],(8:0.1[&&NHX:S=8],"
-                                     + "9:0.1[&&NHX:S=9])8-9:0.1[&&NHX:S=9])7-8-9:0.1[&&NHX:S=8])"
-                                     + "4-5-6-7-8-9:0.1[&&NHX:S=5])4-5-6:0.05[&&NHX:S=5])",
-                             new NHXParser() )[ 0 ];
+                            + "(((1:0.1[&&NHX:S=1],2:0.1[&&NHX:S=2])1-2:0.1[&&NHX:S=2],3:0.25[&&NHX:S=3])1-2-3:0.2[&&NHX:S=2],"
+                            + "(7:0.1[&&NHX:S=7],(8:0.1[&&NHX:S=8],"
+                            + "9:0.1[&&NHX:S=9])8-9:0.1[&&NHX:S=9])7-8-9:0.1[&&NHX:S=8])"
+                            + "4-5-6-7-8-9:0.1[&&NHX:S=5])4-5-6:0.05[&&NHX:S=5])",
+                            new NHXParser() )[ 0 ];
             species8.setRooted( true );
             gene8.setRooted( true );
             Phylogeny[] p8 = sdi_unrooted.infer( gene8, species8, false, false, true, true, 10 );
@@ -11118,8 +11861,7 @@ public final class Test {
             }
             final PhylogenyNode n2 = new PhylogenyNode( "NM_001030253" );
             SequenceDbWsTools.obtainSeqInformation( n2 );
-            if ( !n2.getNodeData().getSequence().getName()
-                    .equals( "Danio rerio B-cell leukemia/lymphoma 2 (bcl2), mRNA" ) ) {
+            if ( !n2.getNodeData().getSequence().getName().equals( "Danio rerio B-cell CLL/lymphoma 2a (bcl2a), mRNA" ) ) {
                 return false;
             }
             if ( !n2.getNodeData().getTaxonomy().getScientificName().equals( "Danio rerio" ) ) {
@@ -11171,7 +11913,6 @@ public final class Test {
                 }
                 return false;
             }
-            //
             id = SequenceAccessionTools.parseAccessorFromString( "segmented worms|gb_ADF31344" );
             if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
                     || !id.getValue().equals( "ADF31344" ) || !id.getSource().equals( "ncbi" ) ) {
@@ -11181,7 +11922,6 @@ public final class Test {
                 }
                 return false;
             }
-            //
             id = SequenceAccessionTools.parseAccessorFromString( "segmented worms gb_ADF31344 and more" );
             if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
                     || !id.getValue().equals( "ADF31344" ) || !id.getSource().equals( "ncbi" ) ) {
@@ -11191,7 +11931,6 @@ public final class Test {
                 }
                 return false;
             }
-            // 
             id = SequenceAccessionTools.parseAccessorFromString( "gb_AAA96518_1" );
             if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
                     || !id.getValue().equals( "AAA96518" ) || !id.getSource().equals( "ncbi" ) ) {
@@ -11201,7 +11940,6 @@ public final class Test {
                 }
                 return false;
             }
-            // 
             id = SequenceAccessionTools.parseAccessorFromString( "gb_EHB07727_1_rodents_" );
             if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
                     || !id.getValue().equals( "EHB07727" ) || !id.getSource().equals( "ncbi" ) ) {
@@ -11211,7 +11949,6 @@ public final class Test {
                 }
                 return false;
             }
-            // 
             id = SequenceAccessionTools.parseAccessorFromString( "dbj_BAF37827_1_turtles_" );
             if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
                     || !id.getValue().equals( "BAF37827" ) || !id.getSource().equals( "ncbi" ) ) {
@@ -11221,7 +11958,6 @@ public final class Test {
                 }
                 return false;
             }
-            // 
             id = SequenceAccessionTools.parseAccessorFromString( "emb_CAA73223_1_primates_" );
             if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
                     || !id.getValue().equals( "CAA73223" ) || !id.getSource().equals( "ncbi" ) ) {
@@ -11231,7 +11967,6 @@ public final class Test {
                 }
                 return false;
             }
-            // 
             id = SequenceAccessionTools.parseAccessorFromString( "mites|ref_XP_002434188_1" );
             if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
                     || !id.getValue().equals( "XP_002434188" ) || !id.getSource().equals( "refseq" ) ) {
@@ -11241,7 +11976,6 @@ public final class Test {
                 }
                 return false;
             }
-            // 
             id = SequenceAccessionTools.parseAccessorFromString( "mites_ref_XP_002434188_1_bla_XP_12345" );
             if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
                     || !id.getValue().equals( "XP_002434188" ) || !id.getSource().equals( "refseq" ) ) {
@@ -11251,7 +11985,6 @@ public final class Test {
                 }
                 return false;
             }
-            // 
             id = SequenceAccessionTools.parseAccessorFromString( "P4A123" );
             if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
                     || !id.getValue().equals( "P4A123" ) || !id.getSource().equals( "uniprot" ) ) {
@@ -11267,6 +12000,39 @@ public final class Test {
                 System.out.println( "provider=" + id.getSource() );
                 return false;
             }
+            id = SequenceAccessionTools.parseAccessorFromString( "N3B004Z009" );
+            if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
+                    || !id.getValue().equals( "N3B004Z009" ) || !id.getSource().equals( "uniprot" ) ) {
+                if ( id != null ) {
+                    System.out.println( "value   =" + id.getValue() );
+                    System.out.println( "provider=" + id.getSource() );
+                }
+                return false;
+            }
+            id = SequenceAccessionTools.parseAccessorFromString( "A4CAA4ZBB9" );
+            if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
+                    || !id.getValue().equals( "A4CAA4ZBB9" ) || !id.getSource().equals( "uniprot" ) ) {
+                if ( id != null ) {
+                    System.out.println( "value   =" + id.getValue() );
+                    System.out.println( "provider=" + id.getSource() );
+                }
+                return false;
+            }
+            id = SequenceAccessionTools.parseAccessorFromString( "ecoli_A4CAA4ZBB9_rt" );
+            if ( ( id == null ) || ForesterUtil.isEmpty( id.getValue() ) || ForesterUtil.isEmpty( id.getSource() )
+                    || !id.getValue().equals( "A4CAA4ZBB9" ) || !id.getSource().equals( "uniprot" ) ) {
+                if ( id != null ) {
+                    System.out.println( "value   =" + id.getValue() );
+                    System.out.println( "provider=" + id.getSource() );
+                }
+                return false;
+            }
+            id = SequenceAccessionTools.parseAccessorFromString( "Q4CAA4ZBB9" );
+            if ( id != null ) {
+                System.out.println( "value   =" + id.getValue() );
+                System.out.println( "provider=" + id.getSource() );
+                return false;
+            }
         }
         catch ( final Exception e ) {
             e.printStackTrace( System.out );
@@ -11438,14 +12204,12 @@ public final class Test {
             if ( !s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) );
             if ( !s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) );
@@ -11455,7 +12219,6 @@ public final class Test {
             if ( !s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) );
@@ -11463,7 +12226,6 @@ public final class Test {
             if ( !s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) );
@@ -11472,14 +12234,12 @@ public final class Test {
             if ( !s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) );
@@ -11488,7 +12248,6 @@ public final class Test {
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) );
@@ -11498,7 +12257,6 @@ public final class Test {
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) );
@@ -11506,49 +12264,42 @@ public final class Test {
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) );
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) );
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "C" ) );
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) );
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) );
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "G" ) );
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "F" ) );
@@ -11556,7 +12307,6 @@ public final class Test {
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "A" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "B" ) );
@@ -11564,7 +12314,6 @@ public final class Test {
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) );
@@ -11572,7 +12321,6 @@ public final class Test {
             if ( s0.match( query_nodes ) ) {
                 return false;
             }
-            //
             query_nodes = new HashSet<PhylogenyNode>();
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "E" ) );
             query_nodes.add( PhylogenyNode.createInstanceFromNhxString( "D" ) );
@@ -12061,24 +12809,24 @@ public final class Test {
             final PhylogenyFactory factory = ParserBasedPhylogenyFactory.getInstance();
             final Phylogeny t0_1 = factory.create( "(((A,B),C),(D,E))", new NHXParser() )[ 0 ];
             final Phylogeny[] phylogenies_1 = factory.create( "(((A,B),C),(D,E)) " + "(((C,B),A),(D,E))"
-                                                                      + "(((A,B),C),(D,E)) " + "(((A,B),C),(D,E))"
-                                                                      + "(((A,B),C),(D,E))" + "(((C,B),A),(D,E))"
-                                                                      + "(((E,B),D),(C,A))" + "(((C,B),A),(D,E))"
-                                                                      + "(((A,B),C),(D,E))" + "(((A,B),C),(D,E))",
-                                                              new NHXParser() );
+                    + "(((A,B),C),(D,E)) " + "(((A,B),C),(D,E))"
+                    + "(((A,B),C),(D,E))" + "(((C,B),A),(D,E))"
+                    + "(((E,B),D),(C,A))" + "(((C,B),A),(D,E))"
+                    + "(((A,B),C),(D,E))" + "(((A,B),C),(D,E))",
+                    new NHXParser() );
             SupportCount.count( t0_1, phylogenies_1, true, false );
             final Phylogeny t0_2 = factory.create( "(((((A,B),C),D),E),(F,G))", new NHXParser() )[ 0 ];
             final Phylogeny[] phylogenies_2 = factory.create( "(((((A,B),C),D),E),(F,G))"
-                                                                      + "(((((A,B),C),D),E),((F,G),X))"
-                                                                      + "(((((A,Y),B),C),D),((F,G),E))"
-                                                                      + "(((((A,B),C),D),E),(F,G))"
-                                                                      + "(((((A,B),C),D),E),(F,G))"
-                                                                      + "(((((A,B),C),D),E),(F,G))"
-                                                                      + "(((((A,B),C),D),E),(F,G),Z)"
-                                                                      + "(((((A,B),C),D),E),(F,G))"
-                                                                      + "((((((A,B),C),D),E),F),G)"
-                                                                      + "(((((X,Y),F,G),E),((A,B),C)),D)",
-                                                              new NHXParser() );
+                    + "(((((A,B),C),D),E),((F,G),X))"
+                    + "(((((A,Y),B),C),D),((F,G),E))"
+                    + "(((((A,B),C),D),E),(F,G))"
+                    + "(((((A,B),C),D),E),(F,G))"
+                    + "(((((A,B),C),D),E),(F,G))"
+                    + "(((((A,B),C),D),E),(F,G),Z)"
+                    + "(((((A,B),C),D),E),(F,G))"
+                    + "((((((A,B),C),D),E),F),G)"
+                    + "(((((X,Y),F,G),E),((A,B),C)),D)",
+                    new NHXParser() );
             SupportCount.count( t0_2, phylogenies_2, true, false );
             final PhylogenyNodeIterator it = t0_2.iteratorPostorder();
             while ( it.hasNext() ) {
@@ -12357,7 +13105,6 @@ public final class Test {
                 System.out.println( n17.toString() );
                 return false;
             }
-            //
             final PhylogenyNode n18 = PhylogenyNode
                     .createInstanceFromNhxString( "Mus_musculus_musculus_392", NHXParser.TAXONOMY_EXTRACTION.AGGRESSIVE );
             if ( !n18.getNodeData().getTaxonomy().getScientificName().equals( "Mus musculus musculus" ) ) {
@@ -12384,13 +13131,6 @@ public final class Test {
                 System.out.println( n21.toString() );
                 return false;
             }
-            final PhylogenyNode n22 = PhylogenyNode
-                    .createInstanceFromNhxString( "NEMVE_Nematostella_vectensis",
-                                                  NHXParser.TAXONOMY_EXTRACTION.AGGRESSIVE );
-            if ( !n22.getNodeData().getTaxonomy().getTaxonomyCode().equals( "NEMVE" ) ) {
-                System.out.println( n22.toString() );
-                return false;
-            }
             final PhylogenyNode n23 = PhylogenyNode
                     .createInstanceFromNhxString( "9EMVE_Nematostella_vectensis",
                                                   NHXParser.TAXONOMY_EXTRACTION.AGGRESSIVE );
@@ -12498,7 +13238,7 @@ public final class Test {
 
     private static boolean testUniprotEntryRetrieval() {
         try {
-            final SequenceDatabaseEntry entry = SequenceDbWsTools.obtainUniProtEntry( "P12345", 200 );
+            final SequenceDatabaseEntry entry = SequenceDbWsTools.obtainUniProtEntry( "P12345", 5000 );
             if ( !entry.getAccession().equals( "P12345" ) ) {
                 return false;
             }
@@ -12517,6 +13257,18 @@ public final class Test {
             if ( !entry.getTaxonomyIdentifier().equals( "9986" ) ) {
                 return false;
             }
+            if ( entry.getMolecularSequence() == null ) {
+                return false;
+            }
+            if ( !entry
+                    .getMolecularSequence()
+                    .getMolecularSequenceAsString()
+                    .startsWith( "MALLHSARVLSGVASAFHPGLAAAASARASSWWAHVEMGPPDPILGVTEAYKRDTNSKKMNLGVGAYRDDNGKPYVLPSVRKAEAQIAAKGLDKEYLPIGGLAEFCRASAELALGENSEV" )
+                    || !entry.getMolecularSequence().getMolecularSequenceAsString().endsWith( "LAHAIHQVTK" ) ) {
+                System.out.println( "got: " + entry.getMolecularSequence().getMolecularSequenceAsString() );
+                System.out.println( "expected something else." );
+                return false;
+            }
         }
         catch ( final IOException e ) {
             System.out.println();
@@ -12524,6 +13276,10 @@ public final class Test {
             e.printStackTrace( System.out );
             return true;
         }
+        catch ( final NullPointerException f ) {
+            f.printStackTrace( System.out );
+            return false;
+        }
         catch ( final Exception e ) {
             return false;
         }
@@ -12713,60 +13469,6 @@ public final class Test {
         }
         return true;
     }
-
-    private static boolean testWabiTxSearch() {
-        try {
-            String result = "";
-            result = TxSearch.searchSimple( "nematostella" );
-            result = TxSearch.getTxId( "nematostella" );
-            if ( !result.equals( "45350" ) ) {
-                return false;
-            }
-            result = TxSearch.getTxName( "45350" );
-            if ( !result.equals( "Nematostella" ) ) {
-                return false;
-            }
-            result = TxSearch.getTxId( "nematostella vectensis" );
-            if ( !result.equals( "45351" ) ) {
-                return false;
-            }
-            result = TxSearch.getTxName( "45351" );
-            if ( !result.equals( "Nematostella vectensis" ) ) {
-                return false;
-            }
-            result = TxSearch.getTxId( "Bacillus subtilis subsp. subtilis str. N170" );
-            if ( !result.equals( "536089" ) ) {
-                return false;
-            }
-            result = TxSearch.getTxName( "536089" );
-            if ( !result.equals( "Bacillus subtilis subsp. subtilis str. N170" ) ) {
-                return false;
-            }
-            final List<String> queries = new ArrayList<String>();
-            queries.add( "Campylobacter coli" );
-            queries.add( "Escherichia coli" );
-            queries.add( "Arabidopsis" );
-            queries.add( "Trichoplax" );
-            queries.add( "Samanea saman" );
-            queries.add( "Kluyveromyces marxianus" );
-            queries.add( "Bacillus subtilis subsp. subtilis str. N170" );
-            queries.add( "Bornavirus parrot/PDD/2008" );
-            final List<RANKS> ranks = new ArrayList<RANKS>();
-            ranks.add( RANKS.SUPERKINGDOM );
-            ranks.add( RANKS.KINGDOM );
-            ranks.add( RANKS.FAMILY );
-            ranks.add( RANKS.GENUS );
-            ranks.add( RANKS.TRIBE );
-            result = TxSearch.searchLineage( queries, ranks );
-            result = TxSearch.searchParam( "Homo sapiens", TAX_NAME_CLASS.ALL, TAX_RANK.SPECIES, 10, true );
-            result = TxSearch.searchParam( "Samanea saman", TAX_NAME_CLASS.SCIENTIFIC_NAME, TAX_RANK.ALL, 10, true );
-        }
-        catch ( final Exception e ) {
-            System.out.println();
-            System.out.println( "the following might be due to absence internet connection:" );
-            e.printStackTrace( System.out );
-            return false;
-        }
-        return true;
-    }
+    
+    
 }