Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/EnsEMBL/Variation/Pipeline/FinishVariationClass.pm @ 0:1f6dce3d34e0
Uploaded
author | mahtabm |
---|---|
date | Thu, 11 Apr 2013 02:01:53 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1f6dce3d34e0 |
---|---|
1 package Bio::EnsEMBL::Variation::Pipeline::FinishVariationClass; | |
2 | |
3 use strict; | |
4 use warnings; | |
5 | |
6 use base qw(Bio::EnsEMBL::Variation::Pipeline::BaseVariationProcess); | |
7 | |
8 my $DEBUG = 0; | |
9 | |
10 sub run { | |
11 my $self = shift; | |
12 | |
13 my $temp_var_table = $self->required_param('temp_var_table'); | |
14 | |
15 my $temp_var_feat_table = $self->required_param('temp_var_feat_table'); | |
16 | |
17 my $var_dba = $self->get_species_adaptor('variation'); | |
18 | |
19 my $dbc = $var_dba->dbc; | |
20 | |
21 # copy the attribs across to the real tables | |
22 | |
23 $dbc->do(qq{ | |
24 UPDATE variation_feature vf, $temp_var_feat_table tvf | |
25 SET vf.class_attrib_id = tvf.class_attrib_id | |
26 WHERE vf.variation_feature_id = tvf.variation_feature_id | |
27 }); | |
28 | |
29 $dbc->do(qq{ | |
30 UPDATE variation v, $temp_var_table tv | |
31 SET v.class_attrib_id = tv.class_attrib_id | |
32 WHERE v.variation_id = tv.variation_id | |
33 }); | |
34 | |
35 # and get rid of the temp tables | |
36 $dbc->do(qq{DROP TABLE $temp_var_table}); | |
37 $dbc->do(qq{DROP TABLE $temp_var_feat_table}); | |
38 | |
39 return; | |
40 } | |
41 | |
42 1; | |
43 |