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
22249abf
Commit
22249abf
authored
21 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
corrected typo and SQL generation syntax
parent
e94c2320
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/AssemblyExceptionFeatureAdaptor.pm
+26
-23
26 additions, 23 deletions
modules/Bio/EnsEMBL/DBSQL/AssemblyExceptionFeatureAdaptor.pm
with
26 additions
and
23 deletions
modules/Bio/EnsEMBL/DBSQL/AssemblyExceptionFeatureAdaptor.pm
+
26
−
23
View file @
22249abf
...
...
@@ -65,8 +65,6 @@ use Bio::EnsEMBL::Utils::Exception qw(throw warning);
sub
generic_fetch
{
my
(
$self
,
$constraint
,
$mapper
,
$slice
)
=
@_
;
$options
||=
{};
my
$columns
=
join
('
,
',
$self
->
_columns
());
my
$db
=
$self
->
db
();
...
...
@@ -75,14 +73,14 @@ sub generic_fetch {
# if there is a slice constraint we remove the constraints ...
unless
(
$constraint
=~
/seq_region_id/
||
$constraint
eq
""
)
{
$sql
.=
"
WHERE
$constraint
";
$sql
.=
"
WHERE
$constraint
";
}
my
$sth
=
$db
->
prepare
(
$sql
);
$sth
->
execute
;
my
$res
=
$self
->
_objs_from_sth
(
$sth
,
$mapper
,
$slice
,
$options
);
my
$res
=
$self
->
_objs_from_sth
(
$sth
,
$mapper
,
$slice
);
return
$res
;
}
...
...
@@ -121,7 +119,9 @@ sub _tables {
sub
_columns
{
my
$self
=
shift
;
return
qw( ae.seq_region_id ae.seq_region_start ae.seq_region_end ae.exc_type ae.exc_seq_region_id ae.exc_seq_region_start ae.exc_seq_region_end )
;
return
qw( ae.seq_region_id ae.seq_region_start ae.seq_region_end
ae.exc_type ae.exc_seq_region_id ae.exc_seq_region_start
ae.exc_seq_region_end )
;
}
...
...
@@ -148,34 +148,37 @@ sub _objs_from_sth {
my
(
$seq_region_id
,
$seq_region_start
,
$seq_region_end
,
$type
,
$exc_seq_region_id
,
$exc_seq_region_start
,
$exc_seq_region_end
);
$sth
->
bind_columns
(
\
$seq_region_id
,
\
$seq_region_start
,
\
$seq_region_end
,
\
$type
,
\
$exc_seq_region_id
,
\
$exc_seq_region_start
,
\
$exc_seq_region_end
);
$sth
->
bind_columns
(
\
$seq_region_id
,
\
$seq_region_start
,
\
$seq_region_end
,
\
$type
,
\
$exc_seq_region_id
,
\
$exc_seq_region_start
,
\
$exc_seq_region_end
);
while
(
$sth
->
fetch
())
{
my
$sr_slice
=
$slice_adaptor
->
fetch_by_seq_region_id
(
$seq_region_id
);
my
$exc_slice
=
$slice_adaptor
->
fetch_by_seq_region_id
(
$exc_seq_region_id
);
# each row creates TWO features, each of which has alternate_slice pointing to the "other" one
# each row creates TWO features, each of which has alternate_slice
# pointing to the "other" one
push
@features
,
Bio::EnsEMBL::
AssemblyExceptionFeature
->
new
('
-start
'
=>
$seq_region_start
,
'
-end
'
=>
$seq_region_end
,
'
-strand
'
=>
1
,
'
-adaptor
'
=>
$self
,
'
-slice
'
=>
$sr_slice
,
'
-alternate_slice
'
=>
$exc_slice
,
'
-type
'
=>
$type
);
Bio::EnsEMBL::
AssemblyExceptionFeature
->
new
('
-start
'
=>
$seq_region_start
,
'
-end
'
=>
$seq_region_end
,
'
-strand
'
=>
1
,
'
-adaptor
'
=>
$self
,
'
-slice
'
=>
$sr_slice
,
'
-alternate_slice
'
=>
$exc_slice
,
'
-type
'
=>
$type
);
push
@features
,
Bio::EnsEMBL::
AssemblyExceptionFeature
->
new
('
-start
'
=>
$exc_seq_region_start
,
'
-
end
'
=>
$exc_seq_region_
end
,
'
-stra
nd
'
=>
1
,
'
-adaptor
'
=>
$self
,
'
-slice
'
=>
$
exc_slice
,
'
-alternate_slice
'
=>
$
sr
_slice
,
'
-type
'
=>
$type
);
Bio::EnsEMBL::
AssemblyExceptionFeature
->
new
(
'
-
start
'
=>
$exc_seq_region_
start
,
'
-e
nd
'
=>
$exc_seq_region_end
,
'
-strand
'
=>
1
,
'
-adaptor
'
=>
$
self
,
'
-slice
'
=>
$
exc
_slice
,
'
-alternate_slice
'
=>
$sr_slice
,
'
-type
'
=>
$type
);
}
return
\
@features
;
...
...
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