3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
25 package SeqStoreConverter::DrosophilaMelanogaster;
32 sub create_coord_systems {
35 $self->debug(
"DrosophilaMelanogaster Specific: creating " .
36 "chunk and chromosome coord systems");
38 my $target = $self->target();
39 my $dbh = $self->dbh();
41 my $ass_def = $self->get_default_assembly();
44 ([
"chromosome" , $ass_def,
"default_version", 1 ],
45 [
"chunk", undef ,
"default_version,sequence_level", 2]);
47 my @assembly_mappings = (
"chromosome:$ass_def|chunk");
49 $self->debug(
"Building coord_system table");
51 my $sth = $dbh->prepare(
"INSERT INTO $target.coord_system " .
52 "(name, version, attrib, rank) VALUES (?,?,?,?)");
56 foreach my $cs (@coords) {
58 $coord_system_ids{$cs->[0]} = $sth->{
'mysql_insertid'};
62 $self->debug(
"Adding assembly.mapping entries to meta table");
64 $sth = $dbh->prepare(
"INSERT INTO $target.meta(meta_key, meta_value) " .
65 "VALUES ('assembly.mapping', ?)");
67 foreach my $mapping (@assembly_mappings) {
68 $sth->execute($mapping);
78 sub create_seq_regions {
81 $self->debug(
"DrosophilaMelanogaster Specific: creating chunk and " .
82 "chromosome seq_regions");
84 $self->contig_to_seq_region(
'chunk');
85 $self->chromosome_to_seq_region();
92 $self->debug(
"DrosophilaMelanogaster Specific: loading assembly data");
94 $self->assembly_contig_chromosome();