Privates (from "my" definitions)
$host = $self->{'dbVar'}->host()
$new_seq_region_end = $end
$seq_region_id = $rec_seq_region{$seq_region_name}
$sth = $self->{'dbCore'}->dbc->prepare (qq{SELECT seq_region_id from seq_region where name = ?})
($coord_sys,$assembly,$seq_region_name,$seq_region_start,$seq_region_end,$version);
$new_seq_region_start = $start
@ar = split /\//, $mapping_file_dir
($ref_id, $slice_name, $start, $end, $strand, $ratio) = split
$dbname = $self->{'dbVar'}->dbname()
$mapping_file_dir = $self->{'mapping_file_dir'}
None available.
sub variation_feature
{ my $self = shift;
my (%rec,%source,%status,%rec_pos,%rec_seq_region,$three_mappings);
debug("Dumping Variation");
my ($variation_id,$name,$source_id,$validation_status);
my $sth = $self->{'dbVar'}->prepare (qq{SELECT variation_id, name, source_id, validation_status
FROM variation});
$sth->execute();
$sth->bind_columns(\$variation_id,\$name,\$source_id,\$validation_status);
while($sth->fetch){
$rec{$name} = $variation_id;
$source{$name} = $source_id;
$status{$name} = $validation_status ? $validation_status : '\N';
}
$sth->finish();
$self->{'dbVar'}->do(qq{CREATE TABLE IF NOT EXISTS seq_region(
seq_region_id int(10),
name varchar(40),
primary key (seq_region_id),
unique key (name))
});
my ($seq_region_id,$seq_region_name);
my $sth1 = $self->{'dbCore'}->dbc->prepare (qq{
select sr.seq_region_id, sr.name
from seq_region sr, seq_region_attrib sra, attrib_type at
where sr.seq_region_id=sra.seq_region_id
and sra.attrib_type_id = at.attrib_type_id
and at.code="toplevel" } );
$sth1->execute();
$sth1->bind_columns(\$seq_region_id,\$seq_region_name);
while ($sth1->fetch) {
$rec_seq_region{$seq_region_name} = $seq_region_id;
$self->{'dbVar'}->do(qq{INSERT IGNORE INTO seq_region(seq_region_id,name)values($seq_region_id,"$seq_region_name")});
}
$sth1->finish(); } |