dbSNP MappingChromosome
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
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'}
Included modules
ImportUtils qw ( debug load create_and_load dumpSQL )
Inherit
dbSNP::GenericContig
Synopsis
No synopsis!
Description
No description!
Methods
variation_feature
No description
Code
Methods description
None available.
Methods code
variation_featuredescriptionprevnextTop
sub variation_feature {
  my $self = shift;

  my (%rec,%source,%status,%rec_pos,%rec_seq_region,$three_mappings);


  debug("Dumping Variation");

  # Create hashes of variation_id's, source_id's etc keyed by variation name
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(); #we need to create a seq_region table
$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)) }); # Create hash of top-level seq_region_id keyed by seq_region_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();
}
General documentation
No general documentation available.