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
a03738a6
Commit
a03738a6
authored
13 years ago
by
Ian Longden
Browse files
Options
Downloads
Patches
Plain Diff
added is_ref to see if gene is the reference gene
parent
cada933e
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/GeneAdaptor.pm
+17
-0
17 additions, 0 deletions
modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
modules/Bio/EnsEMBL/Gene.pm
+21
-0
21 additions, 0 deletions
modules/Bio/EnsEMBL/Gene.pm
with
38 additions
and
0 deletions
modules/Bio/EnsEMBL/DBSQL/GeneAdaptor.pm
+
17
−
0
View file @
a03738a6
...
...
@@ -942,6 +942,23 @@ sub fetch_all_alt_alleles {
return
[]
;
}
sub
is_ref
{
my
(
$self
,
$gene_id
)
=
@_
;
my
$is_not_ref
;
# easier to find if it is not an alt_Allele do this and then negate it.
my
$sth
=
$self
->
prepare
("
select count(1) from alt_allele where gene_id =
$gene_id
and is_ref = 0
");
$sth
->
execute
();
$sth
->
bind_columns
(
\
$is_not_ref
);
$sth
->
fetch
;
if
(
defined
(
$is_not_ref
)
and
$is_not_ref
){
return
0
;
}
return
1
;
}
=head2 store_alt_alleles
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/Gene.pm
+
21
−
0
View file @
a03738a6
...
...
@@ -1468,6 +1468,27 @@ sub load {
}
}
=head2 is_ref
Description: getter setter for the gene attribute is_ref
Arg [1] : (optional) 1 or 0
return : boolean
=cut
sub
is_reference
{
my
(
$self
,
$is_ref
)
=
@_
;
if
(
defined
(
$is_ref
)){
$self
->
{'
is_ref
'}
=
$is_ref
;
}
else
{
$self
->
{'
is_ref
'}
=
$self
->
adaptor
->
is_ref
(
$self
->
dbID
);
}
return
$self
->
{'
is_ref
'};
}
=head2 summary_as_hash
Example : $gene_summary = $gene->summary_as_hash();
...
...
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