App-Mimosa
view release on metacpan or search on metacpan
'Catalyst::Plugin::Session' => 0,
'Catalyst::Plugin::Session::Store::FastMmap' => 0,
'Catalyst::Plugin::Session::State::Cookie' => 0,
'Catalyst::Plugin::Static::Simple' => 0,
'Catalyst::Runtime' => '5.80029',
'Catalyst::View::Bio::SeqIO' => 0,
'Catalyst::View::Email' => 0,
'Catalyst::View::HTML::Mason' => 0,
'Class::Accessor::Fast' => 0,
'Config::JFDI' => 0,
'DateTime' => 0,
'Digest::SHA1' => 0,
'DBIx::Class' => '0.08127',
'File::Temp' => 0,
'File::Slurp' => '9999.15',
'HTML::Entities' => 0,
'IPC::Cmd' => '0.70',
'IPC::Run' => 0,
'IPC::System::Simple' => 0,
'IO::String' => 0,
'JSON::Any' => '1.25',
"Catalyst::Plugin::Session::State::Cookie" : 0,
"Catalyst::Plugin::Session::Store::FastMmap" : 0,
"Catalyst::Plugin::Static::Simple" : 0,
"Catalyst::Runtime" : "5.80029",
"Catalyst::View::Bio::SeqIO" : 0,
"Catalyst::View::Email" : 0,
"Catalyst::View::HTML::Mason" : 0,
"Class::Accessor::Fast" : 0,
"Config::JFDI" : 0,
"DBIx::Class" : "0.08127",
"DateTime" : 0,
"Digest::SHA1" : 0,
"File::Slurp" : "9999.15",
"File::Temp" : 0,
"HTML::Entities" : 0,
"IO::String" : 0,
"IPC::Cmd" : "0.70",
"IPC::Run" : 0,
"IPC::System::Simple" : 0,
"JSON::Any" : "1.25",
"Moose" : "1.19",
Catalyst::Plugin::Session::State::Cookie: 0
Catalyst::Plugin::Session::Store::FastMmap: 0
Catalyst::Plugin::Static::Simple: 0
Catalyst::Runtime: 5.80029
Catalyst::View::Bio::SeqIO: 0
Catalyst::View::Email: 0
Catalyst::View::HTML::Mason: 0
Class::Accessor::Fast: 0
Config::JFDI: 0
DBIx::Class: 0.08127
DateTime: 0
Digest::SHA1: 0
File::Slurp: 9999.15
File::Temp: 0
HTML::Entities: 0
IO::String: 0
IPC::Cmd: 0.70
IPC::Run: 0
IPC::System::Simple: 0
JSON::Any: 1.25
Moose: 1.19
Makefile.PL view on Meta::CPAN
'Catalyst::Plugin::Session::Store::FastMmap' => 0,
'Catalyst::Plugin::Static::Simple' => 0,
'Catalyst::Runtime' => '5.80029',
'Catalyst::Test' => 0,
'Catalyst::View::Bio::SeqIO' => 0,
'Catalyst::View::Email' => 0,
'Catalyst::View::HTML::Mason' => 0,
'Class::Accessor::Fast' => 0,
'Config::JFDI' => 0,
'DBIx::Class' => '0.08127',
'DateTime' => 0,
'Digest::SHA1' => 0,
'File::Slurp' => '9999.15',
'File::Temp' => 0,
'HTML::Entities' => 0,
'HTML::Lint' => 0,
'HTML::Tagset' => '3.20',
'IO::String' => 0,
'IPC::Cmd' => '0.70',
'IPC::Run' => 0,
'IPC::System::Simple' => 0,
lib/App/Mimosa/Controller/Root.pm view on Meta::CPAN
use Path::Class;
use Bio::SearchIO;
use Bio::SearchIO::Writer::HTMLResultWriter;
use File::Spec::Functions;
use Bio::GMOD::Blast::Graph;
use App::Mimosa::Job;
use App::Mimosa::Database;
use Try::Tiny;
use DateTime;
use HTML::Entities;
use Digest::SHA1 qw/sha1_hex/;
#use Carp::Always;
use Cwd;
BEGIN { extends 'Catalyst::Controller' }
with 'Catalyst::Component::ApplicationAttribute';
#
# Sets the actions in this controller to be registered with no prefix
lib/App/Mimosa/Controller/Root.pm view on Meta::CPAN
alphabet => $c->stash->{alphabet} || 'nucleotide',
output_file => "$output_file",
input_file => "$input_file",
alignment_view => $alignment_view,
map { $_ => $c->req->param($_) || '' }
qw/ program maxhits output_graphs evalue matrix /,
);
# Regardless of it working, the job is now complete
my $rs = $c->model('BCS')->resultset('Mimosa::Job');
$rs->search( { mimosa_job_id => $j->job_id } )->update( { end_time => DateTime->now } );
my $error = $j->run;
if ($error) {
( $c->stash->{error} = $error ) =~ s!\n!<br />!g;
$c->detach( $error =~ /Could not calculate ungapped/i ? '/input_error' : '/error' );
} else {
# stat the output file before opening it in hopes of avoiding
# some kind of bizarre race condition i've been seeing in
# which the file doesn't appear to be visible yet to the web
lib/App/Mimosa/Controller/Root.pm view on Meta::CPAN
uploads => $c->req->uploads,
#TODO: add the user - user => $c->user,
};
my $rs = $c->model('BCS')->resultset('Mimosa::Job');
my $jobs = $rs->search( { sha1 => $sha1 } );
if ($jobs->count == 0) { # not a duplicate job, proceed
my $job = $rs->create({
sha1 => $sha1,
user => $c->user_exists ? $c->user->get('username') : 'anonymous',
start_time => DateTime->now(),
});
$c->stash->{job_id} = $job->mimosa_job_id();
} else { # this is a duplicate, check if it is still running and notify user appropriately
my $job = $jobs->single;
my ($start,$end) = ($job->start_time, $job->end_time);
my $jid = $job->mimosa_job_id;
my $user = $job->user;
# TODO: add more info to the error message
if( $end ) { # already finished
$c->stash->{job_id} = $jid;
lib/App/Mimosa/Schema/BCS/Result/Mimosa/Job.pm view on Meta::CPAN
package App::Mimosa::Schema::BCS::Result::Mimosa::Job;
use strict;
use warnings;
use base 'DBIx::Class::Core';
__PACKAGE__->load_components(qw/InflateColumn::DateTime/);
=head1 NAME
App::Mimosa::Schema::BCS::Result::Mimosa::Job - Mimosa Job
=head1 COLUMNS
=cut
( run in 0.675 second using v1.01-cache-2.11-cpan-2b0bae70ee8 )