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
2901a1ad
Commit
2901a1ad
authored
18 years ago
by
Jan-hinnerk Vogel
Browse files
Options
Downloads
Patches
Plain Diff
fetch_all_by_biotype added
parent
e5ea7562
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
+30
-0
30 additions, 0 deletions
modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
with
30 additions
and
0 deletions
modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
+
30
−
0
View file @
2901a1ad
...
@@ -205,6 +205,36 @@ sub fetch_by_stable_id {
...
@@ -205,6 +205,36 @@ sub fetch_by_stable_id {
return
$gene
;
return
$gene
;
}
}
=head2 fetch_all_by_biotype
Arg [1] : String $biotype
The biotype of the gene to retrieve
Example : $gene = $gene_adaptor->fetch_all_by_biotype('protein_coding') ;
Description: Retrieves an array reference of gene objects from the database via its biotype.
The genes will be retrieved in its native coordinate system (i.e.
in the coordinate system it is stored in the database). It may
be converted to a different coordinate system through a call to
transform() or transfer(). If the gene or exon is not found
undef is returned instead.
Returntype : listref of Bio::EnsEMBL::Gene
Exceptions : if we cant get the gene in given coord system
Caller : general
Status : At Risk
=cut
sub
fetch_all_by_biotype
{
my
(
$self
,
$biotype
)
=
@_
;
my
$constraint
=
"
g.biotype = '
$biotype
' and g.is_current = 1
"
;
my
@genes
=
@
{
$self
->
generic_fetch
(
$constraint
)
};
return
\
@genes
;
}
=head2 fetch_all_versions_by_stable_id
=head2 fetch_all_versions_by_stable_id
Arg [1] : String $stable_id
Arg [1] : String $stable_id
...
...
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