Guest User

Untitled

a guest
Jun 8th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use DBI;
  5.  
  6.  
  7. my $dbHandler;
  8. my $insertQuery;
  9. my $sequence;
  10. #create DB connection
  11. my $database = "dbi:mysql:database=Dcdekker:host=mysql.bin";
  12. my $username = "dcdekker";
  13. my $passwrd = "109232";
  14. $dbHandler = DBI->connect($database, $username, $passwrd);
  15.  
  16. my $Locus_ID;
  17. my $probe;
  18. my $startloc;
  19. my @array = "";
  20.    
  21.    
  22.     #haal orfID op#
  23.     my $orfIDqueryText = "SELECT Locus_ID, probe_sequence, startpositie FROM tussenprobes";
  24.     my $orfIDquery = $dbHandler->prepare($orfIDqueryText);
  25.     $orfIDquery -> execute;
  26.     my $stoppositie;
  27.  
  28.     #get ID from result
  29.     while(my @orfIDarray = $orfIDquery -> fetchrow()){
  30.        
  31.        
  32.         ($Locus_ID, $probe, $startloc)= @orfIDarray;
  33.        
  34.         my $stoppositie = $startloc +25;
  35.        
  36.         push(@array, $stoppositie);
  37.        
  38.        
  39.        
  40.        
  41.        
  42.    
  43.        
  44.  
  45.     }
  46.  
  47. my $string = join(' ',@array);
  48. print $string;
  49.  
  50. foreach
Add Comment
Please, Sign In to add comment