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
796de42a
Commit
796de42a
authored
Jan 09, 2012
by
Monika Komorowska
Browse files
populate biotype column in transcript_stable_id table
parent
38f51196
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
misc-scripts/xref_mapping/XrefMapper/CoreInfo.pm
misc-scripts/xref_mapping/XrefMapper/CoreInfo.pm
+17
-3
No files found.
misc-scripts/xref_mapping/XrefMapper/CoreInfo.pm
View file @
796de42a
...
...
@@ -102,7 +102,7 @@ sub set_status_for_source_from_core{
sub
load_gene_transcript_translation
{
my
(
$self
)
=
shift
;
my
$ins_sth
=
$self
->
xref
->
dbc
->
prepare
("
insert into gene_transcript_translation (gene_id, transcript_id, translation_id) values (?, ?, ?)
");
my
$sql
=
"
select tn.gene_id, tn.transcript_id, tl.translation_id from transcript tn left join translation tl on tl.transcript_id = tn.transcript_id
";
...
...
@@ -121,8 +121,9 @@ sub load_gene_transcript_translation{
sub
load_stable_ids
{
my
(
$self
)
=
shift
;
my
(
$id
,
$stable_id
);
foreach
my
$table
(
qw(gene transcript translation)
){
my
(
$id
,
$stable_id
,
$biotype
);
foreach
my
$table
(
qw(gene translation)
){
my
$sth
=
$self
->
core
->
dbc
->
prepare
("
select
"
.
$table
.
"
_id, stable_id from
"
.
$table
);
my
$ins_sth
=
$self
->
xref
->
dbc
->
prepare
("
insert into
"
.
$table
.
"
_stable_id (internal_id, stable_id) values(?, ?)
");
$sth
->
execute
();
...
...
@@ -133,6 +134,19 @@ sub load_stable_ids{
$ins_sth
->
finish
;
$sth
->
finish
;
}
#populate transcript_stable_id table incuding the biotype column
my
$table
=
"
transcript
";
my
$sth
=
$self
->
core
->
dbc
->
prepare
("
select
"
.
$table
.
"
_id, stable_id, biotype from
"
.
$table
);
my
$ins_sth
=
$self
->
xref
->
dbc
->
prepare
("
insert into
"
.
$table
.
"
_stable_id (internal_id, stable_id, biotype) values(?, ?, ?)
");
$sth
->
execute
();
$sth
->
bind_columns
(
\
$id
,
\
$stable_id
,
\
$biotype
);
while
(
$sth
->
fetch
){
$ins_sth
->
execute
(
$id
,
$stable_id
,
$biotype
);
}
$ins_sth
->
finish
;
$sth
->
finish
;
return
;
}
1
;
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