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
473b3f1c
Commit
473b3f1c
authored
Mar 18, 2019
by
Marek Szuba
Browse files
RNAProductAdaptor: exon support in storing
parent
9c4944b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
modules/Bio/EnsEMBL/DBSQL/RNAProductAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/RNAProductAdaptor.pm
+16
-6
No files found.
modules/Bio/EnsEMBL/DBSQL/RNAProductAdaptor.pm
View file @
473b3f1c
...
...
@@ -332,9 +332,17 @@ sub store {
return
$rnaproduct
->
dbID
();
}
my
(
$start_exon_dbID
,
$end_exon_dbID
);
if
(
$rnaproduct
->
start_Exon
()
)
{
$start_exon_dbID
=
$rnaproduct
->
start_Exon
()
->
dbID
();
}
if
(
$rnaproduct
->
end_Exon
()
)
{
$end_exon_dbID
=
$rnaproduct
->
end_Exon
()
->
dbID
();
}
# Store rnaproduct
my
@columns
=
qw{ transcript_id seq_start s
eq_en
d }
;
my
@columns
=
qw{ transcript_id seq_start s
tart_exon_id seq_end end_exon_i
d }
;
# FIXME: maybe we do need a separate adaptor for this after all
my
@canned_columns
=
(
'
rnaproduct_type_id
'
);
...
...
@@ -358,19 +366,21 @@ sub store {
}
my
$column_string
=
join
('
,
',
@columns
,
@canned_columns
);
my
$value_string
=
join
('
,
',
(
'
?
'
)
x
@columns
,
@canned_values
);
my
$value_string
=
join
('
,
',
(
q{?}
)
x
@columns
,
@canned_values
);
my
$store_rnaproduct_sql
=
"
INSERT INTO rnaproduct (
$column_string
) VALUES (
$value_string
)
";
my
$rp_st
=
$self
->
prepare
(
$store_rnaproduct_sql
);
$rp_st
->
bind_param
(
1
,
$transcript_dbID
,
SQL_INTEGER
);
$rp_st
->
bind_param
(
2
,
$rnaproduct
->
start
(),
SQL_INTEGER
);
$rp_st
->
bind_param
(
3
,
$rnaproduct
->
end
(),
SQL_INTEGER
);
$rp_st
->
bind_param
(
3
,
$start_exon_dbID
,
SQL_INTEGER
);
$rp_st
->
bind_param
(
4
,
$rnaproduct
->
end
(),
SQL_INTEGER
);
$rp_st
->
bind_param
(
5
,
$end_exon_dbID
,
SQL_INTEGER
);
if
(
defined
(
$rnaproduct
->
stable_id
()))
{
$rp_st
->
bind_param
(
4
,
$rnaproduct
->
stable_id
(),
SQL_VARCHAR
);
$rp_st
->
bind_param
(
5
,
$rnaproduct
->
version
(),
SQL_INTEGER
);
$rp_st
->
bind_param
(
6
,
$rnaproduct
->
stable_id
(),
SQL_VARCHAR
);
$rp_st
->
bind_param
(
7
,
$rnaproduct
->
version
(),
SQL_INTEGER
);
}
$rp_st
->
bind_param
(
6
,
$rnaproduct
->
type_code
(),
SQL_VARCHAR
);
$rp_st
->
bind_param
(
8
,
$rnaproduct
->
type_code
(),
SQL_VARCHAR
);
$rp_st
->
execute
();
$rp_st
->
finish
();
...
...
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