Skip to content
Snippets Groups Projects
Commit b3bc2302 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

default user is ensro and default port is 3306

if data_uri is defined, all connection details can be read for vega and core databases
source_prefix is read from data_uri as well, so no need to hard-code it in the module
if there is a source_prefix, it is a merged species, else, skip the module alltogether
parent 1a82b825
No related branches found
No related tags found
No related merge requests found
......@@ -27,47 +27,33 @@ sub run_script {
my ($type, $my_args) = split(/:/,$file);
my $host;
my ($host, $source_prefix);
my $user = "ensro";
if($my_args =~ /user[=][>](\S+?)[,]/){
$user = $1;
}
my %id2name = $self->species_id2name;
my $species_name = $id2name{$species_id}[0];
my $source_prefix;
if($species_name eq "homo_sapiens" ){
$source_prefix = "HGNC";
$host = "ens-staging1";
}
elsif($species_name eq "mus_musculus" ){
$source_prefix = "MGI";
$host = "ens-staging2";
}
elsif($species_name eq "danio_rerio" ){
$source_prefix = "ZFIN_ID";
$host = "ens-staging1";
if($my_args =~ /host[=][>](\S+?)[,]/){
$host = $1;
}
if($species_name eq "sus_scrofa" ){
$source_prefix = "PIGGY";
$host = "ens-staging2";
if ($my_args =~ /source[=][>](\S+?)[,]/){
$source_prefix = $1;
}
else{
my %id2name = $self->species_id2name;
my $species_name = $id2name{$species_id}[0];
if (!$source_prefix){
die "Species is $species_name and is not homo_sapiens, mus_musculus, danio_rerio or sus_scrofa, the only four valid species\n";
}
if($my_args =~ /host[=][>](\S+?)[,]/){
$host = $1;
}
my $vuser ="ensro";
my $vuser = "ensro";
my $vhost;
my $vport;
my $vport = 3306;
my $vdbname;
my $vpass;
my $cuser ="ensro";
my $chost;
my $cport;
my $cport = 3306;
my $cdbname;
my $cpass;
......
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