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
5b3305b1
Commit
5b3305b1
authored
18 years ago
by
Felix Kokocinski
Browse files
Options
Downloads
Patches
Plain Diff
fix in fetch_all_by_ditagID()
parent
9d8eeda4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/Bio/EnsEMBL/Map/DBSQL/DitagFeatureAdaptor.pm
+4
-7
4 additions, 7 deletions
modules/Bio/EnsEMBL/Map/DBSQL/DitagFeatureAdaptor.pm
modules/Bio/EnsEMBL/Map/DitagFeature.pm
+3
-3
3 additions, 3 deletions
modules/Bio/EnsEMBL/Map/DitagFeature.pm
with
7 additions
and
10 deletions
modules/Bio/EnsEMBL/Map/DBSQL/DitagFeatureAdaptor.pm
+
4
−
7
View file @
5b3305b1
...
...
@@ -109,6 +109,7 @@ sub fetch_by_dbID {
sub
fetch_all_by_ditagID
{
my
(
$self
,
$ditag_id
,
$ditag_pair_id
,
$analysis_id
)
=
@_
;
my
$arg
=
$ditag_id
;
my
$sql
=
"
SELECT ditag_feature_id, ditag_id, seq_region_id, seq_region_start,
seq_region_end, seq_region_strand, analysis_id, hit_start, hit_end,
hit_strand, cigar_line, ditag_side, ditag_pair_id
...
...
@@ -116,18 +117,15 @@ sub fetch_all_by_ditagID {
WHERE ditag_id = ?
";
if
(
$ditag_pair_id
){
$sql
.=
"
AND ditag_pair_id = ?
";
$arg
.=
"
,
$ditag_pair_id
";
}
if
(
$analysis_id
){
$sql
.=
"
AND analysis_id = ?
";
$arg
.=
"
,
$analysis_id
";
}
$sql
.=
"
ORDER BY ditag_pair_id
";
my
$sth
=
$self
->
prepare
(
$sql
);
if
(
$ditag_pair_id
){
$sth
->
execute
(
$ditag_id
,
$ditag_pair_id
);
}
else
{
$sth
->
execute
(
$ditag_id
);
}
$sth
->
execute
(
split
("
,
",
$arg
));
my
$result
=
$self
->
_fetch
(
$sth
);
...
...
@@ -208,7 +206,6 @@ sub fetch_all_by_Slice {
$sql
.=
"
df.seq_region_id =
"
.
$slice
->
get_seq_region_id
.
"
AND df.seq_region_start <=
"
.
$slice
->
end
.
"
AND df.seq_region_end >=
"
.
$slice
->
start
;
print
STDERR
"
\n
$sql
\n
";
my
$sth
=
$self
->
prepare
(
$sql
);
$sth
->
execute
();
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/Map/DitagFeature.pm
+
3
−
3
View file @
5b3305b1
...
...
@@ -185,11 +185,11 @@ sub get_ditag_location {
eval
{
(
$ditag_a
,
$ditag_b
,
$more
)
=
@
{
$self
->
adaptor
->
fetch_all_by_ditagID
(
$self
->
ditag_id
,
$self
->
ditag_pair_id
,
$self
->
analysis
->
analysis_id
)};
$self
->
analysis
->
dbID
)};
};
if
(
$@
or
!
defined
(
$ditag_a
)
or
!
defined
(
$ditag_b
)){
throw
("
Cannot find 2nd tag of pair (
"
.
$self
->
dbID
.
"
,
"
.
$self
->
ditag_id
.
"
,
"
.
$self
->
ditag_pair_id
.
"
,
"
.
$self
->
analysis
->
analysis_id
.
"
)
"
);
$self
->
ditag_pair_id
.
"
,
"
.
$self
->
analysis
->
dbID
.
"
)
\n
"
.
$@
);
}
else
{
if
(
defined
$more
){
...
...
@@ -200,7 +200,7 @@ sub get_ditag_location {
(
$ditag_a
->
start
<
$ditag_b
->
start
)
?
(
$start
=
$ditag_a
->
start
)
:
(
$start
=
$ditag_b
->
start
);
(
$ditag_a
->
end
>
$ditag_b
->
end
)
?
(
$end
=
$ditag_a
->
end
)
:
(
$end
=
$ditag_b
->
end
);
if
(
$ditag_a
->
strand
!=
$ditag_b
->
strand
){
throw
('
the strand of the two ditagFeatures are different!
'
.
$ditag_a
->
strand
.
'
/
'
.
$ditag_b
->
strand
);
throw
('
the strand
s
of the two ditagFeatures are different!
'
.
$ditag_a
->
strand
.
'
/
'
.
$ditag_b
->
strand
);
}
}
}
...
...
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