Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
8436273f
Commit
8436273f
authored
May 24, 2010
by
Andreas Kusalananda Kähäri
Browse files
Punish stable IDs that change biotype harder.
parent
0baafddc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
modules/Bio/EnsEMBL/IdMapping/GeneScoreBuilder.pm
modules/Bio/EnsEMBL/IdMapping/GeneScoreBuilder.pm
+15
-12
No files found.
modules/Bio/EnsEMBL/IdMapping/GeneScoreBuilder.pm
View file @
8436273f
...
...
@@ -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.
2
5
)
);
$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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment