File: rebase2list.pl

package info (click to toggle)
bioperl 1.7.8-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 35,964 kB
  • sloc: perl: 94,019; xml: 14,811; makefile: 15
file content (21 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
# Generate an enzyme list for RestrictionEnzyme.pm from rebase
# From Ryan Brinkman

my $strider = $ARGV[0]; #commercial_version_rebase_strider_format

open my $FILEIN, '<', $strider or die "Could not read file '$strider': $!\n";

while (<$FILEIN>){
   chomp;
   if ( /^[A-Z]\S+,\S+/ ){
      ($enzyme,$cutsite)=split(',');
      if ($cutsite =~ m#/#){
	 $match=$-[0];
      }
      ($seqfixed=$cutsite) =~ s/\///g;
      $seqfixed=uc $seqfixed;
      print " \'$enzyme\'\t=> \'".$seqfixed." ".$match."\'\,\n";
   }
}
close $FILEIN;