Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl
Commits
cffc4712
Commit
cffc4712
authored
Jun 21, 2018
by
Marek Szuba
Browse files
RNAProduct: implement basic type_id support
parent
db7f244b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
modules/Bio/EnsEMBL/RNAProduct.pm
modules/Bio/EnsEMBL/RNAProduct.pm
+29
-1
No files found.
modules/Bio/EnsEMBL/RNAProduct.pm
View file @
cffc4712
...
...
@@ -101,6 +101,12 @@ sub new { ## no critic (Subroutines::RequireArgUnpacking)
my
$class
=
ref
(
$caller
)
||
$caller
;
# For an unspecialised rnaproduct object, set the type to "generic mature
# RNA". Ideally we would look the corresponding ID up in rnaproduct_type,
# then again that would make this dependent on the database connection...
# Maybe we should just store a string code instead? Either way, FIXME.
my
$type_id
=
0
;
my
(
$seq_start
,
$seq_end
,
$stable_id
,
$version
,
$dbID
,
$adaptor
,
$seq
,
$created_date
,
$modified_date
)
=
rearrange
(["
SEQ_START
",
"
SEQ_END
",
"
STABLE_ID
",
"
VERSION
",
"
DBID
",
...
...
@@ -120,7 +126,8 @@ sub new { ## no critic (Subroutines::RequireArgUnpacking)
'
dbID
'
=>
$dbID
,
'
seq
'
=>
$seq
,
'
created_date
'
=>
$created_date
,
'
modified_date
'
=>
$modified_date
'
modified_date
'
=>
$modified_date
,
'
type_id
'
=>
$type_id
},
$class
;
$self
->
adaptor
(
$adaptor
);
...
...
@@ -802,6 +809,27 @@ sub transcript {
}
=head2 type_id
Example : my $rp_type_id = $rnaproduct->type();
Description: Getter for the RNAProduct type (e.g. miRNA, circRNA, ...).
The type is expressed as a numerical ID and it is up to the
user to look the details up in rnaproduct_type; it has been
implemented this way because at this point it hasn't been
decided whether we need to expose this to users at all.
Returntype : int
Exceptions : none
Caller : ?
Status : In Development
=cut
sub
type_id
{
my
$self
=
shift
;
return
$self
->
{'
type_id
'};
}
=head2 version
Arg [1] : (optional) string $version - version to set
...
...
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