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
0041cff5
Commit
0041cff5
authored
18 years ago
by
Glenn Proctor
Browse files
Options
Downloads
Patches
Plain Diff
Added display of statistics by evidence type
parent
8e14ea7d
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
+22
-3
22 additions, 3 deletions
misc-scripts/xref_projection/project_display_xrefs.pl
with
22 additions
and
3 deletions
misc-scripts/xref_projection/project_display_xrefs.pl
+
22
−
3
View file @
0041cff5
...
...
@@ -11,7 +11,7 @@ use Bio::EnsEMBL::DBSQL::GeneAdaptor;
my
$method_link_type
=
"
TREE_HOMOLOGIES
";
my
(
$conf
,
$compara
,
$from_species
,
@to_multi
,
$print
,
$names
,
$go_terms
,
$delete_names
,
$delete_go_terms
,
$no_backup
);
my
(
$conf
,
$compara
,
$from_species
,
@to_multi
,
$print
,
$names
,
$go_terms
,
$delete_names
,
$delete_go_terms
,
$no_backup
,
$full_stats
);
GetOptions
('
conf=s
'
=>
\
$conf
,
'
compara=s
'
=>
\
$compara
,
...
...
@@ -24,9 +24,9 @@ GetOptions('conf=s' => \$conf,
'
delete_names
'
=>
\
$delete_names
,
'
delete_go_terms
'
=>
\
$delete_go_terms
,
'
nobackup
'
=>
\
$no_backup
,
'
full_stats
'
=>
\
$full_stats
,
'
help
'
=>
sub
{
usage
();
exit
(
0
);
});
@to_multi
=
split
(
/,/
,
join
('
,
',
@to_multi
));
if
(
!
$conf
||
!
$compara
||
!
$from_species
||
!
@to_multi
)
{
...
...
@@ -43,6 +43,8 @@ if (!$go_terms && !$names) {
}
@to_multi
=
split
(
/,/
,
join
('
,
',
@to_multi
));
# Take values from ENSEMBL_REGISTRY environment variable or from ~/.ensembl_init
# if no reg_conf file is given.
Bio::EnsEMBL::
Registry
->
no_version_check
(
1
);
...
...
@@ -54,6 +56,8 @@ my $ma = Bio::EnsEMBL::Registry->get_adaptor($compara, 'compara', 'Member');
my
$from_ga
=
Bio::EnsEMBL::
Registry
->
get_adaptor
(
$from_species
,
'
core
',
'
Gene
');
my
%projections_by_evidence_type
=
{};
foreach
my
$to_species
(
@to_multi
)
{
my
$to_ga
=
Bio::EnsEMBL::
Registry
->
get_adaptor
(
$to_species
,
'
core
',
'
Gene
');
...
...
@@ -97,6 +101,14 @@ foreach my $to_species (@to_multi) {
print
"
$to_species
, after projection:
\n
";
print_stats
(
$to_ga
);
# print statistics if required
if
(
$full_stats
)
{
foreach
my
$et
(
sort
keys
%projections_by_evidence_type
)
{
next
if
(
$et
eq
'
IEA
');
print
$et
.
"
\t
"
.
$projections_by_evidence_type
{
$et
}
.
"
\n
";
}
}
}
# ----------------------------------------------------------------------
...
...
@@ -108,7 +120,7 @@ sub project_homologies() {
foreach
my
$homology
(
@
{
$homologies
})
{
next
if
(
$homology
->
description
ne
"
ortholog_one2one
"
&&
$homology
->
description
ne
"
apparent_ortholog_one2one
");
next
if
(
$homology
->
description
()
ne
"
ortholog_one2one
"
&&
$homology
->
description
()
ne
"
apparent_ortholog_one2one
");
my
@mas
=
@
{
$homology
->
get_all_Member_Attribute
};
my
(
$from_member
,
$from_attribute
)
=
@
{
$mas
[
0
]};
...
...
@@ -253,6 +265,11 @@ sub project_go_terms {
$to_dbea
->
store
(
$dbEntry
,
$to_translation
->
dbID
(),
'
Translation
')
if
(
!
$print
);
#print "stored xref ID " . $dbEntry->dbID() ." " . $to_translation->stable_id() . " ". $to_translation->dbID() . " " . $dbEntry->display_id() . "\n";
# record statistics by evidence type
foreach
my
$et
(
@
{
$dbEntry
->
get_all_linkage_types
}){
$projections_by_evidence_type
{
$et
}
++
;
}
}
}
...
...
@@ -484,6 +501,8 @@ sub usage {
[--nobackup] Skip dumping of table backups
[--full_stats] Print full statistics, e.g. number of terms per evidence type
[--help] This text.
e.g
...
...
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