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
f3955264
Commit
f3955264
authored
20 years ago
by
Glenn Proctor
Browse files
Options
Downloads
Patches
Plain Diff
Added storing of ensembl object types for dependent xrefs.
parent
087be40d
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_mapping/XrefMapper/BasicMapper.pm
+10
-5
10 additions, 5 deletions
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
with
10 additions
and
5 deletions
misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
+
10
−
5
View file @
f3955264
...
...
@@ -694,9 +694,12 @@ sub store {
my
$object_xref_id
=
$max_object_xref_id
+
1
;
# keep a (unique) list of xref IDs that need to be written out to file as well
# this is a hash of
list
s, keyed on xref id that relates xrefs to e! objects (may be 1-many)
# this is a hash of
hashe
s, keyed on xref id that relates xrefs to e! objects (may be 1-many)
my
%primary_xref_ids
=
();
# also keep track of types of ensembl objects
my
%ensembl_object_types
;
my
$dir
=
$self
->
dir
();
foreach
my
$file
(
glob
("
$dir
/*.map
"))
{
...
...
@@ -726,6 +729,8 @@ sub store {
# TODO - evalue?
$object_xref_id
++
;
$ensembl_object_types
{
$target_id
}
=
$type
;
#push @{$primary_xref_ids{$query_id}}, $target_id;
$primary_xref_ids
{
$query_id
}{
$target_id
}
=
$target_id
;
...
...
@@ -749,7 +754,7 @@ sub store {
print
"
Read
$total_lines
lines from
$total_files
exonerate output files
\n
";
# write relevant xrefs to file
$self
->
dump_xrefs
(
\
%primary_xref_ids
,
$object_xref_id
+
1
);
$self
->
dump_xrefs
(
\
%primary_xref_ids
,
$object_xref_id
+
1
,
\
%ensembl_object_types
);
}
...
...
@@ -816,9 +821,10 @@ sub get_analysis_id {
sub
dump_xrefs
{
my
(
$self
,
$xref_ids_hashref
,
$start_object_xref_id
)
=
@_
;
my
(
$self
,
$xref_ids_hashref
,
$start_object_xref_id
,
$ensembl_object_types_hashref
)
=
@_
;
my
@xref_ids
=
keys
%$xref_ids_hashref
;
my
%xref_to_objects
=
%$xref_ids_hashref
;
my
%ensembl_object_types
=
%$ensembl_object_types_hashref
;
open
(
XREF
,
"
>xref.txt
");
open
(
OBJECT_XREF
,
"
>>object_xref.txt
");
...
...
@@ -894,9 +900,8 @@ sub dump_xrefs {
if
(
defined
$xref_to_objects
{
$xref_id
})
{
my
@objects
=
keys
(
%
{
$xref_to_objects
{
$xref_id
}}
);
print
"
xref
$accession
has
"
.
scalar
(
@objects
)
.
"
associated ensembl objects
\n
";
# TODO type - keep hash in store method?
my
$type
=
"
xxx
";
foreach
my
$object_id
(
@objects
)
{
my
$type
=
$ensembl_object_types
{
$object_id
};
print
OBJECT_XREF
"
$object_xref_id
\t
$object_id
\t
$type
\t
$core_xref_id
DEPENDENT
\n
";
$object_xref_id
++
;
}
...
...
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