#!/usr/bin/env perl # populate sqlite db with content of __DATA__ use Data::Dumper::Concise; use FindBin; # warn $FindBin::Bin; use lib $FindBin::Bin . '/../lib'; use NGS::DB; my $db = NGS::DB->new(); # warn $db->dbix; my @data = split "\n", do { local $/; }; # warn Dumper @data; for my $pos(@data) { warn $pos; next if $db->dbix->select('locations', 1, { position => $pos })->list; warn 'here'; $db->dbix->insert('locations', { position => $pos, action => 'include' }) or die $db->error; } __DATA__ 31022449 31022450 31023821 39921444 25457242 28592642 209113113 209113112 90631934 90631838 5073770 55599321 25380275 25398281 25398282 25398283 25398284 25398285 43815008 43815009 43814979 170837547 170837548 115256528 115256529 115256530 115258744 115258745 115258746 115258747 115258748 198266834 198267359 198267360 198267361 198267371 198267483 198267484 198267491 74732936 74732959 74732960 44514777 44524456 32413565