Clean up test: use the $db in scope and reuse variable
[bioperl-live.git] / examples / contributed / rebase2list.pl
blob34bd2f7129e776f14cef8ebd798887a1ab7f25c8
1 #!/usr/bin/perl
2 # Generate an enzyme list for RestrictionEnzyme.pm from rebase
3 # From Ryan Brinkman
5 my $strider = $ARGV[0]; #commercial_version_rebase_strider_format
7 open my $FILEIN, '<', $strider or die "Could not read file '$strider': $!\n";
9 while (<$FILEIN>){
10 chomp;
11 if ( /^[A-Z]\S+,\S+/ ){
12 ($enzyme,$cutsite)=split(',');
13 if ($cutsite =~ m#/#){
14 $match=$-[0];
16 ($seqfixed=$cutsite) =~ s/\///g;
17 $seqfixed=uc $seqfixed;
18 print " \'$enzyme\'\t=> \'".$seqfixed." ".$match."\'\,\n";
21 close $FILEIN;