BioPerl
view release on metacpan or search on metacpan
Bio/SeqIO/ace.pm view on Meta::CPAN
=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
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
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
https://github.com/bioperl/bioperl-live/issues
=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
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
https://github.com/bioperl/bioperl-live/issues
=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
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.271 second using v1.01-cache-2.11-cpan-49f99fa48dc )