Bio-BioStudio
view release on metacpan or search on metacpan
lib/Bio/BioStudio/BLAST.pm view on Meta::CPAN
{
my ($species, $repo) = @_;
my $indexpath = _path_to_BLAST_index($species, $repo);
my %index = ();
if (-e $indexpath)
{
open (my $BLASTINDEX, '<', $indexpath)
|| croak "BS_ERROR: Can't open BLAST index $indexpath : $OS_ERROR";
my $indexref = do {local $/ = <$BLASTINDEX>};
close $BLASTINDEX;
my @indexkeys = split m{\s}, $indexref;
%index = map {$_ => 1} @indexkeys;
}
return \%index;
}
=head2 _make_BLAST_index
=cut
sub _make_BLAST_index
lib/Bio/BioStudio/Cairo.pm view on Meta::CPAN
sub parse_fonts
{
my $bs_dir = _path_to_conf();
opendir(my $FDIR, $bs_dir);
my @fonts = grep {$_ =~ m{\.otf\z}msix} readdir($FDIR);
closedir $FDIR;
my %fonthsh;
foreach my $font (@fonts)
{
my $path = $bs_dir . $font;
my ($name, $ext) = split m{\.}, $font;
$fonthsh{$name} = $path;
}
return \%fonthsh;
}
=head2 _path_to_colors
=cut
sub _path_to_colors
lib/Bio/BioStudio/Chromosome.pm view on Meta::CPAN
=cut
sub fetch_comments
{
my ($self) = @_;
my $path = $self->path_to_GFF;
open (my $FILE, '<', $path) || $self->throw("Can't find $path: $OS_ERROR\n");
my $ref = do {local $/ = <$FILE>};
close $FILE;
my @lines = split m{\n}, $ref;
my @precomments = grep {$_ =~ m{^\# [^\#.]+ }msx} @lines;
my @comments = map {$_ . "\n"} @precomments;
return \@comments;
}
=head2 fetch_features
=cut
sub fetch_features
( run in 1.727 second using v1.01-cache-2.11-cpan-62a16548d74 )