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
01fd5893
Commit
01fd5893
authored
13 years ago
by
Kieron Taylor
Browse files
Options
Downloads
Patches
Plain Diff
Added a summary_as_hash method to each object, so that it can self-summarize
for the benefit of Region Report tool
parent
b40e76bf
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/Bio/EnsEMBL/Gene.pm
+1
-0
1 addition, 0 deletions
modules/Bio/EnsEMBL/Gene.pm
modules/Bio/EnsEMBL/Transcript.pm
+44
-23
44 additions, 23 deletions
modules/Bio/EnsEMBL/Transcript.pm
modules/Bio/EnsEMBL/Translation.pm
+20
-3
20 additions, 3 deletions
modules/Bio/EnsEMBL/Translation.pm
with
65 additions
and
26 deletions
modules/Bio/EnsEMBL/Gene.pm
+
1
−
0
View file @
01fd5893
...
...
@@ -1484,6 +1484,7 @@ sub summary_as_hash {
$summary
{'
stable_id
'}
=
$self
->
stable_id
;
$summary
{'
description
'}
=
$self
->
description
;
$summary
{'
biotype
'}
=
$self
->
biotype
;
$summary
{'
strand
'}
=
$self
->
strand
;
return
\
%summary
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/Transcript.pm
+
44
−
23
View file @
01fd5893
...
...
@@ -47,8 +47,6 @@ A representation of a transcript within the Ensembl system. A transcript
consists of a set of Exons and (possibly) a Translation which defines the
coding and non-coding regions of the exons.
=head1 METHODS
=cut
package
Bio::EnsEMBL::
Transcript
;
...
...
@@ -752,7 +750,7 @@ sub translation {
Description: Fetches all alternative translations defined for this
transcript. The canonical translation is not returned.
Returntype : Array
ref
erence
to Bio::EnsEMBL::Translation
Returntype : Arrayref to Bio::EnsEMBL::Translation
Exceptions : None
Caller : General
Status : Stable
...
...
@@ -813,7 +811,7 @@ sub add_alternative_translation {
Example : none
Description: Retrieves all Exon sequences and concats them together.
No phase padding magic is done, even if phases do not align.
Returntype :
t
xt
Returntype :
Te
xt
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -867,7 +865,7 @@ sub spliced_seq {
An empty string is returned if this transcript is a pseudogene
(i.e. is non-translateable).
Returntype :
t
xt
Returntype :
Te
xt
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -1263,7 +1261,7 @@ sub add_Attributes {
Title : add_Exon
Usage : $trans->add_Exon($exon)
Returns : No
thing
Returns : No
ne
Args [1]: Bio::EnsEMBL::Exon object to add
Args [2]: rank
Exceptions: throws if not a valid Bio::EnsEMBL::Exon
...
...
@@ -1401,7 +1399,7 @@ sub add_Exon {
constitutive exons if the CONSTITUTIVE argument is
true.
Returntype :
a
list
ref
erence
to Bio::EnsEMBL::Exon objects
Returntype : listref to Bio::EnsEMBL::Exon objects
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -1448,7 +1446,7 @@ sub get_all_Exons {
transcript in order, i.e. the first exon in the
listref is the 5prime most exon in the transcript.
Returntype :
a
list
ref
erence
to Bio::EnsEMBL::Exon objects
Returntype : listref to Bio::EnsEMBL::Exon objects
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -1467,7 +1465,7 @@ sub get_all_constitutive_Exons {
Description: Returns an listref of the introns in this transcript in order.
i.e. the first intron in the listref is the 5prime most exon in
the transcript.
Returntype :
a
list
ref
erence
to Bio::EnsEMBL::Intron objects
Returntype : listref to Bio::EnsEMBL::Intron objects
Exceptions : none
Caller : general
Status : Stable
...
...
@@ -1883,11 +1881,12 @@ sub get_TranscriptMapper {
=head2 start_Exon
Title : start_Exon
Usage : $start_exon = $transcript->start_Exon;
Returns : The first exon in the transcript.
Args : NONE
Status : Stable
Title : start_Exon
Usage : $start_exon = $transcript->start_Exon;
Returntype : Bio::EnsEMBL::Exon
Description : The first exon in the transcript.
Args : NONE
Status : Stable
=cut
...
...
@@ -1899,11 +1898,12 @@ sub start_Exon {
=head2 end_Exon
Title : end_exon
Usage : $end_exon = $transcript->end_Exon;
Returns : The last exon in the transcript.
Args : NONE
Status : Stable
Title : end_exon
Usage : $end_exon = $transcript->end_Exon;
Description : The last exon in the transcript.
Returntype : Bio::EnsEMBL::Exon
Args : NONE
Status : Stable
=cut
...
...
@@ -1918,7 +1918,7 @@ sub end_Exon {
Title : description
Usage : $obj->description($newval)
Function:
Returns :
value of description
Returns :
String
Args : newvalue (optional)
Status : Stable
...
...
@@ -1936,7 +1936,7 @@ sub description {
Title : version
Usage : $obj->version()
Function:
Returns :
value of version
Returns :
String
Args :
Status : Stable
...
...
@@ -1954,7 +1954,7 @@ sub version {
Title : stable_id
Usage : $obj->stable_id
Function:
Returns :
value of stable_id
Returns :
String
Args :
Status : Stable
...
...
@@ -2612,7 +2612,7 @@ sub _compare_xrefs {
lazy-loaded. It will also call the equivalent
method on any translation and on all exons of the
transcript.
Return
s
: No
thing.
Return
type
: No
ne
=cut
...
...
@@ -2649,6 +2649,27 @@ sub load {
}
## end sub load
=head2 summary_as_hash
Example : $transcript_summary = $transcript->summary_as_hash();
Description : Retrieves a textual summary of this Transcript object.
Returns : hashref of descriptive strings
=cut
sub
summary_as_hash
{
my
$self
=
shift
;
my
%summary
;
$summary
{'
stable_id
'}
=
$self
->
stable_id
;
$summary
{'
description
'}
=
$self
->
description
;
$summary
{'
biotype
'}
=
$self
->
biotype
;
$summary
{'
start
'}
=
$self
->
start
;
$summary
{'
end
'}
=
$self
->
end
;
$summary
{'
strand
'}
=
$self
->
strand
;
$summary
{'
display_id
'}
=
$self
->
display_id
;
return
\
%summary
;
}
###########################
# DEPRECATED METHODS FOLLOW
...
...
This diff is collapsed.
Click to expand it.
modules/Bio/EnsEMBL/Translation.pm
+
20
−
3
View file @
01fd5893
...
...
@@ -526,7 +526,7 @@ sub modified_date {
a hash that maps old to new exons for a whole gene
Description: maps start end end exon according to mapping table.
If an exon is not mapped, just keep the old one.
Returntype: none
Returntype
: none
Exceptions : none
Caller : Transcript->transform()
Status : Stable
...
...
@@ -1122,7 +1122,7 @@ sub modify_translation {
an object needs to be fully loaded. This method
loads the parts of the object that are usually
lazy-loaded.
Returns :
Nothing.
Returns :
none
=cut
...
...
@@ -1161,7 +1161,7 @@ sub temporary_id {
=head2 get_all_DASFactories
Function : Retrieves a listref of registered DAS objects
Returntype: DAS
o
bjects
Returntype:
Listref of
DAS
O
bjects
Exceptions: none
Caller : webcode
Example : $dasref = $prot->get_all_DASFactories;
...
...
@@ -1201,5 +1201,22 @@ sub get_all_DAS_Features{
return
$self
->
SUPER::
get_all_DAS_Features
(
$slice
);
}
=head2 summary_as_hash
Example : $gene_summary = $gene->summary_as_hash();
Description : Retrieves a textual summary of this Gene object.
Returns : hashref of descriptive strings
=cut
sub
summary_as_hash
{
my
$self
=
shift
;
my
%summary
;
$summary
{'
stable_id
'}
=
$self
->
stable_id
;
$summary
{'
display_id
'}
=
$self
->
display_id
;
$summary
{'
genomic_start
'}
=
$self
->
genomic_start
;
$summary
{'
genomic_end
'}
=
$self
->
genomic_end
;
return
\
%summary
;
}
1
;
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