Bio-InterProScanWrapper

 view release on metacpan or  search on metacpan

lib/Bio/InterProScanWrapper/CommandLine/AnnotateEukaryotes.pm  view on Meta::CPAN


# ABSTRACT: provide a commandline interface to the annotation wrappers


use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd;
use File::Basename;
use Bio::InterProScanWrapper;

has 'args'                    => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name'             => ( is => 'ro', isa => 'Str',      required => 1 );
has 'help'                    => ( is => 'rw', isa => 'Bool',     default  => 0 );
has 'cpus'                    => ( is => 'rw', isa => 'Int',      default  => 100 );
has 'exec_script'             => ( is => 'rw', isa => 'Str',      default  => '/software/pathogen/external/apps/usr/local/iprscan-5.0.7/interproscan.sh' );
has 'proteins_file'           => ( is => 'rw', isa => 'Str' );
has 'tmp_directory'           => ( is => 'rw', isa => 'Str', default => '/tmp' );
has 'output_filename'         => ( is => 'rw', isa => 'Str', lazy => 1, builder => '_build_output_filename' );
has 'no_lsf'                  => ( is => 'rw', isa => 'Bool', default => 0 );
has 'intermediate_output_dir' => ( is => 'rw', isa => 'Maybe[Str]');

lib/Bio/InterProScanWrapper/External/LSFInterProScan.pm  view on Meta::CPAN


use Moose;
use LSF;
use LSF::JobManager;
use File::Basename;
use Bio::InterProScanWrapper::Exceptions;

has 'input_file'          => ( is => 'ro', isa => 'Str',        required => 1);
has 'output_file'         => ( is => 'ro', isa => 'Str',        required => 1);
has 'temp_directory_name' => ( is => 'ro', isa => 'Str',        required => 1);
has 'input_files'         => ( is => 'ro', isa => 'ArrayRef',        required => 1 );
has 'memory_in_mb'        => ( is => 'ro', isa => 'Int',             default  => 5000 );
has 'queue'               => ( is => 'ro', isa => 'Str',             default  => 'normal' );
has '_job_manager'        => ( is => 'ro', isa => 'LSF::JobManager', lazy     => 1, builder => '_build__job_manager' );
has 'exec'                => ( is => 'ro', isa => 'Str', default  => '/software/pathogen/external/apps/usr/local/iprscan-5.0.7/interproscan.sh' );
has 'output_type'         => ( is => 'ro', isa => 'Str', default => 'gff3' );
has '_output_suffix'      => ( is => 'ro', isa => 'Str', default  => '.out' );
has 'tokens_per_job'      => ( is => 'ro', isa => 'Int', default  => 25 );

                          
# A single instance uses more than 1 cpu so you need to reserve more slots

lib/Bio/InterProScanWrapper/ParseInterProOutput.pm  view on Meta::CPAN

package Bio::InterProScanWrapper::ParseInterProOutput;

# ABSTRACT: parse the GFF files produced by interproscan


use Moose;
use Bio::InterProScanWrapper::Exceptions;

has 'gff_files'   => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'output_file' => ( is => 'ro', isa => 'Str', default => 'output.gff' );

has '_output_file_fh'  => ( is => 'ro',     lazy    => 1, builder => '_build__output_file_fh' );
has '_remove_sequence_filter'  => ( is => 'ro',   isa => 'Str',   lazy    => 1, builder => '_build__remove_sequence_filter' );

sub _build__output_file_fh
{
  my ($self) = @_;
  open(my $fh, '>', $self->output_file) or Bio::InterProScanWrapper::Exceptions::CouldntWriteToFile->throw(
    error => "Couldnt write to file: " . $self->output_file );



( run in 0.794 second using v1.01-cache-2.11-cpan-5f2e87ce722 )