use Getopt::Long; 4 use Benchmark; 5 use Config::Config qw(/nfs/users/nfs_a/aj6/CGP/Sequenom/perl/Sequenom.ini); 6 use Database::Conn; 7 8 my $conn; 9 my $snp_list = {}; 10 my $ind_list = {}; 11 my $gen_list = {}; 12 eval { 13 14 $conn = Database::Conn->new('live'); 15 $conn->addConnection(DBI->connect('dbi:Oracle:SNP.world','snp','snp', {RaiseError =>1 , AutoCommit=>0}),'snp'); 16 my $timestarted = Benchmark->new(); 17 my $snparray = $conn->executeArrRef('snp::Sequenom::getSnpsforPlex'); 18 19 my $indsent = $conn->executeArrRef('snp::Sequenom::getIndForPlateSent'); 20 #=cut 21 foreach my $ind( @ {$indsent} ){ 22 23 foreach my $snp (@ {$snparray} ){ 24 25 my $genotype = $conn->executeArrRef('snp::Sequenom::getGenotypeCalls', $ind->[0], $snp->[0]); 26 27 foreach my $geno( @ {$genotype} ){ 28 #3my $i = 1; 29 if(defined $geno->[3]){ 30 31 32 print "$geno->[1],$geno->[3],$geno->[2],$geno->[4]\n"; 33 34 }#end of if loop to check the genotype defined 35 else{ 36 37 print "$geno->[1],NO,$geno->[2],$geno->[4]\n" 38 39 } 40 41 42 }#end of @$genotype 43 44 }#end of @$snpsent }#end of @$indsent