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
c1c287bd
Commit
c1c287bd
authored
18 years ago
by
Felix Kokocinski
Browse files
Options
Downloads
Patches
Plain Diff
removed unreliable fetch_grouped function
parent
865fd799
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/Map/DBSQL/DitagFeatureAdaptor.pm
+0
-76
0 additions, 76 deletions
modules/Bio/EnsEMBL/Map/DBSQL/DitagFeatureAdaptor.pm
modules/t/ditagFeatureAdaptor.t
+4
-9
4 additions, 9 deletions
modules/t/ditagFeatureAdaptor.t
with
4 additions
and
85 deletions
modules/Bio/EnsEMBL/Map/DBSQL/DitagFeatureAdaptor.pm
+
0
−
76
View file @
c1c287bd
...
...
@@ -237,82 +237,6 @@ sub fetch_all_by_Slice {
}
=head2 fetch_grouped
Arg [1] : (optional) ditag id
Arg [2] : (optional) ditag type
Arg [3] : (optional) Bio::EnsEMBL::Slice
Example : $gouped_tags = $ditagfeature_adaptor->fetch_grouped(undef, "ZZ11", undef);
Description: Retrieves Features from the database in their start-end groups;
The start will be the lower seq_region_start, the end the higher seq_region_end.
In context this should refer to potential transcript start and end locations.
This is a convinience method for analysing the ditag mappings, in general
fetch_grouped_ditagFeatures should be used to fetch proper objects.
Returntype : listref of hashes similar to DitagFeatures:
%grouped_tag( -slice => $slice,
-start => $seqstart,
-end => $seqend,
-strand => $strand,
-tag_count => $tagcount,
-hit_strand => $hit_strand,
-ditag_id => $ditag_id,
-ditag_pair_id => $ditag_pair_id,
);
Caller : general
=cut
sub
fetch_grouped
{
my
(
$self
,
$ditagid
,
$tagtype
,
$slice
)
=
@_
;
my
(
@grouped_tags
,
@querywords
);
my
$sql
=
"
SELECT df.seq_region_id, MIN(df.seq_region_start) AS minstart,
MAX(df.seq_region_end) AS maxend, df.seq_region_strand,
df.hit_strand, df.ditag_id, df.ditag_pair_id, d.tag_count
FROM ditag_feature df, ditag d
WHERE df.ditag_id=d.ditag_id
";
if
(
$tagtype
){
$sql
.=
"
AND d.type =
\"
"
.
$tagtype
.
"
\"
";
}
if
(
$ditagid
){
$sql
.=
"
AND df.ditag_id =
"
.
$ditagid
;
}
if
(
$slice
){
$sql
.=
"
AND df.seq_region_id =
"
.
$slice
->
get_seq_region_id
.
"
AND df.seq_region_start >=
"
.
$slice
->
start
.
"
AND df.seq_region_end <=
"
.
$slice
->
end
;
}
$sql
.=
"
GROUP BY df.ditag_id, df.ditag_pair_id
"
.
"
ORDER BY df.seq_region_id, minstart, maxend
";
my
$sth
=
$self
->
prepare
(
$sql
);
$sth
->
execute
();
my
(
$seqreg
,
$seqstart
,
$seqend
,
$strand
,
$hit_strand
,
$ditag_id
,
$ditag_pair_id
,
$tagcount
);
$sth
->
bind_columns
(
\
$seqreg
,
\
$seqstart
,
\
$seqend
,
\
$strand
,
\
$hit_strand
,
\
$ditag_id
,
\
$ditag_pair_id
,
\
$tagcount
);
while
(
$sth
->
fetch
)
{
my
$alt_slice
=
$self
->
db
->
get_SliceAdaptor
->
fetch_by_seq_region_id
(
$seqreg
);
my
%grouped_tag
=
(
slice
=>
$alt_slice
,
start
=>
$seqstart
,
end
=>
$seqend
,
strand
=>
$strand
,
tag_count
=>
$tagcount
,
hit_strand
=>
$hit_strand
,
ditag_id
=>
$ditag_id
,
ditag_pair_id
=>
$ditag_pair_id
,
);
push
@grouped_tags
,
\
%grouped_tag
;
}
return
\
@grouped_tags
;
}
=head2 _fetch
Arg [1] : statement handler
...
...
This diff is collapsed.
Click to expand it.
modules/t/ditagFeatureAdaptor.t
+
4
−
9
View file @
c1c287bd
...
...
@@ -2,7 +2,7 @@ use strict;
BEGIN
{
$|
=
1
;
use
Test
;
plan
tests
=>
1
4
;
plan
tests
=>
1
2
;
}
use
Bio::EnsEMBL::Test::
MultiTestDB
;
...
...
@@ -84,7 +84,7 @@ ok($testfeature && $testfeature->isa('Bio::EnsEMBL::Map::DitagFeature'));
$multi
->
restore
('
core
',
'
ditag_feature
');
########
# 5-1
3
#
# 5-1
1
#
########
#test fetch methods
...
...
@@ -120,15 +120,10 @@ ok(scalar(@$dfs) && $dfs->[0]->isa('Bio::EnsEMBL::Map::DitagFeature'));
#use logic-name
$dfs
=
$dfa
->
fetch_all_by_Slice
(
$slice
,
'',
$logic_name
);
ok
(
1
);
#scalar(@$dfs) && $dfs->[0]->isa('Bio::EnsEMBL::Map::DitagFeature'));
#test fetch_grouped
$dfs
=
$dfa
->
fetch_grouped
('',
$tag_library
);
ok
(
scalar
@$dfs
);
ok
(
$dfs
->
[
0
]
->
{'
ditag_id
'}
&&
$dfs
->
[
0
]
->
{'
start
'}
&&
$dfs
->
[
0
]
->
{'
end
'});
ok
(
scalar
(
@$dfs
)
&&
$dfs
->
[
0
]
->
isa
('
Bio::EnsEMBL::Map::DitagFeature
'));
######
# 1
4
#
# 1
2
#
######
#test list_dbIDs
...
...
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