Bio-MLST-Check
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Bio/MLST/Download/Database.pm view on Meta::CPAN
with 'Bio::MLST::Download::Downloadable';
has 'database_attributes' => ( is => 'ro', isa => 'HashRef', required => 1 );
has 'base_directory' => ( is => 'ro', isa => 'Str', required => 1 );
has 'species' => ( is => 'ro', isa => 'Str', required => 1 );
has 'destination_directory' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build_destination_directory' );
sub update
{
my ($self) = @_;
for my $allele_file (@{$self->database_attributes->{alleles}})
{
$self->_download_file($allele_file,join('/',($self->destination_directory,'alleles')));
}
$self->_download_file($self->database_attributes->{profiles},join('/',($self->destination_directory,'profiles')));
1;
lib/Bio/MLST/Download/Databases.pm view on Meta::CPAN
use File::Path qw(make_path rmtree);
use POSIX qw(strftime);
has 'databases_attributes' => ( is => 'ro', isa => 'HashRef', required => 1 );
has 'base_directory' => ( is => 'ro', isa => 'Str', required => 1 );
has 'parallel_processes' => ( is => 'ro', isa => 'Int', default => 0 );
has '_species_to_exclude' => ( is => 'ro', isa => 'Str', default => 'Pediococcus' );
sub update {
my($self) = @_;
my $paths_to_database_updates = $self->databases_attributes;
my $species_to_exclude = $self->_species_to_exclude;
my $temp_folder = strftime "temp_%Y%m%d%H%M%S", localtime; # e.g. temp_20150402102622
my $staging_directory = join('/', ($self->base_directory, 'staging', $temp_folder));
try {
$self->_download_to_staging($species_to_exclude,
$paths_to_database_updates,
$staging_directory);
} catch {
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.543 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )