Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
665868be
Commit
665868be
authored
Sep 15, 2011
by
Kieron Taylor
😠
Browse files
Added summary methods for use in Region Report
Minor POD corrections
parent
62ba590a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
6 deletions
+99
-6
modules/Bio/EnsEMBL/Feature.pm
modules/Bio/EnsEMBL/Feature.pm
+17
-0
modules/Bio/EnsEMBL/Gene.pm
modules/Bio/EnsEMBL/Gene.pm
+19
-0
modules/Bio/EnsEMBL/Slice.pm
modules/Bio/EnsEMBL/Slice.pm
+19
-0
modules/Bio/EnsEMBL/Transcript.pm
modules/Bio/EnsEMBL/Transcript.pm
+19
-0
modules/Bio/EnsEMBL/Translation.pm
modules/Bio/EnsEMBL/Translation.pm
+21
-2
modules/Bio/EnsEMBL/Utils/Iterator.pm
modules/Bio/EnsEMBL/Utils/Iterator.pm
+4
-4
No files found.
modules/Bio/EnsEMBL/Feature.pm
View file @
665868be
...
...
@@ -1429,7 +1429,24 @@ sub get_nearest_Gene {
}
=head2 summary_as_hash
Example : $feature_summary = $feature->summary_as_hash();
Description : Retrieves a textual summary of this Feature.
Should be overidden by subclasses for specific tweaking
Returns : hashref of arrays of descriptive strings
Status : Intended for internal use
=cut
sub
summary_as_hash
{
my
$self
=
shift
;
my
%summary
;
$summary
{'
ID
'}
=
$self
->
display_id
;
$summary
{'
start
'}
=
$self
->
start
;
$summary
{'
end
'}
=
$self
->
end
;
$summary
{'
strand
'}
=
$self
->
strand
;
return
\
%summary
;
}
...
...
modules/Bio/EnsEMBL/Gene.pm
View file @
665868be
...
...
@@ -1473,6 +1473,25 @@ sub is_reference{
return
$self
->
{'
is_ref
'};
}
=head2 summary_as_hash
Example : $gene_summary = $gene->summary_as_hash();
Description : Extends Feature::summary_as_hash
Retrieves a summary of this Gene object.
Returns : hashref of arrays of descriptive strings
Status : Intended for internal use
=cut
sub
summary_as_hash
{
my
$self
=
shift
;
my
$summary_ref
=
$self
->
SUPER::
summary_as_hash
;
$summary_ref
->
{'
description
'}
=
$self
->
description
;
$summary_ref
->
{'
biotype
'}
=
$self
->
biotype
;
return
$summary_ref
;
}
###########################
# DEPRECATED METHODS FOLLOW
###########################
...
...
modules/Bio/EnsEMBL/Slice.pm
View file @
665868be
...
...
@@ -3447,6 +3447,25 @@ sub add_synonym{
return
;
}
=head2 summary_as_hash
Example : $slice_summary = $slice->summary_as_hash();
Description : Retrieves a textual summary of this slice.
Returns : hashref of descriptive strings
=cut
sub
summary_as_hash
{
my
$self
=
shift
;
my
%summary
;
$summary
{'
display_id
'}
=
$self
->
display_id
;
$summary
{'
start
'}
=
$self
->
start
;
$summary
{'
end
'}
=
$self
->
end
;
$summary
{'
strand
'}
=
$self
->
strand
;
$summary
{'
Is_circular
'}
=
$self
->
is_circular
?
"
true
"
:
"
false
";
$summary
{'
region_name
'}
=
$self
->
seq_region_name
();
return
\
%summary
;
}
#
# Bioperl Bio::PrimarySeqI methods:
#
...
...
modules/Bio/EnsEMBL/Transcript.pm
View file @
665868be
...
...
@@ -2650,6 +2650,25 @@ sub load {
}
## end sub load
=head2 summary_as_hash
Example : $transcript_summary = $transcript->summary_as_hash();
Description : Extends Feature::summary_as_hash
Retrieves a summary of this Transcript.
Returns : hashref of descriptive strings
Status : Intended for internal use
=cut
sub
summary_as_hash
{
my
$self
=
shift
;
my
$summary_ref
=
$self
->
SUPER::
summary_as_hash
;
$summary_ref
->
{'
description
'}
=
$self
->
description
;
$summary_ref
->
{'
biotype
'}
=
$self
->
biotype
;
my
$parent_gene
=
$self
->
get_nearest_Gene
;
$summary_ref
->
{'
Parent
'}
=
$parent_gene
->
display_id
;
return
$summary_ref
;
}
###########################
# DEPRECATED METHODS FOLLOW
###########################
...
...
modules/Bio/EnsEMBL/Translation.pm
View file @
665868be
...
...
@@ -150,7 +150,7 @@ sub new_fast {
with this translation object.
Exceptions : Throws if there is no adaptor or no dbID defined for
the translation object.
Returntype : Bio::EnsEMBL::Transcript
=cut
sub
transcript
{
...
...
@@ -170,7 +170,7 @@ sub transcript {
my
$adaptor
=
$self
->
adaptor
;
if
(
!
defined
(
$adaptor
)
)
{
throw
(
"
Adaptor is not set for translation,
"
.
"
can not fe
c
th its transcript.
"
);
.
"
can not fet
c
h its transcript.
"
);
}
my
$dbID
=
$self
->
{'
dbID
'};
...
...
@@ -1204,5 +1204,24 @@ sub get_all_DAS_Features{
return
$self
->
SUPER::
get_all_DAS_Features
(
$slice
);
}
=head2 summary_as_hash
Example : $translation_summary = $translation->summary_as_hash();
Description : Retrieves a textual summary of this Translation.
Not inherited from Feature.
Returns : hashref of arrays of descriptive strings
Status : Intended for internal use
=cut
sub
summary_as_hash
{
my
$self
=
shift
;
my
%summary
;
$summary
{'
display_id
'}
=
$self
->
display_id
;
$summary
{'
genomic_start
'}
=
$self
->
genomic_start
;
$summary
{'
genomic_end
'}
=
$self
->
genomic_end
;
my
$transcript
=
$self
->
transcript
;
$summary
{'
Parent
'}
=
$transcript
->
display_id
;
return
\
%summary
;
}
1
;
modules/Bio/EnsEMBL/Utils/Iterator.pm
View file @
665868be
...
...
@@ -135,7 +135,7 @@ sub new {
Example : $obj = $iterator->next
Description: returns the next object from this iterator, or undef if the iterator is exhausted
Returntype :
the return
type will depend on what this iterator is iterating over
Returntype :
Object
type will depend on what this iterator is iterating over
Exceptions : none
Caller : general
Status : Experimental
...
...
@@ -153,7 +153,7 @@ sub next {
=head2 has_next
Example : if ($iterator->has_next) { my $obj = $iterator->next }
Description:
returns
true if this iterator has more elements to fetch, false when
Description:
Boolean -
true if this iterator has more elements to fetch, false when
it is exhausted
Returntype : boolean
Exceptions : none
...
...
@@ -176,7 +176,7 @@ sub has_next {
Description: returns the next object from this iterator, or undef if the iterator is exhausted,
much like next but does not advance the iterator (so the same object will be
returned on the following call to next or peek)
Returntype :
the return
type will depend on what this iterator is iterating over
Returntype :
Object
type will depend on what this iterator is iterating over
Exceptions : none
Caller : general
Status : Experimental
...
...
@@ -403,7 +403,7 @@ sub skip {
first element in the set
Argument[2]: (optional) an initial value to use for the accumulator instead
of the first value of the set
Returntype :
the same as the
return
type of the coderef
Returntype : returntype of the coderef
Exceptions : thrown if the argument is not a coderef
Caller : general
Status : Experimental
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment