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
571f28ab
Commit
571f28ab
authored
13 years ago
by
Monika Komorowska
Browse files
Options
Downloads
Patches
Plain Diff
Internal method _build_circular_slice_cache added
parent
3c8204c8
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
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+38
-1
38 additions, 1 deletion
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
with
38 additions
and
1 deletion
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+
38
−
1
View file @
571f28ab
...
...
@@ -120,7 +120,6 @@ sub new {
$self
->
{'
sr_name_cache
'}
=
$seq_region_cache
->
{'
name_cache
'};
$self
->
{'
sr_id_cache
'}
=
$seq_region_cache
->
{'
id_cache
'};
$self
->
{'
lrg_region_test
'}
=
undef
;
my
$meta_container
=
$self
->
db
->
get_MetaContainer
();
my
@values
=
$meta_container
->
list_value_by_key
("
LRG
");
...
...
@@ -499,6 +498,7 @@ sub fetch_by_region_unique {
my
@out
=
();
my
$slice
=
$self
->
fetch_by_region
(
@
_
);
if
(
!
exists
(
$self
->
{'
asm_exc_cache
'}
)
)
{
$self
->
_build_exception_cache
();
}
...
...
@@ -602,6 +602,7 @@ sub fetch_by_seq_region_id {
my
$arr
=
$self
->
{'
sr_id_cache
'}
->
{
$seq_region_id
};
my
(
$name
,
$length
,
$cs
,
$cs_id
);
if
(
$arr
&&
defined
(
$arr
->
[
2
]
)
)
{
(
$name
,
$cs_id
,
$length
)
=
(
$arr
->
[
1
],
$arr
->
[
2
],
$arr
->
[
3
]
);
$cs
=
$self
->
db
->
get_CoordSystemAdaptor
->
fetch_by_dbID
(
$cs_id
);
...
...
@@ -778,6 +779,7 @@ sub fetch_all {
my
%bad_vals
=
();
#
# Get a hash of non reference seq regions
#
...
...
@@ -1241,6 +1243,7 @@ sub fetch_by_Feature{
throw
('
Feature must be attached to a valid slice.
');
}
my
$fstart
=
$feature
->
start
();
my
$fend
=
$feature
->
end
();
if
(
!
defined
(
$fstart
)
||
!
defined
(
$fend
))
{
...
...
@@ -1864,6 +1867,36 @@ LSQL
}
## end sub cache_toplevel_seq_mappings
sub
_build_circular_slice_cache
{
my
$self
=
shift
;
# build up a cache of circular sequence region ids
my
$sth
=
$self
->
prepare
(
"
SELECT sra.seq_region_id FROM seq_region_attrib sra
"
.
"
INNER JOIN attrib_type at ON sra.attrib_type_id = at.attrib_type_id
"
.
"
INNER JOIN seq_region sr ON sra.seq_region_id = sr.seq_region_id
"
.
"
INNER JOIN coord_system cs ON sr.coord_system_id = cs.coord_system_id
"
.
"
WHERE code = 'circular_seq' and cs.species_id = ?
");
$sth
->
bind_param
(
1
,
$self
->
species_id
(),
SQL_INTEGER
);
$sth
->
execute
();
my
$id
;
my
%hash
;
if
(
(
$id
)
=
$sth
->
fetchrow_array
()
)
{
$self
->
{'
circular_sr_id_cache
'}
=
\
%hash
;
$self
->
{'
is_circular
'}
=
1
;
$hash
{
$id
}
=
$id
;
while
(
(
$id
)
=
$sth
->
fetchrow_array
()
)
{
$hash
{
$id
}
=
$id
;
}
}
else
{
$self
->
{'
is_circular
'}
=
0
;
}
$sth
->
finish
();
}
## end _build_circular_slice_cache
#####################################
# sub DEPRECATED METHODs
#####################################
...
...
@@ -2077,4 +2110,8 @@ sub fetch_by_chr_name{
}
1
;
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