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
71de25f7
Commit
71de25f7
authored
17 years ago
by
Glenn Proctor
Browse files
Options
Downloads
Patches
Plain Diff
Added statistics for number of names projected from each source.
parent
509fa4b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/xref_projection/project_display_xrefs.pl
+44
-15
44 additions, 15 deletions
misc-scripts/xref_projection/project_display_xrefs.pl
with
44 additions
and
15 deletions
misc-scripts/xref_projection/project_display_xrefs.pl
+
44
−
15
View file @
71de25f7
...
...
@@ -140,6 +140,7 @@ if ($compara) {
my
$from_ga
=
Bio::EnsEMBL::
Registry
->
get_adaptor
(
$from_species
,
'
core
',
'
Gene
');
my
%projections_by_evidence_type
;
my
%projections_by_source
;
foreach
my
$to_species
(
@to_multi
)
{
...
...
@@ -209,21 +210,7 @@ foreach my $to_species (@to_multi) {
print
"
\n
$to_species
, after projection:
\n
";
print_stats
(
$to_ga
);
# print statistics if required
if
(
$full_stats
)
{
print
"
Projected terms by evidence code:
\n
";
my
$total
;
foreach
my
$et
(
sort
keys
%projections_by_evidence_type
)
{
next
if
(
!
grep
(
/$et/
,
@evidence_codes
));
if
(
$et
)
{
print
$et
.
"
\t
"
.
$projections_by_evidence_type
{
$et
}
.
"
\n
";
$total
+=
$projections_by_evidence_type
{
$et
};
}
}
print
"
Total:
\t
$total
\n
";
}
print_full_stats
()
if
(
$full_stats
);
}
...
...
@@ -316,6 +303,9 @@ sub project_display_names {
# update the gene so that the display_xref_id is set
$to_ga
->
update
(
$to_gene
)
if
(
!
$print
);
# keep track of where each projection came from
$projections_by_source
{
$dbEntry
->
dbname
()}
++
;
}
}
...
...
@@ -450,6 +440,45 @@ sub print_stats {
}
# ----------------------------------------------------------------------
sub
print_full_stats
{
# GO terms
if
(
$go_terms
)
{
print
"
\n
Projected terms by evidence code:
\n
";
my
$total
;
foreach
my
$et
(
sort
keys
%projections_by_evidence_type
)
{
next
if
(
!
grep
(
/$et/
,
@evidence_codes
));
if
(
$et
)
{
print
$et
.
"
\t
"
.
$projections_by_evidence_type
{
$et
}
.
"
\n
";
$total
+=
$projections_by_evidence_type
{
$et
};
}
}
print
"
Total:
\t
$total
\n
";
}
# display names
if
(
$names
)
{
print
"
\n
Projected display names by source:
\n
";
my
$total
;
foreach
my
$source
(
sort
keys
%projections_by_source
)
{
print
$source
.
"
\t
"
.
$projections_by_source
{
$source
}
.
"
\n
";
$total
+=
$projections_by_source
{
$source
};
}
print
"
Total:
\t
$total
\n
";
}
}
# ----------------------------------------------------------------------
...
...
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