Commit 7bbabe51 authored by Nick Langridge's avatar Nick Langridge
Browse files

only fetch genomic unit for ensemblgenomes

parent d25ee587
...@@ -49,7 +49,6 @@ GetOptions( ...@@ -49,7 +49,6 @@ GetOptions(
"inifile=s", \$inifile, "site_type=s", \$site_type, "inifile=s", \$inifile, "site_type=s", \$site_type,
); );
#$site_type = $site_type ? lc($site_type) : 'ensembl';
$ind ||= 'ALL'; $ind ||= 'ALL';
$dir ||= "."; $dir ||= ".";
$release ||= 'LATEST'; $release ||= 'LATEST';
...@@ -285,7 +284,7 @@ sub dumpGene { ...@@ -285,7 +284,7 @@ sub dumpGene {
my $want_species_orthologs; my $want_species_orthologs;
my $ortholog_lookup; my $ortholog_lookup;
if ($site_type =~ /^Ensembl$/i) { if ($site_type =~ /^ensembl$/i) {
my $orth_target_species; my $orth_target_species;
( $orth_target_species = lcfirst($dbspecies) ) =~ s/\s/_/; ( $orth_target_species = lcfirst($dbspecies) ) =~ s/\s/_/;
if ( $want_species_orthologs = if ( $want_species_orthologs =
...@@ -386,10 +385,13 @@ WHERE ...@@ -386,10 +385,13 @@ WHERE
my $dbh = DBI->connect( "$dsn:$DBNAME", $user, $pass ) my $dbh = DBI->connect( "$dsn:$DBNAME", $user, $pass )
or die "DBI::error"; or die "DBI::error";
# determine genomic unit # determine genomic unit (EG only)
my $division = $dbh->selectrow_array("SELECT meta_value FROM meta WHERE meta_key = 'species.division'"); my $genomic_unit;
(my $genomic_unit = lc($division)) =~ s/^ensembl//; # eg EnsemblProtists -> protists if ($site_type =~ /^ensemblgenomes$/i) {
warn "Genomic unit: " . ($genomic_unit || 'n/a'); my $division = $dbh->selectrow_array("SELECT meta_value FROM meta WHERE meta_key = 'species.division'");
($genomic_unit = lc($division)) =~ s/^ensembl//; # eg EnsemblProtists -> protists
warn "Genomic unit: " . $genomic_unit . "\n";
}
# SNP query # SNP query
my $snp_sth = eval { my $snp_sth = eval {
......
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