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
5c4a5763
Commit
5c4a5763
authored
Apr 24, 2006
by
Patrick Meidl
Browse files
changed display_id() to be more inventive to give the object a name
parent
23e02a2b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
30 deletions
+26
-30
modules/Bio/EnsEMBL/Exon.pm
modules/Bio/EnsEMBL/Exon.pm
+6
-5
modules/Bio/EnsEMBL/Gene.pm
modules/Bio/EnsEMBL/Gene.pm
+4
-3
modules/Bio/EnsEMBL/PredictionTranscript.pm
modules/Bio/EnsEMBL/PredictionTranscript.pm
+4
-4
modules/Bio/EnsEMBL/Transcript.pm
modules/Bio/EnsEMBL/Transcript.pm
+8
-15
modules/Bio/EnsEMBL/Translation.pm
modules/Bio/EnsEMBL/Translation.pm
+4
-3
No files found.
modules/Bio/EnsEMBL/Exon.pm
View file @
5c4a5763
...
...
@@ -793,7 +793,7 @@ sub peptide {
return
Bio::
Seq
->
new
(
-
seq
=>
$pep_str
,
-
moltype
=>
'
protein
',
-
alphabet
=>
'
protein
',
-
id
=>
$self
->
stable
_id
);
-
id
=>
$self
->
display
_id
);
}
...
...
@@ -841,7 +841,7 @@ sub seq {
}
return
Bio::
Seq
->
new
(
-
seq
=>
$self
->
{'
_seq_cache
'},
-
id
=>
$self
->
stable
_id
,
-
id
=>
$self
->
display
_id
,
-
moltype
=>
'
dna
');
}
...
...
@@ -910,8 +910,9 @@ sub hashkey {
Arg [1] : none
Example : print $exons->display_id();
Description: This method returns a string that is considered to be
the 'display' identifier. For exons this is the stable id if
it is available otherwise it is an empty string.
the 'display' identifier. For exons this is (depending on
availability and in this order) the stable Id, the dbID or an
empty string.
Returntype : string
Exceptions : none
Caller : web drawing code
...
...
@@ -921,7 +922,7 @@ sub hashkey {
sub
display_id
{
my
$self
=
shift
;
return
$self
->
{'
stable_id
'}
||
'';
return
$self
->
{'
stable_id
'}
||
$self
->
dbID
||
'';
}
...
...
modules/Bio/EnsEMBL/Gene.pm
View file @
5c4a5763
...
...
@@ -949,8 +949,9 @@ sub recalculate_coordinates {
Arg [1] : none
Example : print $gene->display_id();
Description: This method returns a string that is considered to be
the 'display' identifier. For genes this is the stable id if
it is available otherwise it is an empty string.
the 'display' identifier. For genes this is (depending on
availability and in this order) the stable Id, the dbID or an
empty string.
Returntype : string
Exceptions : none
Caller : web drawing code
...
...
@@ -960,7 +961,7 @@ sub recalculate_coordinates {
sub
display_id
{
my
$self
=
shift
;
return
$self
->
{'
stable_id
'}
||
'';
return
$self
->
{'
stable_id
'}
||
$self
->
dbID
||
'';
}
...
...
modules/Bio/EnsEMBL/PredictionTranscript.pm
View file @
5c4a5763
...
...
@@ -456,9 +456,9 @@ sub get_all_Exons {
Arg [1] : none
Example : print $rf->display_id();
Description: This method returns a string that is considered to be
the 'display' identifier.
For prediction transcripts this is
the stable_id if it is available otherwise it is an empty
string.
the 'display' identifier. For prediction transcripts this is
(depending on availability and in this order) the stable Id, the
dbID or an empty
string.
Returntype : string
Exceptions : none
Caller : web drawing code
...
...
@@ -468,7 +468,7 @@ sub get_all_Exons {
sub
display_id
{
my
$self
=
shift
;
return
$self
->
stable_id
()
||
'';
return
$self
->
stable_id
||
$self
->
dbID
||
'';
}
...
...
modules/Bio/EnsEMBL/Transcript.pm
View file @
5c4a5763
...
...
@@ -1276,7 +1276,7 @@ sub five_prime_utr {
return
undef
if
(
!
$seq
);
return
Bio::
Seq
->
new
(
-
DISPLAY_ID
=>
$self
->
stable
_id
,
-
DISPLAY_ID
=>
$self
->
display
_id
,
-
MOLTYPE
=>
'
dna
',
-
SEQ
=>
$seq
);
}
...
...
@@ -1311,7 +1311,7 @@ sub three_prime_utr {
return
undef
if
(
!
$seq
);
return
Bio::
Seq
->
new
(
-
DISPLAY_ID
=>
$self
->
stable
_id
,
-
DISPLAY_ID
=>
$self
->
display
_id
,
-
MOLTYPE
=>
'
dna
',
-
SEQ
=>
$seq
);
}
...
...
@@ -1419,15 +1419,7 @@ sub translate {
}
my
$mrna
=
$self
->
translateable_seq
();
my
$display_id
;
if
(
defined
$self
->
translation
->
stable_id
)
{
$display_id
=
$self
->
translation
->
stable_id
;
}
elsif
(
defined
$self
->
translation
->
dbID
)
{
$display_id
=
$self
->
translation
->
dbID
();
}
else
{
#use memory location as temp id
$display_id
=
scalar
(
$self
->
translation
());
}
my
$display_id
=
$self
->
translation
->
display_id
||
scalar
(
$self
->
translation
);
# remove final stop codon from the mrna if it is present
# produced peptides will not have '*' at end
...
...
@@ -1488,7 +1480,7 @@ sub translate {
sub
seq
{
my
(
$self
)
=
@_
;
return
Bio::
Seq
->
new
(
-
DISPLAY_ID
=>
$self
->
stable
_id
,
(
-
DISPLAY_ID
=>
$self
->
display
_id
,
-
MOLTYPE
=>
'
dna
',
-
SEQ
=>
$self
->
spliced_seq
);
}
...
...
@@ -2030,8 +2022,9 @@ sub recalculate_coordinates {
Arg [1] : none
Example : print $transcript->display_id();
Description: This method returns a string that is considered to be
the 'display' identifier. For transcripts this is the
stable id if it is available otherwise it is an empty string.
the 'display' identifier. For transcripts this is (depending on
availability and in this order) the stable Id, the dbID or an
empty string.
Returntype : string
Exceptions : none
Caller : web drawing code
...
...
@@ -2041,7 +2034,7 @@ sub recalculate_coordinates {
sub
display_id
{
my
$self
=
shift
;
return
$self
->
{'
stable_id
'}
||
'';
return
$self
->
{'
stable_id
'}
||
$self
->
dbID
||
'';
}
...
...
modules/Bio/EnsEMBL/Translation.pm
View file @
5c4a5763
...
...
@@ -511,8 +511,9 @@ sub get_all_DomainFeatures{
Arg [1] : none
Example : print $translation->display_id();
Description: This method returns a string that is considered to be
the 'display' identifier. For translations this is the
stable id if it is available otherwise it is an empty string.
the 'display' identifier. For translations this is (depending on
availability and in this order) the stable Id, the dbID or an
empty string.
Returntype : string
Exceptions : none
Caller : web drawing code
...
...
@@ -522,7 +523,7 @@ sub get_all_DomainFeatures{
sub
display_id
{
my
$self
=
shift
;
return
$self
->
{'
stable_id
'}
||
'';
return
$self
->
{'
stable_id
'}
||
$self
->
dbID
||
'';
}
...
...
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