#!/usr/bin/perl -s

use MBGD;

$DB1 = "dbi:mysql:mbgd_accum" if (! $DB1);
$DB2 = "dbi:mysql:mbgd" if (! $DB2);


$TYPE  = 'Genome' if (! $TYPE);
$TYPE = "MBGD::$TYPE" if ($TYPE !~ /^MBGD::/);

print STDERR "$DB1 => $DB2 ($TYPE)\n";

$db1 = MBGD::DB->new($DB1);
$db2 = MBGD::DB->new($DB2);
@keys = split(/,/, $keys);
$opt = {depth=>$depth} if ($depth);

foreach $d (${TYPE}->get($db1, \@keys, $opt)) {
	$d->print_tab;
	$d->store($db2);
}
