+ final RIO rio;
+ boolean iterating = false;
+ final PhylogenyParser p = ParserUtils.createParserDependingOnFileType( gene_trees_file, true );
+ if ( p instanceof PhyloXmlParser ) {
+ rio = RIO.executeAnalysis( gene_trees_file,
+ species_tree_file,
+ algorithm,
+ rerooting,
+ outgroup,
+ gt_first,
+ gt_last,
+ logfile != null,
+ true,
+ transfer_taxonomy );
+ }
+ else {
+ iterating = true;
+ if ( p instanceof NHXParser ) {
+ final NHXParser nhx = ( NHXParser ) p;
+ nhx.setReplaceUnderscores( false );
+ nhx.setIgnoreQuotes( true );
+ nhx.setTaxonomyExtraction( TAXONOMY_EXTRACTION.AGGRESSIVE );
+ }
+ else if ( p instanceof NexusPhylogeniesParser ) {
+ final NexusPhylogeniesParser nex = ( NexusPhylogeniesParser ) p;
+ nex.setReplaceUnderscores( false );
+ nex.setIgnoreQuotes( true );
+ nex.setTaxonomyExtraction( TAXONOMY_EXTRACTION.AGGRESSIVE );
+ }
+ else {
+ throw new RuntimeException( "unknown parser type: " + p );
+ }
+ final IteratingPhylogenyParser ip = ( IteratingPhylogenyParser ) p;
+ ip.setSource( gene_trees_file );
+ rio = RIO.executeAnalysis( ip,
+ species_tree_file,
+ algorithm,
+ rerooting,
+ outgroup,
+ gt_first,
+ gt_last,
+ logfile != null,
+ true,
+ transfer_taxonomy );
+ }