Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
75f6f745
Commit
75f6f745
authored
17 years ago
by
Patrick Meidl
Browse files
Options
Downloads
Patches
Plain Diff
logging improvements
parent
bfdb73b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/Bio/EnsEMBL/IdMapping/StableIdMapper.pm
+11
-5
11 additions, 5 deletions
modules/Bio/EnsEMBL/IdMapping/StableIdMapper.pm
modules/Bio/EnsEMBL/IdMapping/TranscriptScoreBuilder.pm
+7
-11
7 additions, 11 deletions
modules/Bio/EnsEMBL/IdMapping/TranscriptScoreBuilder.pm
with
18 additions
and
16 deletions
modules/Bio/EnsEMBL/IdMapping/StableIdMapper.pm
+
11
−
5
View file @
75f6f745
...
...
@@ -152,10 +152,15 @@ sub map_stable_ids {
# generate a new mapping_session and write all mapping_session data to a file
$self
->
generate_mapping_session
;
$self
->
logger
->
info
("
== Stable ID mapping for
$type
...
\n\n
",
0
,
'
stamped
');
# check if there are any objects of this type at all
my
%all_sources
=
%
{
$self
->
cache
->
get_by_name
("
${type}
s_by_id
",
'
source
')
};
my
%all_targets
=
%
{
$self
->
cache
->
get_by_name
("
${type}
s_by_id
",
'
target
')
};
return
unless
(
scalar
(
keys
%all_sources
));
unless
(
scalar
(
keys
%all_sources
))
{
$self
->
logger
->
info
("
No cached
${type}
s found.
\n\n
");
return
;
}
my
%stats
=
map
{
$_
=>
0
}
qw(mapped_known mapped_novel new lost_known lost_novel)
;
...
...
@@ -313,6 +318,7 @@ sub map_stable_ids {
# also generate and write stats to file
$self
->
generate_mapping_stats
(
$type
,
\
%stats
);
$self
->
logger
->
info
("
Done.
\n\n
");
}
...
...
@@ -624,15 +630,15 @@ sub write_stable_ids_to_file {
# check for missing created and modified dates
my
$created_date
=
$obj
->
created_date
;
unless
(
$created_date
)
{
$self
->
logger
->
debug
("
Missing created_date for target
"
.
$obj
->
to_string
.
"
\n
",
1
);
#
$self->logger->debug("Missing created_date for target ".
#
$obj->to_string."\n", 1);
$created_date
=
$self
->
mapping_session_date
;
}
my
$modified_date
=
$obj
->
modified_date
;
unless
(
$modified_date
)
{
$self
->
logger
->
debug
("
Missing modified_date for target
"
.
$obj
->
to_string
.
"
\n
",
1
);
#
$self->logger->debug("Missing modified_date for target ".
#
$obj->to_string."\n", 1);
$modified_date
=
$self
->
mapping_session_date
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/IdMapping/TranscriptScoreBuilder.pm
+
7
−
11
View file @
75f6f745
...
...
@@ -52,7 +52,7 @@ sub score_transcripts {
throw
('
Need a Bio::EnsEMBL::IdMapping::ScoredMappingMatrix.
');
}
$self
->
logger
->
info
("
Start
ing transcript
scoring
...
\n\n
",
0
,
'
stamped
');
$self
->
logger
->
info
("
-- Scor
ing transcript
s
...
\n\n
",
0
,
'
stamped
');
# build scores based on exon scores
my
$matrix
=
$self
->
scores_from_exon_scores
(
$exon_matrix
);
...
...
@@ -65,15 +65,9 @@ sub score_transcripts {
$self
->
logger
->
info
(
sprintf
(
$fmt
,
"
Total source transcripts:
",
$self
->
cache
->
get_count_by_name
('
transcripts_by_id
',
'
source
')),
1
);
$self
->
logger
->
info
(
sprintf
(
$fmt
,
"
Scored source transcripts:
",
$matrix
->
get_source_count
),
1
);
$self
->
logger
->
info
(
sprintf
(
$fmt
,
"
Total target transcripts:
",
$self
->
cache
->
get_count_by_name
('
transcripts_by_id
',
'
target
')),
1
);
$self
->
logger
->
info
(
sprintf
(
$fmt
,
"
Scored target transcripts:
",
$matrix
->
get_target_count
),
1
);
$self
->
log_matrix_stats
(
$matrix
);
$self
->
logger
->
info
("
\n
Done with transcript scoring.
\n\n
");
...
...
@@ -162,6 +156,7 @@ sub flag_matrix_from_exon_scores {
my
$i
;
my
$num_transcripts
=
scalar
(
keys
%
{
$self
->
cache
->
get_by_name
('
transcripts_by_id
',
'
source
')
});
my
$progress_id
=
$self
->
logger
->
init_progress
(
$num_transcripts
,
100
);
$self
->
logger
->
info
("
Creating flag matrix...
\n
",
1
);
...
...
@@ -169,7 +164,7 @@ sub flag_matrix_from_exon_scores {
foreach
my
$source_transcript
(
values
%
{
$self
->
cache
->
get_by_name
('
transcripts_by_id
',
'
source
')
})
{
# log progress
$self
->
logger
->
log_progress
(
$
num_transcripts
,
++
$i
,
20
,
1
,
0
);
$self
->
logger
->
log_progress
(
$
progress_id
,
++
$i
,
1
);
# get all exons for the source transcript
foreach
my
$source_exon
(
@
{
$source_transcript
->
get_all_Exons
})
{
...
...
@@ -222,6 +217,7 @@ sub score_matrix_from_flag_matrix {
my
$i
;
my
$num_transcripts
=
scalar
(
keys
%
{
$self
->
cache
->
get_by_name
('
transcripts_by_id
',
'
source
')
});
my
$progress_id
=
$self
->
logger
->
init_progress
(
$num_transcripts
,
100
);
$self
->
logger
->
info
("
Creating score matrix from flag matrix...
\n
",
1
);
...
...
@@ -229,7 +225,7 @@ sub score_matrix_from_flag_matrix {
foreach
my
$source_transcript
(
values
%
{
$self
->
cache
->
get_by_name
('
transcripts_by_id
',
'
source
')
})
{
# log progress
$self
->
logger
->
log_progress
(
$
num_transcripts
,
++
$i
,
20
,
1
,
0
);
$self
->
logger
->
log_progress
(
$
progress_id
,
++
$i
,
1
);
# We are only interested in scoring with exons that are in the target
# transcript. The scored mapping matrix may contain scores for exons that
...
...
@@ -262,8 +258,8 @@ sub score_matrix_from_flag_matrix {
next
unless
(
$target_exons
{
$target_exon_id
});
my
$score
=
$exon_matrix
->
get_score
(
$source_exon
->
id
,
$target_exon_id
);
my
$score
=
$exon_matrix
->
get_score
(
$source_exon
->
id
,
$target_exon_id
);
$max_source_score
=
$score
if
(
$score
>
$max_source_score
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment