BioPerl

 view release on metacpan or  search on metacpan

Bio/SeqIO/ace.pm  view on Meta::CPAN

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
=cut
 
{
    my %bio_mol_type = (
        'dna'       => 'dna',
        'peptide'   => 'protein',
    );
 
    sub next_seq {
        my( $self ) = @_;
        local $/ = "";  # Split input on blank lines
 
        my $fh = $self->_filehandle;
        my( $type, $id );
        while (<$fh>) {
            if (($type, $id) = /^(DNA|Peptide)[\s:]+(.+?)\s*\n/si) {
                s/^.+$//m;  # Remove first line
                s/\s+//g;   # Remove whitespace
                last;
            }
        }

Bio/Tools/FootPrinter.pm  view on Meta::CPAN

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
Title   : _parse_predictions
 Usage   : my $r = $footprint->_parse_predictions
 Function: do the parsing
 Returns : none
 Args    : none
 
=cut
 
sub _parse_predictions {
  my ($self) = @_;
  $/="";
  my ($seq,$second,$third,$name);
  while ($_ = $self->_readline) {
    chomp;
    my @array = split("\n",$_);
    if ($#array == 5) {
      # get rid of header
      shift(@array); shift(@array);
    }
    if($#array == 3){
        if($name){

maintenance/authors.pl  view on Meta::CPAN

172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
feeling too lazy to change the code.
 
=cut
 
sub blankline {
    my ($file) = @_;
    return unless ($file =~ /\.PLS$/ or $file =~ /\.p[ml]$/);
    return unless -e $file;
 
    open my $F, '<', $file or warn "Could not read file '$file': $!\n" && return;
    local $/ = "";
    while (my $line = <$F>) {
        print "$file: +|$1|\n"  if $line =~ /[ \t]\n(=[a-z][^\n]+$)/m and $verbose;
        print "$file: ++|$1|\n" if $line =~ /\w\n(=[a-z][^\n]+$)/m    and $verbose;
        print "$file:|$1|+\n"   if $line =~ /(^=[a-z][^\n]+)\n[\t ]/m;
        #print "$file:|$1|++\n" if /(^=[^\n]+)\n\w/m;
    }
    close $F;
}
 
__END__

maintenance/authors.pl  view on Meta::CPAN

220
221
222
223
224
225
226
227
228
229
230
231
232
 
=head1 AUTHOR - Heikki Lehvaslaiho
 
Email heikki-at-bioperl-dot-org
 
=cut
 
 
# find . -name '*.pm' -print | xargs  perl -e '$/=""; while (<>) {$n = $1 if /^package\s+([\w:]+)/; print "$n:|$1|"  if  /(\s\s^=[^\n]+$)/m ; }'  ;
 
# find . -name '*.pm' -print | xargs  perl -e '$/=""; while (<>) {$n = $1 if /^package\s+([\w:]+)/; print "$n:|$1|\n"  if /(^=[^\n]+\n[\t ])/m ; }'  ;

maintenance/pod.pl  view on Meta::CPAN

113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
See: L<perlpodspec>
 
 
=cut
 
sub blankline {
    return unless /\.PLS$/ or /\.p[ml]$/ ;
    return unless -e $_;
    my $file = $_;
    open (F, $_) or warn "can't open file $_: $!" && return;
    local $/="";
    while (<F>) {
        print "$file: +|$1|\n" if /[ \t]\n(=[a-z][^\n]+$)/m and $verbose;
        print "$file: ++|$1|\n" if /\w\n(=[a-z][^\n]+$)/m and $verbose;
        print "$file:|$1|+\n" if /(^=[a-z][^\n]+)\n[\t ]/m;
        #print "$file:|$1|++\n" if /(^=[^\n]+)\n\w/m;
    }
    close F;
}
 
__END__

maintenance/pod.pl  view on Meta::CPAN

161
162
163
164
165
166
167
168
169
170
171
172
173
 
=head1 AUTHOR - Heikki Lehvaslaiho
 
Email heikki-at-bioperl-dot-org
 
=cut
 
 
# find . -name '*.pm' -print | xargs  perl -e '$/=""; while (<>) {$n = $1 if /^package\s+([\w:]+)/; print "$n:|$1|"  if  /(\s\s^=[^\n]+$)/m ; }'  ;
 
# find . -name '*.pm' -print | xargs  perl -e '$/=""; while (<>) {$n = $1 if /^package\s+([\w:]+)/; print "$n:|$1|\n"  if /(^=[^\n]+\n[\t ])/m ; }'  ;

scripts/utilities/bp_netinstall.pl  view on Meta::CPAN

396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
  print STDERR "Adding needed PPM repositories. This may take a while....\n";
  for my $name (keys %REPOSITORIES) {
     next if $repository{$name};
     system("ppm rep add $name $REPOSITORIES{$name}");
  }
}
 
sub find_bioperl_ppm {
  print STDERR "Finding most recent bioperl...";
  open my $S,"ppm search bioperl |" or die "Could not open ppm for listing: $!\n";
  local $/ = ''; # paragraph mode
  my ($blessed_one, $blessed_version);
  my $best = 0;
  while (my $line = <$S>) {
    chomp $line;
    my ($number)     = ($line =~ /^(\d+): bioperl/m);
    my ($version)    = ($line =~ /^\s+Version: (.+)/m);
    my ($repository) = ($line =~ /^\s+Repo: (.+)/m);
    my $multiplier = 10000000;
    my $magnitude  = 0;
    # this dumb thing converts 1.5.1 into a real number



( run in 0.917 second using v1.01-cache-2.11-cpan-26ccb49234f )