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
9c4944b5
Commit
9c4944b5
authored
Mar 18, 2019
by
Marek Szuba
Browse files
RNAProductAdaptor: exon support in retrieval
parent
4760a398
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
modules/Bio/EnsEMBL/DBSQL/RNAProductAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/RNAProductAdaptor.pm
+16
-4
No files found.
modules/Bio/EnsEMBL/DBSQL/RNAProductAdaptor.pm
View file @
9c4944b5
...
...
@@ -457,7 +457,8 @@ sub _fetch_direct_query {
my
$sql
=
sprintf
("
SELECT rp.rnaproduct_id, pt.code, rp.transcript_id,
"
.
"
rp.seq_start, rp.seq_end, rp.stable_id, rp.version, %s, %s
"
.
"
rp.seq_start, rp.start_exon_id, rp.seq_end, rp.end_exon_id,
"
.
"
rp.stable_id, rp.version, %s, %s
"
.
"
FROM rnaproduct rp JOIN rnaproduct_type pt
"
.
"
ON rp.rnaproduct_type_id = pt.rnaproduct_type_id
"
.
"
WHERE %s = ?
",
...
...
@@ -488,15 +489,24 @@ sub _obj_from_sth {
my
$sql_data
=
$sth
->
fetchall_arrayref
();
my
$transcript_adaptor
=
$self
->
db
()
->
get_TranscriptAdaptor
();
while
(
my
$row_ref
=
shift
@
{
$sql_data
})
{
my
(
$rnaproduct_id
,
$type_code
,
$transcript_id
,
$seq_start
,
$seq_end
,
$stable_id
,
$version
,
$created_date
,
$modified_date
)
=
@
{
$row_ref
};
my
(
$rnaproduct_id
,
$type_code
,
$transcript_id
,
$seq_start
,
$start_exon_id
,
$seq_end
,
$end_exon_id
,
$stable_id
,
$version
,
$created_date
,
$modified_date
)
=
@
{
$row_ref
};
if
(
!
defined
(
$rnaproduct_id
))
{
push
@return_data
,
undef
;
next
;
}
my
$exon_adaptor
=
$self
->
db
()
->
get_ExonAdaptor
();
my
(
$start_exon
,
$end_exon
);
if
(
defined
$start_exon_id
)
{
$start_exon
=
$exon_adaptor
->
fetch_by_dbID
(
$start_exon_id
);
}
if
(
defined
$end_exon_id
)
{
$end_exon
=
$exon_adaptor
->
fetch_by_dbID
(
$end_exon_id
);
}
my
$class_name
=
Bio::EnsEMBL::Utils::RNAProductTypeMapper::
mapper
()
->
type_code_to_class
(
$type_code
);
my
$rnaproduct
=
$class_name
->
new_fast
(
{
...
...
@@ -505,6 +515,8 @@ sub _obj_from_sth {
'
adaptor
'
=>
$self
,
'
start
'
=>
$seq_start
,
'
end
'
=>
$seq_end
,
'
start_exon
'
=>
$start_exon
,
'
end_exon
'
=>
$end_exon
,
'
stable_id
'
=>
$stable_id
,
'
version
'
=>
$version
,
'
created_date
'
=>
$created_date
||
undef
,
...
...
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