#get species for new dbs or changed assembly or where variation positions have changed
@core_with_variation = map { $_->[0] } @{ $prod_dbh->selectall_arrayref("select distinct concat(full_db_name,'|',db_host) from db_list dl join db d using (db_id) where db_release = $current_release and db_type = 'core' and species_id in (select distinct species_id from db where db_release = $current_release and db_type = 'variation');") };
#this sql relies on variation changed flag in change log
@chg_variation = map { $_->[0] } @{ $prod_dbh->selectall_arrayref("select distinct concat(full_db_name,'|',db_host) from db_list dl join db d using (db_id) where db_type = 'core' and is_current = 1 and species_id in (select distinct species_id from changelog_species cs join changelog c using (changelog_id) where release_id = $current_release and status not in ('cancelled','postponed') and variation_pos_changed = 'Y')") };
my %core_with_variation = map { $_ => 1 } @core_with_variation;
...
...
@@ -282,8 +283,16 @@ if ($response == 3) {
}
}
#make sure dbs flagged having variation positions changed, have a varition db
my @chg_var;
foreach my $element (@chg_variation) {
if (exists($core_with_variation{$element}) ) {
push (@chg_var, $element);
}
}
my %array_union = ();
foreach my $element (@new_sp_assem_var, @chg_variation) { $array_union{$element}++ }
foreach my $element (@new_sp_assem_var, @chg_var) { $array_union{$element}++ }
my @dbnames_hosts = sort(keys %array_union);
my $file_path = "$outdir/variation_density_data.txt";