package jalview.ext.forester.io;
+import jalview.ext.archaeopteryx.AptxInit;
import jalview.ext.archaeopteryx.Tree;
import jalview.ext.treeviewer.TreeI;
import jalview.ext.treeviewer.TreeParserI;
public static ForesterParser createNexusParser(File file)
throws PhylogenyParserException, IOException
{
+ NexusPhylogeniesParser nxParser = new NexusPhylogeniesParser();
+ nxParser.setReplaceUnderscores(
+ AptxInit.APTX_CONFIG.isReplaceUnderscoresInNhParsing());
+ nxParser.setIgnoreQuotes(false);
return new ForesterParser(new NexusPhylogeniesParser(), file);
}
public static ForesterParser createPhyloXmlParser(File file)
throws PhylogenyParserException, IOException
{
- // support non-xsd validating?
+ if (AptxInit.APTX_CONFIG.isValidatePhyloXmlAgainstSchema())
+ {
return new ForesterParser(
- PhyloXmlParser.createPhyloXmlParserXsdValidating(), file);
+ PhyloXmlParser.createPhyloXmlParserXsdValidating(), file);
+ }
+ else
+ {
+ return new ForesterParser(PhyloXmlParser.createPhyloXmlParser(),
+ file);
+ }
}
// ParserBasedPhylogenyFactory.getInstance().create(foresterParser, source)