5 use Bio
::Chado
::Schema
;
7 use CXGN
::DB
::InsertDBH
;
18 my $dbh = CXGN
::DB
::InsertDBH
->new( { dbhost
=>$dbhost,
20 dbargs
=> {AutoCommit
=> 1,
27 my $schema= Bio
::Chado
::Schema
->connect( sub { $dbh->get_actual_dbh() });
30 open (my $file_fh, "<", $file ) || die ("\nERROR: the file $file could not be found\n" );
32 my $header = <$file_fh>;
33 while (my $line = <$file_fh>) {
35 my ($plot,$row,$col) = split("\t", $line);
38 my $rs = $schema->resultset("Stock::Stock")->search({uniquename
=> $plot });
40 if ($rs->count()== 1) {
42 print STDERR
"The plots $plot was found.\n Loading row $row col $col\n";
43 $r->create_stockprops({row_number
=> $row, col_number
=> $col}, {autocreate
=> 1});
48 print STDERR
"WARNING! $plot was not found in the database.\n";