Ignore:
Timestamp:
06/29/14 11:11:30 (10 years ago)
Author:
rkrimmel
Message:

Multiple Alignment first version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/pal/tree/FengDoolittleNode.java

    r1583 r1585  
    344344         * @param n2 number of second child 
    345345         */ 
    346         public void joinChildren( int n1, int n2) { 
     346        public Node joinChildren( int n1, int n2) { 
    347347 
    348348                if (n1 == n2) { 
     
    376376                //System.out.println("Merging " + child1.getIdentifier() + " with " + child2.getIdentifier()); 
    377377                 
    378                 if(newNode instanceof FengDoolittleNode) { 
    379                         newNode.setSequences(((FengDoolittleNode) newNode).alignSequences()); 
    380                 } 
    381                  
     378                return newNode; 
    382379        } 
    383380         
     
    397394 
    398395 
    399         private ArrayList<NumberSequence> alignSequences() { 
    400                 ArrayList<NumberSequence> alignment = new ArrayList<NumberSequence>(); 
    401                 if(this.getChildCount()<3) { 
    402                          
    403                         Node node1 = getChild(0); 
    404                         Node node2 = getChild(1); 
    405                          
    406                         int seqCount1 = node1.getSequences().size(); 
    407                         int seqCount2 = node2.getSequences().size(); 
    408                          
    409                         //Align 2 sequences 
    410                         if(seqCount1 == 1 && seqCount2 == 1) { 
    411                         } 
    412                         //Align a sequence to a group 
    413                         else if( seqCount1 > 1 && seqCount2 == 1) { 
    414                          
    415                         } 
    416                         //Align a sequence to a group 
    417                         else if(seqCount1 == 1 && seqCount2 > 1) { 
    418                                  
    419                         } 
    420                         //Align 2 groups 
    421                         else if((seqCount1 > 1) && (seqCount2 > 1)){ 
    422                                          
    423                         } 
    424                         else { 
    425                                 Console.traceln(Level.INFO,"No sequences to align while merging two nodes."); 
    426                         } 
    427                 } 
    428                 else { 
    429                         Console.traceln(Level.WARNING,"More than 2 children! This should never happen, it's a binary tree."); 
    430                 } 
    431                 return alignment; 
    432         } 
    433  
    434396        public void setSequences(ArrayList<NumberSequence> alignSequences) { 
    435397                this.sequences = alignSequences; 
    436398        } 
    437399         
     400         
     401         
    438402} 
Note: See TracChangeset for help on using the changeset viewer.