BioPerl
view release on metacpan or search on metacpan
Bio/DB/GFF.pm view on Meta::CPAN
my $self = shift;
my $file_or_directory = shift || '.';
my $verbose = shift;
local $self->{__verbose__} = $verbose;
return $self->do_load_gff($file_or_directory) if ref($file_or_directory)
&& tied *$file_or_directory;
my $tied_stdin = tied(*STDIN);
open my $SAVEIN, "<&STDIN" unless $tied_stdin;
local @ARGV = $self->setup_argv($file_or_directory,'gff','gff3') or return; # to play tricks with reader
my $result = $self->do_load_gff('ARGV');
open STDIN, '<', $SAVEIN unless $tied_stdin; # restore STDIN
return $result;
}
*load = \&load_gff;
=head2 load_gff_file
Title : load_gff_file
Bio/DB/GFF.pm view on Meta::CPAN
my $self = shift;
my $file_or_directory = shift || '.';
my $verbose = shift;
local $self->{__verbose__} = $verbose;
return $self->load_sequence($file_or_directory) if ref($file_or_directory)
&& tied *$file_or_directory;
my $tied = tied(*STDIN);
open my $SAVEIN, "<&STDIN" unless $tied;
local @ARGV = $self->setup_argv($file_or_directory,'fa','dna','fasta') or return; # to play tricks with reader
my $result = $self->load_sequence('ARGV');
open STDIN, '<', $SAVEIN unless $tied; # restore STDIN
return $result;
}
=head2 load_fasta_file
Title : load_fasta_file
Usage : $db->load_fasta_file($file [,$verbose]);
maintenance/check_NAME.pl view on Meta::CPAN
my $fname = $_;
my $pm = $File::Find::name;
$pm =~ s{.*?/(?=Bio/)}{}; # remove up to first slash before Bio/
$pm =~ s{\.pm$}{}; # remove .pm suffix
$pm =~ s{/}{::}g; # convert / to ::
print STDERR "# $File::Find::name\n" if $verbose;
# slurp in the file
my $text = do { local( @ARGV, $/ ) = $fname ; <> } ;
# check if the NAME section has the _full_ module name in it
if ($text !~ m/^=head1\s+NAME.*?^$pm/xms) {
print "$pm\n";
$num_found++;
}
}
=head1 OPTIONS
maintenance/check_URLs.pl view on Meta::CPAN
#
sub find_modules {
# only want files with .pm
return unless m/\.pm$/;
return unless -f $_;
my $fname = $_;
# slurp in the file
my $text = do { local( @ARGV, $/ ) = $fname ; <> } ;
# keep track of URLs
while ($text =~ m/$RE{URI}{HTTP}{-keep}/g) {
my $url = $1 or next;
# remove Perl code if URL was embedded in string and other stuff
$url =~ s/\s*[.,;'")]*\s*$//;
check_url($url, $File::Find::name);
}
}
scripts/Bio-DB-GFF/bp_genbank2gff.pl view on Meta::CPAN
@dsn,
@auth,
-preferred_tags => \%preferred_tags,
-source=> $SOURCE || 'Genbank')
or die "Can't open database: ",Bio::DB::GFF->error,"\n";
if ($CREATE) {
$db->initialize(1);
}
die "you must specify either an accession to retrieve from\nembl or a local file containing data in embl format\n" if (($FILE || $ACC) && !scalar(@ARGV));
if ($ACC) {
while ($_ = shift) {
status(loading => $_);
my $result = $db->load_from_embl(/^NC_/?'refseq':'embl' => $_);
status(done => $result);
}
exit 1;
}
( run in 0.691 second using v1.01-cache-2.11-cpan-49f99fa48dc )