[Bio] / FigKernelPackages / raelib.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/raelib.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8, Sun Apr 3 19:11:11 2005 UTC revision 1.9, Sun Apr 3 19:25:21 2005 UTC
# Line 75  Line 75 
75    
76   The correspondence has PIR ID \t FIG ID\n, and is probably based on ftp://ftp.pir.georgetown.edu/pir_databases/pirsf/data/pirsfinfo.dat   The correspondence has PIR ID \t FIG ID\n, and is probably based on ftp://ftp.pir.georgetown.edu/pir_databases/pirsf/data/pirsfinfo.dat
77    
78     This method takes three arguments:
79       from    : pirsfinfo.dat file
80       to      : file to write information to
81       verbose : report on progress
82    
83     Returns the number of lines in the pirsinfo file that were read.
84    
85  =cut  =cut
86    
87  sub pirsfcorrespondence {  sub pirsfcorrespondence {
88   my ($self, $from, $to)=@_;   my ($self, $from, $to, $verbose)=@_;
89   die "File $from does not exist as called in $0" unless (-e $from);   die "File $from does not exist as called in $0" unless (-e $from);
90   open (IN, $from) || die "Can't open $from";   open (IN, $from) || die "Can't open $from";
91   open (OUT, ">$to") || die "Can't write to $to";   open (OUT, ">$to") || die "Can't write to $to";
92     my $linecount;
93   while (<IN>) {   while (<IN>) {
94      $linecount++;
95      unless ($linecount % 10000) {print STDERR "Correspondence of $linecount lines calculated\n"}
96    if (/^>/) {print OUT; next}    if (/^>/) {print OUT; next}
97    chomp;    chomp;
98    my $done;    my $done;
# Line 94  Line 104 
104   }   }
105   close IN;   close IN;
106   close OUT;   close OUT;
107   return 1;   return $linecount;
108  }  }
109    
110    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3