Skip to content
Snippets Groups Projects
Commit 2d207ed0 authored by Ian Longden's avatar Ian Longden
Browse files

new code to work out the cmp seq regions that have multuple assemblys. This is...

new code to work out the cmp seq regions that have multuple assemblys. This is now stored in the seq_region_attrib table
parent 2285d12f
No related branches found
No related tags found
No related merge requests found
......@@ -126,28 +126,25 @@ sub cache_seq_ids_with_mult_assemblys{
my %multis;
return if (defined($self->{'multi_seq_ids'}));
$self->{'multi_seq_ids'} = {};
my $sql=(<<SQL);
SELECT a.cmp_seq_region_id, count(*) as count
FROM assembly a, seq_region s, coord_system c
WHERE a.asm_seq_region_id=s.seq_region_id and
c.coord_system_id = s.coord_system_id
GROUP BY a.cmp_seq_region_id, s.coord_system_id HAVING count >= 2
SELECT seq_region_id
FROM seq_region_attrib sra, attrib_type at
WHERE sra.attrib_type_id = at.attrib_type_id and code = "MultAssem"
SQL
my $sth = $self->prepare($sql);
$sth->execute();
my ($seq_region_id, $count);
$sth->bind_columns(\$seq_region_id, \$count);
my ($seq_region_id);
my %asm_registered;
$sth->bind_columns(\$seq_region_id);
while($sth->fetch()) {
$self->{'multi_seq_ids'}->{$seq_region_id} = $count;
$self->{'multi_seq_ids'}->{$seq_region_id} = 1;
}
$sth->finish;
}
......
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