work on data buffer for aLeaves MAFFT suite + clean up
[jalview.git] / forester / java / src / org / forester / sdi / GSDI.java
index 2419d13..bfdd14f 100644 (file)
@@ -64,13 +64,13 @@ import org.forester.util.ForesterUtil;
  * 
  * @author Christian M. Zmasek
  */
-public final class GSDI extends SDI {
+public class GSDI extends SDI {
 
     private final boolean             _most_parsimonious_duplication_model;
     private final boolean             _strip_gene_tree;
     private final boolean             _strip_species_tree;
-    private int                       _speciation_or_duplication_events_sum;
-    private int                       _speciations_sum;
+    protected int                     _speciation_or_duplication_events_sum;
+    protected int                     _speciations_sum;
     private final List<PhylogenyNode> _stripped_gene_tree_nodes;
     private final List<PhylogenyNode> _stripped_species_tree_nodes;
     private final Set<PhylogenyNode>  _mapped_species_tree_nodes;
@@ -103,6 +103,25 @@ public final class GSDI extends SDI {
         this( gene_tree, species_tree, most_parsimonious_duplication_model, false, false );
     }
 
+    public GSDI( final Phylogeny gene_tree,
+                 final Phylogeny species_tree,
+                 final boolean most_parsimonious_duplication_model,
+                 final boolean strip_gene_tree,
+                 final boolean strip_species_tree,
+                 final int x ) throws SDIException {
+        super( gene_tree, species_tree );
+        _speciation_or_duplication_events_sum = 0;
+        _speciations_sum = 0;
+        _most_parsimonious_duplication_model = most_parsimonious_duplication_model;
+        _duplications_sum = 0;
+        _strip_gene_tree = strip_gene_tree;
+        _strip_species_tree = strip_species_tree;
+        _stripped_gene_tree_nodes = new ArrayList<PhylogenyNode>();
+        _stripped_species_tree_nodes = new ArrayList<PhylogenyNode>();
+        _mapped_species_tree_nodes = new HashSet<PhylogenyNode>();
+        _scientific_names_mapped_to_reduced_specificity = new TreeSet<String>();
+    }
+
     // s is the node on the species tree g maps to.
     private final void determineEvent( final PhylogenyNode s, final PhylogenyNode g ) {
         boolean oyako = false;