Commit 8436273f authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Punish stable IDs that change biotype harder.

parent 0baafddc
......@@ -391,34 +391,37 @@ sub simple_gene_rescore {
# entries are modified in place
#
sub biotype_gene_rescore {
my $self = shift;
my $self = shift;
my $matrix = shift;
unless ($matrix and
$matrix->isa('Bio::EnsEMBL::IdMapping::ScoredMappingMatrix')) {
unless ($matrix
and $matrix->isa('Bio::EnsEMBL::IdMapping::ScoredMappingMatrix') )
{
throw('Need a Bio::EnsEMBL::IdMapping::ScoredMappingMatrix.');
}
my $i = 0;
foreach my $entry (@{ $matrix->get_all_Entries }) {
foreach my $entry ( @{ $matrix->get_all_Entries } ) {
my $source_gene = $self->cache->get_by_key('genes_by_id', 'source',
$entry->source);
my $source_gene =
$self->cache->get_by_key( 'genes_by_id', 'source',
$entry->source );
my $target_gene = $self->cache->get_by_key('genes_by_id', 'target',
$entry->target);
my $target_gene =
$self->cache->get_by_key( 'genes_by_id', 'target',
$entry->target );
if ( $source_gene->biotype() ne $target_gene->biotype() ) {
#$self->logger->debug("biotype ".$entry->to_string."\n");
$matrix->set_score( $entry->source(), $entry->target(),
( $entry->score()*0.5 ) );
( $entry->score()*0.25 ) );
$i++;
}
}
$self->logger->debug("Scored genes with biotype mismatch: $i\n", 1);
}
$self->logger->debug( "Scored genes with biotype mismatch: $i\n", 1 );
} ## end sub biotype_gene_rescore
1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment