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
a032c47c
Commit
a032c47c
authored
20 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
max feature length can be overridden, allows optimization for misc feature retrieval
parent
71ca02a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
+17
-2
17 additions, 2 deletions
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/MiscFeatureAdaptor.pm
+10
-1
10 additions, 1 deletion
modules/Bio/EnsEMBL/DBSQL/MiscFeatureAdaptor.pm
with
27 additions
and
3 deletions
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
+
17
−
2
View file @
a032c47c
...
...
@@ -492,7 +492,7 @@ sub _slice_fetch {
if
(
$feat_cs
->
equals
(
$slice_cs
))
{
# no mapping is required if this is the same coord system
my
$max_len
=
my
$max_len
=
$self
->
_max_feature_length
()
||
$mcc
->
fetch_max_length_by_CoordSystem_feature_type
(
$feat_cs
,
$tab_name
);
my
$constraint
=
$orig_constraint
;
...
...
@@ -552,7 +552,7 @@ sub _slice_fetch {
}
else
{
# do multiple split queries using start / end constraints
my
$max_len
=
my
$max_len
=
$self
->
_max_feature_length
()
||
$mcc
->
fetch_max_length_by_CoordSystem_feature_type
(
$feat_cs
,
$tab_name
);
my
$len
=
@coords
;
...
...
@@ -1044,6 +1044,21 @@ sub _objs_from_sth {
}
#
# Internal function. Allows the max feature length which is normally
# retrieved from the meta_coord table to be overridden. This allows
# for some significant optimizations to be put in when it is known
# that requested features will not be over a certain size.
#
sub
_max_feature_length
{
my
$self
=
shift
;
return
$self
->
{'
_max_feature_length
'}
=
shift
if
(
@
_
);
return
$self
->
{'
_max_feature_length
'};
}
=head1 DEPRECATED METHODS
=cut
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/DBSQL/MiscFeatureAdaptor.pm
+
10
−
1
View file @
a032c47c
...
...
@@ -87,8 +87,10 @@ sub fetch_all_by_Slice_and_set_code {
my
$msa
=
$self
->
db
->
get_MiscSetAdaptor
();
my
@sets
=
();
my
$max_len
=
0
;
foreach
my
$set_code
(
@
_
)
{
my
$set
=
$msa
->
fetch_by_code
(
$set_code
);
$max_len
=
$set
->
longest_feature
()
if
(
$set
->
longest_feature
>
$max_len
);
if
(
!
$set
)
{
warning
("
No misc_set with code [
$set_code
] exists
")
}
else
{
push
@sets
,
$set
->
dbID
;
}
}
...
...
@@ -100,7 +102,14 @@ sub fetch_all_by_Slice_and_set_code {
}
else
{
return
[]
;
}
return
$self
->
fetch_all_by_Slice_constraint
(
$slice
,
$constraint
);
$self
->
_max_feature_length
(
$max_len
);
my
$results
=
$self
->
fetch_all_by_Slice_constraint
(
$slice
,
$constraint
);
$self
->
_max_feature_length
(
undef
);
return
$results
;
}
...
...
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