Subject: | update brew install command and support for linux machines? |
Hi Gene,
I have recently played with your distribution and I find it very convenient to deploy Perl modules relying on external binaries. As an illustration, I attach an example of a subclass taking advantage of your approach.
However, the class installing brew itself does not work anymore due to a change in the download URL. Therefore, would it be possible to update the install command? Moreover, it would be great to also support Linux systems, as homebrew works perfectly well on them too.
https://brew.sh/
https://stackoverflow.com/questions/33353618/can-i-use-homebrew-on-ubuntu
If you don't have the time to do that, I am willing to do the required changes myself, but I would need you to accept the patches on CPAN.
Best regards,
Denis
--
Prof. Denis BAURAIN
Head of the Dept of Life Sciences
University of Liège
InBioS - PhytoSYSTEMS, Eukaryotic Phylogenomics
Sart Tilman, Quartier Vallée 1
Chemin de la Vallée 4, Bât. B22
4000 Liège
Belgium
Subject: | Hmmer.pm |
package Bio::MUST::Provision::Hmmer;
# ABSTRACT: Internal class for app provisioning system
# AUTOGENERATED CODE! DO NOT MODIFY THIS FILE!
use Modern::Perl '2011';
use Carp;
use parent qw(App::Provision::Tiny);
sub deps { qw(brew) }
sub condition {
my $self = shift;
my $condition = qx{which hmmsearch} =~ m/hmmsearch$/xms;
carp 'Note: HMMER executable not found; installing with HomeBrew...'
unless $condition;
return $condition ? 1 : 0;
}
sub meet {
my $self = shift;
$self->recipe(
['brew tap brewsci/bio'],
['brew install hmmer'],
);
}
1;
Subject: | build_provis.pl |
#!/usr/bin/env perl
use Modern::Perl '2011';
use autodie;
use Template;
use Path::Class qw(file dir);
# TODO: better handle taps (some are in homebrew/core and tap is useless)
my @provisions = (
{ 'class' => 'Blast',
'app' => 'NCBI-BLAST+',
'pgm' => 'blastp',
'form' => 'blast', # homebrew/core
},
{ 'class' => 'Cap3',
'app' => 'CAP3',
'pgm' => 'cap3',
'form' => 'cap3', # brewsci/bio
},
{ 'class' => 'CdHit',
'app' => 'CD-HIT',
'pgm' => 'cd-hit',
'form' => 'cd-hit', # brewsci/bio
},
{ 'class' => 'ClustalO',
'app' => 'Clustal Omega',
'pgm' => 'clustalo',
'form' => 'clustal-omega', # brewsci/bio
},
{ 'class' => 'Exonerate',
'app' => 'Exonerate',
'pgm' => 'exonerate',
'form' => 'exonerate', # brewsci/bio
},
{ 'class' => 'Hmmer',
'app' => 'HMMER',
'pgm' => 'hmmsearch',
'form' => 'hmmer', # homebrew/core
},
{ 'class' => 'Mafft',
'app' => 'MAFFT',
'pgm' => 'mafft',
'form' => 'mafft', # homebrew/core
},
);
my $template = file('codegen/templates', 'generic.tt')->stringify;
my $outdir = dir('lib/Bio/MUST/Provision');
for my $vars (@provisions) {
my $outfile = file($outdir, $vars->{class} . '.pm')->stringify;
my $tt = Template->new( { RELATIVE => 1 } );
$tt->process($template, $vars, $outfile)
or die 'Cannot build: ' . $outfile . ": $!";
}
Subject: | generic.tt |
Message body not shown because it is not plain text.