BioPerl
view release on metacpan or search on metacpan
Bio/SeqIO/ace.pm view on Meta::CPAN
104105106107108109110111112113114115116117118119120121122123124=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
142143144145146147148149150151152153154155156157158159160161162Title : _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
172173174175176177178179180181182183184185186187188189190191192feeling 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
220221222223224225226227228229230231232=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
113114115116117118119120121122123124125126127128129130131132133See: 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
161162163164165166167168169170171172173=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
396397398399400401402403404405406407408409410411412413414415416
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 {
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 )