remove redundant a.c. witnesses from list
[scpubgit/stemmatology.git] / lib / Text / Tradition / Collation.pm
index 081a134..3a9b056 100644 (file)
@@ -455,6 +455,10 @@ sub reading_witnesses {
                my $wits = $self->sequence->get_edge_attributes( @$e );
                @all_witnesses{ keys %$wits } = 1;
        }
+       my $acstr = $self->ac_label;
+       foreach my $acwit ( grep { $_ =~ s/^(.*)\Q$acstr\E$/$1/ } keys %all_witnesses ) {
+               delete $all_witnesses{$acwit.$acstr} if exists $all_witnesses{$acwit};
+       }
        return keys %all_witnesses;
 }
 
@@ -961,7 +965,6 @@ keys have a true hash value will be included.
 sub alignment_table {
     my( $self ) = @_;
     my $include; # see if we can ditch this
-    ## DEBUG
     return $self->cached_table if $self->has_cached_table;
     
     # Make sure we can do this