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
20ae0120
Commit
20ae0120
authored
18 years ago
by
Patrick Meidl
Browse files
Options
Downloads
Patches
Plain Diff
added list_seq_region_ids()
parent
cf148465
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
+33
-1
33 additions, 1 deletion
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
+7
-0
7 additions, 0 deletions
modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
with
40 additions
and
1 deletion
modules/Bio/EnsEMBL/DBSQL/BaseFeatureAdaptor.pm
+
33
−
1
View file @
20ae0120
...
...
@@ -85,6 +85,11 @@ sub new {
which are on the Slice defined by $slice. If $logic_name is
defined only features with an analysis of type $logic_name
will be returned.
NOTE: only features that are entirely on the slice's seq_region
will be returned (i.e. if they hang off the start/end of a
seq_region they will be discarded). Features can extend over the
slice boundaries though (in cases where you have a slice that
doesn't span the whole seq_region).
Returntype : listref of Bio::EnsEMBL::SeqFeatures in Slice coordinates
Exceptions : none
Caller : Bio::EnsEMBL::Slice
...
...
@@ -564,7 +569,7 @@ sub _remap {
$strand
=
$f
->
strand
();
$seq_region
=
$f
->
slice
->
seq_region_name
();
}
# maps to region outside desired area
next
if
(
$start
>
$slice_end
)
||
(
$end
<
$slice_start
)
||
(
$slice_seq_region
ne
$seq_region
);
...
...
@@ -761,6 +766,33 @@ sub _max_feature_length {
}
#
# Lists all seq_region_ids that a particular feature type is found on.
# Useful e.g. for finding out which seq_regions have genes.
# Returns a listref of seq_region_ids.
#
sub
_list_seq_region_ids
{
my
(
$self
,
$table
)
=
@_
;
my
@out
;
my
$sql
=
qq(
SELECT distinct(sr.seq_region_id)
FROM seq_region sr, $table a
WHERE sr.seq_region_id = a.seq_region_id
)
;
my
$sth
=
$self
->
prepare
(
$sql
);
$sth
->
execute
;
while
(
my
(
$id
)
=
$sth
->
fetchrow
)
{
push
(
@out
,
$id
);
}
$sth
->
finish
;
return
\
@out
;
}
=head1 DEPRECATED METHODS
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
+
7
−
0
View file @
20ae0120
...
...
@@ -145,6 +145,13 @@ sub list_stable_ids {
}
sub
list_seq_region_ids
{
my
$self
=
shift
;
return
$self
->
_list_seq_region_ids
('
gene
');
}
=head2 fetch_by_display_label
Arg [1] : String $label - display label of gene to fetch
...
...
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