Skip to content
Snippets Groups Projects
Commit 9cd98113 authored by Monika Komorowska's avatar Monika Komorowska
Browse files

make sure dbs flagged as having variation positions changed have a variation db

parent c46f7c7e
No related branches found
No related tags found
No related merge requests found
......@@ -268,6 +268,7 @@ if ($response == 3) {
#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";
......
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