Commit 01b38d32 authored by Mira Prosovetskaia's avatar Mira Prosovetskaia

Fix db load

parent bcfe6283
Pipeline #116504 failed with stage
in 1 minute and 13 seconds
......@@ -43,12 +43,11 @@ use base 'Bio::EnsEMBL::Test::MultiTestDB';
sub load_txt_dump {
my ($self, $txt_file, $tablename, $db) = @_;
if(index($txt_file, 'compressed_genotype_var') != -1) {
my $load = sprintf(q{LOAD DATA LOCAL INFILE '%s' INTO TABLE `%s`FIELDS ESCAPED BY '\\\\'
SET genotypes = UNHEX(@var1)}, $txt_file, $tablename);
my $load = sprintf(q{LOAD DATA LOCAL INFILE '%s' INTO TABLE `%s`FIELDS ESCAPED BY '\\\\' (variation_id, subsnp_id , @var1) SET genotypes = UNHEX(@var1)}, $txt_file, $tablename);
$db->do($load);
return $db;
} elsif (index($txt_file, 'compressed_genotype_region') != -1) {
my $load = sprintf(q{LOAD DATA LOCAL INFILE '%s' INTO TABLE `%s`FIELDS ESCAPED BY '\\\\' (sample_id, seq_region_id, seq_region_start, seq_region_end, seq_region_strand, @var1) SET genotypes = UNHEX(@var1)}, $txt_file, $tablename);
my $load = sprintf(q{LOAD DATA LOCAL INFILE '%s' INTO TABLE `%s`FIELDS ESCAPED BY '\\\\' (sample_id, seq_region_id, seq_region_start, seq_region_end, seq_region_strand, @var1) SET genotypes = UNHEX(@var1)}, $txt_file, $tablename);
$db->do($load);
return $db;
} else {
......@@ -56,7 +55,7 @@ sub load_txt_dump {
$db->do($load);
return $db;
}
}
sub create_and_use_db {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment