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
dd3856c8
Commit
dd3856c8
authored
17 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
added 2 optional parameters to fetch_all_by_Slice these bieng biotype and source
parent
534a2137
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/GeneAdaptor.pm
+16
-1
16 additions, 1 deletion
modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
with
16 additions
and
1 deletion
modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
+
16
−
1
View file @
dd3856c8
...
...
@@ -439,6 +439,10 @@ sub fetch_all_by_Slice_and_external_dbname_link {
Arg [3] : (optional) boolean $load_transcripts
if true, transcripts will be loaded immediately rather than
lazy loaded later.
Arg [4] : (optional) string $source
the source name of the features to obtain.
Arg [5] : (optional) string biotype
the biotype of the features to obtain.
Example : @genes = @{$gene_adaptor->fetch_all_by_Slice()};
Description: Overrides superclass method to optionally load transcripts
immediately rather than lazy-loading them later. This
...
...
@@ -456,9 +460,20 @@ sub fetch_all_by_Slice {
my
$slice
=
shift
;
my
$logic_name
=
shift
;
my
$load_transcripts
=
shift
;
my
$source
=
shift
;
my
$biotype
=
shift
;
my
$constraint
=
'
g.is_current = 1
';
if
(
defined
(
$source
)){
$constraint
.=
"
and g.source = '
$source
'
";
}
if
(
defined
(
$biotype
)){
$constraint
.=
"
and g.biotype = '
$biotype
'
"
;
}
my
$genes
=
$self
->
SUPER::
fetch_all_by_Slice_constraint
(
$slice
,
'
g.is_current = 1
'
,
$logic_name
);
$constraint
,
$logic_name
);
# if there are 0 or 1 genes still do lazy-loading
if
(
!
$load_transcripts
||
@$genes
<
2
)
{
...
...
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