Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl
Commits
da0d1d94
Commit
da0d1d94
authored
Feb 19, 2008
by
Andreas Kusalananda Kähäri
Browse files
Cache the most recently used slice.
parent
7c5f39a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
modules/Bio/EnsEMBL/Collection.pm
modules/Bio/EnsEMBL/Collection.pm
+19
-5
No files found.
modules/Bio/EnsEMBL/Collection.pm
View file @
da0d1d94
...
...
@@ -34,17 +34,31 @@ sub _create_feature {
my
(
$dbid
,
$start
,
$end
,
$strand
,
$slice
)
=
rearrange
(
[
'
DBID
',
'
START
',
'
END
',
'
STRAND
',
'
SLICE
'
],
@
{
$args
}
);
%
{
$args
}
);
my
$feature
=
[
$dbid
,
$slice
->
get_seq_region_id
(),
$start
,
$end
,
$strand
];
return
[
$dbid
,
$slice
->
get_seq_region_id
(),
$start
,
$end
,
$strand
]
;
return
$feature
;
}
sub
_create_feature_fast
{
my
(
$this
,
$feature_type
,
$args
)
=
@_
;
return
[
$args
->
{'
dbID
'},
$args
->
{'
slice
'}
->
get_seq_region_id
(),
$args
->
{'
start
'},
$args
->
{'
end
'},
$args
->
{'
strand
'}
];
if
(
!
defined
(
$this
->
{'
recent_slice
'}
)
||
$this
->
{'
recent_slice
'}
ne
$args
->
{'
slice
'}
)
{
$this
->
{'
recent_slice
'}
=
$args
->
{'
slice
'};
$this
->
{'
recent_slice_seq_region_id
'}
=
$args
->
{'
slice
'}
->
get_seq_region_id
();
}
my
$feature
=
[
$args
->
{'
dbID
'},
$this
->
{'
recent_slice_seq_region_id
'},
$args
->
{'
start
'},
$args
->
{'
end
'},
$args
->
{'
strand
'}
];
return
$feature
;
}
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