From 36705e45ed6ef10b80f599b5c81eff0666e463a5 Mon Sep 17 00:00:00 2001 From: Steve Trevanion <st3@sanger.ac.uk> Date: Wed, 6 Oct 2004 17:12:21 +0000 Subject: [PATCH] removes all traces of supercontigs --- .../SeqStoreConverter/vega/HomoSapiens.pm | 23 +++++++++++++++++++ .../SeqStoreConverter/vega/MusMusculus.pm | 21 +++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/misc-scripts/surgery/SeqStoreConverter/vega/HomoSapiens.pm b/misc-scripts/surgery/SeqStoreConverter/vega/HomoSapiens.pm index 4b907f96eb..379ec13a40 100644 --- a/misc-scripts/surgery/SeqStoreConverter/vega/HomoSapiens.pm +++ b/misc-scripts/surgery/SeqStoreConverter/vega/HomoSapiens.pm @@ -61,4 +61,27 @@ sub update_clone_info { return; } +sub remove_supercontigs { + my $self = shift; + + my $target = $self->target(); + my $dbh = $self->dbh(); + $self->debug("Vega mouse specific - removing supercontigs from $target"); + + $dbh->do("DELETE FROM $target.meta ". + "WHERE meta_value like '%supercontig%'"); + + $dbh->do("DELETE FROM $target.coord_system ". + "WHERE name like 'supercontig'"); + + $dbh->do("DELETE $target.assembly ". + "FROM $target.assembly a, $target.seq_region sr ". + "WHERE sr.coord_system_id = 2 ". + "and a.asm_seq_region_id = sr.seq_region_id"); + + $dbh->do("DELETE FROM $target.seq_region ". + "WHERE coord_system_id = 2"); +} + + 1; diff --git a/misc-scripts/surgery/SeqStoreConverter/vega/MusMusculus.pm b/misc-scripts/surgery/SeqStoreConverter/vega/MusMusculus.pm index 7f30fea1ae..8a77eb679d 100644 --- a/misc-scripts/surgery/SeqStoreConverter/vega/MusMusculus.pm +++ b/misc-scripts/surgery/SeqStoreConverter/vega/MusMusculus.pm @@ -60,5 +60,26 @@ sub update_clone_info { return; } +sub remove_supercontigs { + my $self = shift; + + my $target = $self->target(); + my $dbh = $self->dbh(); + $self->debug("Vega mouse specific - removing supercontigs from $target"); + + $dbh->do("DELETE FROM $target.meta ". + "WHERE meta_value like '%supercontig%'"); + + $dbh->do("DELETE FROM $target.coord_system ". + "WHERE name like 'supercontig'"); + + $dbh->do("DELETE $target.assembly ". + "FROM $target.assembly a, $target.seq_region sr ". + "WHERE sr.coord_system_id = 2 ". + "and a.asm_seq_region_id = sr.seq_region_id"); + + $dbh->do("DELETE FROM $target.seq_region ". + "WHERE coord_system_id = 2"); +} 1; -- GitLab