if( $classinfo ) {
@reversions = grep { $classinfo->{$_} eq 'revert' }
$rdghash->{'group'}->members;
+ $rdghash->{'reversions'} = \@reversions;
}
my @group = @{$rdghash->{'group'}};
my $sourceparents = _find_reading_parents( $rid, $graph, $contig, @roots );
# Work out relationships between readings and their non-followed parent.
_resolve_parent_relationships( $c, $rid, $rdg, $sourceparents );
- $rdghash->{'reading_parents'} = $sourceparents;
+ $rdghash->{'source_parents'} = $sourceparents;
if( @reversions ) {
my $revparents = _find_reading_parents( $rid, $graph, $contig, @reversions );
# treat it as genealogical for the parent.
_add_reading_relations( $rdghash->{'readingid'}, $loc->{'id'}, $rdg,
( $type eq 'reverted' ? 'genealogical' : $type ),
- $rdghash->{'reading_parents'}, \%datahash, \@unknown );
+ $rdghash->{'source_parents'}, \%datahash, \@unknown );
# Add relation stats for reading reversions if they exist.
if( $type eq 'reverted' ) {
# Get relationship between reverted readings and their non-matching
say sprintf( "=== Looking at rank %d (%s) ===", $row->{'id'},
$row->{'genealogical'} ? 'genealogical' : 'not genealogical' );
foreach my $rdg ( @{$row->{'readings'}} ) {
- my $parents = $rdg->{'reading_parents'};
+ my $parents = $rdg->{'source_parents'};
say sprintf( "Reading %s: %s", $rdg->{'readingid'},
$rdg->{'conflict'} ? '(conflicted)' : '' );
if( $parents && @$parents ) {
my %is_parent;
my @has_no_parent;
foreach my $rdg ( @{$row->{'readings'}} ) {
- my $parents = $rdg->{'reading_parents'} || {};
+ my $parents = $rdg->{'source_parents'} || {};
foreach my $p ( keys %$parents ) {
push( @{$is_parent{$p}}, $rdg->{'readingid'} );
}