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
a8bfbd14
Commit
a8bfbd14
authored
22 years ago
by
Arne Stabenau
Browse files
Options
Downloads
Patches
Plain Diff
podding while test writing
parent
a4f69d7b
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/Gene.pm
+174
-118
174 additions, 118 deletions
modules/Bio/EnsEMBL/Gene.pm
with
174 additions
and
118 deletions
modules/Bio/EnsEMBL/Gene.pm
+
174
−
118
View file @
a8bfbd14
...
...
@@ -66,17 +66,6 @@ sub new {
}
=head2 start
Title : start
Usage : $start = $gene->start()
Function : Gets/Sets the lowest start coordinate of this genes exons.
No consistancy check is performed and if this
is used as a setter and potentially the start could be set to
a value which does not correspond to the lowest exon start.
Returns : int
Args : none, or the start coordinate of this gene
=cut
=head2 start
...
...
@@ -260,6 +249,18 @@ sub chr_name {
}
=head2 source
Arg [1] : string $source
Example : none
Description: get/set for attribute source
Returntype : string
Exceptions : none
Caller : general
=cut
sub
source
{
my
(
$self
,
$source
)
=
@_
;
...
...
@@ -271,18 +272,20 @@ sub source {
}
=head2 is_known
Title : is_known
Usage : if( $gene->is_known )
Func
tion: returns true if the
re are any dblinks on the gene or
transcript object
s
Example :
Retur
ns :
Args :
Args : none
Example : none
Descrip
tion: returns true if the
Gene or one of its Transcripts have
DBLink
s
Returntype : 0,1
Exceptio
ns :
none
Caller : general
=cut
sub
is_known
{
my
(
$self
)
=
@_
;
my
@array
;
...
...
@@ -303,15 +306,16 @@ sub is_known{
=head2 adaptor
Title :
adaptor
Usage :
Function: give this genes GeneAdaptor if known
Example :
Retur
ns :
Args :
Arg [1] : Bio::EnsEMBL::DBSQL::GeneAdaptor $
adaptor
Example : none
Description: get/set for attribute adaptor
Returntype : Bio::EnsEMBL::DBSQL::GeneAdaptor
Exceptio
ns :
none
Caller : set only used by adaptor on store or retrieve
=cut
sub
adaptor
{
my
(
$self
,
$arg
)
=
@_
;
...
...
@@ -323,16 +327,19 @@ sub adaptor {
=head2 analysis
Title : analysis
Usage : $gene->analysis($analysisObject)
Function: get/set this genes analysis object
Returns : on get the analysis object
Args : newvalue (optional)
Arg [1] : Bio::EnsEMBL::Analysis $analysis
Example : none
Description: get/set for attribute analysis
Returntype : Bio::EnsEMBL::Analysis
Exceptions : none
Caller : general
=cut
sub
analysis
{
my
(
$self
,
$value
)
=
@_
;
if
(
defined
$value
)
{
...
...
@@ -343,17 +350,19 @@ sub analysis {
=head2 dbID
Title :
dbID
Usage : $id = $obj->dbID();
Function: internal db id if available
Example :
Retur
ns :
Args :
Arg [1] : int $
dbID
Example : none
Description: get/set for attribute dbID
Returntype : int
Exceptio
ns :
none
Caller : set only by adaptor on store or retrieve
=cut
sub
dbID
{
my
(
$self
,
$arg
)
=
@_
;
...
...
@@ -367,12 +376,14 @@ sub dbID {
=head2 external_name
Title : external_name
Usage : $ext_name = $obj->external_name();
Function: external_name if available
Example :
Returns : the external name of this gene
Args : new external name (optional)
Arg [1] : string $external_name
Example : none
Description: get/set for attribute external_name. It could be calculated
from dblinks in a species dependent way. Well introduce
that later.
Returntype : string
Exceptions : none
Caller : Lite::GeneAdaptor knows how to set it correct
=cut
...
...
@@ -386,6 +397,21 @@ sub external_name {
return
$self
->
{'
_external_name
'};
}
=head2 external_db
Arg [1] : string $external_db
Example : none
Description: get/set for attribute external_db. The db is the one that
belongs to the external_name
Returntype : string
Exceptions : none
Caller : general
=cut
sub
external_db
{
my
(
$self
,
$arg
)
=
@_
;
...
...
@@ -398,20 +424,28 @@ sub external_db {
=head2 description
Title : description
Usage : $gene->description
Function: gets the gene description line. Setting is not allowed
Example :
Returns : a string
Args : none
Arg [1] : (optional) string $description
Example : none
Description: you can set get this argument. If not set its lazy loaded
from attached adaptor.
Returntype : string
Exceptions : if no GeneAdaptor is set and no description is there
Caller : general
=cut
sub
description
{
my
(
$self
)
=
@_
;
my
(
$self
,
$arg
)
=
@_
;
if
(
defined
$arg
)
{
$self
->
{'
_description
'}
=
$arg
;
return
$arg
;
}
if
(
exists
$self
->
{'
_description
'}
)
{
return
$self
->
{'
_description
'};
}
...
...
@@ -449,16 +483,19 @@ sub get_all_DBLinks {
=head2 add_DBLink
Title : add_DBLink
Usage :
Function:
Example :
Returns :
Args :
Arg [1] : Bio::Annotation::DBLink $link
a link is a database entry somewhere else.
Usually this is a Bio::EnsEMBL::DBEntry.
Example : none
Description: will add the link to the list of links already in the
gene object.
Returntype : none
Exceptions : none
Caller : general
=cut
sub
add_DBLink
{
my
(
$self
,
$value
)
=
@_
;
...
...
@@ -477,20 +514,18 @@ sub add_DBLink{
=head2 get_all_Exons
Title : get_all_Exons
Usage : foreach my $exon ( $gene->each_unique_Exon )
Function: retrieves a listref of exons associated with this
gene, guaranteed to be nonredundant
Example : @exons = @{$gene->get_all_Exons()};
Returns : listref of Bio::EnsEMBL::Exon objects
Args : none
Args : none
Example : none
Description: a set off all the exons associated with this gene.
Returntype : listref Bio::EnsEMBL::Exon
Exceptions : none
Caller : general
=cut
sub
get_all_Exons
{
my
(
$self
,
@args
)
=
@_
;
my
%h
;
...
...
@@ -509,17 +544,19 @@ sub get_all_Exons {
}
=head2 type
Title : type
Usage : $obj->type($newval)
Function:
Returns : value of type
Args : newvalue (optional)
=head2 type
Arg [1] : string $type
Example : none
Description: get/set for attribute type
Returntype : string
Exceptions : none
Caller : general
=cut
sub
type
{
my
$obj
=
shift
;
if
(
@
_
)
{
...
...
@@ -530,18 +567,21 @@ sub type {
}
=head2 add_Transcript
Title : add_Transcript
Usage : $gene->add_Transcript($tr)
Function:
Example :
Returns :
Args :
=head2 add_Transcript
Arg 1 : Bio::EnsEMBL::Transcript $transcript
Example : none
Description: adds another Transcript to the set of alternativly
spliced Transcripts off this gene. If it shares exons
with another Transcript, these should be object-identical
Returntype : none
Exceptions : none
Caller : general
=cut
sub
add_Transcript
{
my
(
$self
,
$trans
)
=
@_
;
...
...
@@ -558,17 +598,19 @@ sub add_Transcript{
}
=head2 get_all_Transcripts
Title : get_all_Transcripts
Usage : foreach $trans ( @{$gene->get_all_Transcripts})
Function:
Example :
Returns : A listref of Transcript objects
Args :
Args : none
Example : none
Description: return the Transcripts in this gene
Returntype : listref Bio::EnsEMBL::Transcript
Exceptions : none
Caller : general
=cut
sub
get_all_Transcripts
{
my
(
$self
)
=
@_
;
...
...
@@ -579,15 +621,18 @@ sub get_all_Transcripts {
=head2 created
Title : created
Usage : $obj->created()
Function:
Returns : value of created
Args :
Arg [1] : string $created
The time the stable id for this gene was created. Not very well
maintained data (at release 9)
Example : none
Description: get/set/lazy_load for the created timestamp
Returntype : string
Exceptions : none
Caller : general
=cut
sub
created
{
my
(
$self
,
$value
)
=
@_
;
...
...
@@ -606,17 +651,21 @@ sub created{
}
=head2 modified
Title : modified
Usage : $obj->modified()
Function:
Returns : value of modified
Args :
=head2 modified
Arg [1] : string $modified
The time the gene with this stable_id was last modified.
Not well maintained data (release 9)
Example : none
Description: get/set/lazy_load of modified timestamp
Returntype : string
Exceptions : none
Caller : general
=cut
sub
modified
{
my
(
$self
,
$value
)
=
@_
;
...
...
@@ -635,16 +684,20 @@ sub modified{
}
=head2 version
Title : version
Usage : $obj->version()
Function:
Returns : value of version
Args :
Arg [1] : int $version
A version number for the stable_id
Example : nonen
Description: get/set/lazy_load for the version number
Returntype : int
Exceptions : none
Caller : general
=cut
sub
version
{
my
(
$self
,
$value
)
=
@_
;
...
...
@@ -665,14 +718,15 @@ sub version{
}
=head2 stable_id
Title : stable_id
Usage : $obj->stable_id
Function:
Returns : value of stable_id
Args :
=head2 stable_id
Arg [1] : string $stable_id
Example : ("ENSG0000000001")
Description: get/set/lazy_loaded stable id for this gene
Returntype : string
Exceptions : none
Caller : general
=cut
...
...
@@ -696,6 +750,20 @@ sub stable_id{
}
=head2 _get_stable_entry_info
Args : none
Example : none
Description: does the lazy loading for all stable id related information
Returntype : none
Exceptions : none
Caller : internal
=cut
sub
_get_stable_entry_info
{
my
$self
=
shift
;
...
...
@@ -709,18 +777,6 @@ sub _get_stable_entry_info {
=head2 _dump
Title : _dump
Usage : dump data structure for debugging
Function:
Example :
Returns :
Args :
=cut
sub
_dump
{
my
(
$self
,
$fh
)
=
@_
;
...
...
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