view release on metacpan or search on metacpan
lib/Bio/AutomatedAnnotation/CommandLine/AnnotateBacteria.pm view on Meta::CPAN
package Bio::AutomatedAnnotation::CommandLine::AnnotateBacteria;
$Bio::AutomatedAnnotation::CommandLine::AnnotateBacteria::VERSION = '1.182770';
# ABSTRACT: provide a commandline interface to the annotation wrappers
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Bio::AutomatedAnnotation;
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 'sample_name' => ( is => 'rw', isa => 'Str' );
has 'dbdir' => ( is => 'rw', isa => 'Str', default => '/lustre/scratch118/infgen/pathogen/pathpipe/prokka' );
has 'assembly_file' => ( is => 'rw', isa => 'Str' );
has 'annotation_tool' => ( is => 'rw', isa => 'Str', default => 'Prokka' );
has 'tmp_directory' => ( is => 'rw', isa => 'Str', default => '/tmp' );
has 'sequencing_centre' => ( is => 'rw', isa => 'Str', default => 'SC' );
has 'accession_number' => ( is => 'rw', isa => 'Maybe[Str]' );
lib/Bio/AutomatedAnnotation/CommandLine/GeneNameOccurances.pm view on Meta::CPAN
package Bio::AutomatedAnnotation::CommandLine::GeneNameOccurances;
$Bio::AutomatedAnnotation::CommandLine::GeneNameOccurances::VERSION = '1.182770';
# ABSTRACT: Create a spreadsheet with gene name occurances
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Bio::AutomatedAnnotation::SpreadsheetOfGeneOccurances;
use Bio::AutomatedAnnotation::GeneNameOccurances;
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 'gff_files' => ( is => 'rw', isa => 'ArrayRef' );
has 'output_filename' => ( is => 'rw', isa => 'Str' );
has '_error_message' => ( is => 'rw', isa => 'Str' );
sub BUILD {
my ($self) = @_;
lib/Bio/AutomatedAnnotation/CommandLine/ParseGenesFromGFFs.pm view on Meta::CPAN
package Bio::AutomatedAnnotation::CommandLine::ParseGenesFromGFFs;
$Bio::AutomatedAnnotation::CommandLine::ParseGenesFromGFFs::VERSION = '1.182770';
# ABSTRACT: provide a commandline interface to pull out genes from multiple GFF files
use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Bio::AutomatedAnnotation::ParseGenesFromGFFs;
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 'amino_acids' => ( is => 'rw', isa => 'Bool', default => 0);
has 'gff_files' => ( is => 'rw', isa => 'ArrayRef' );
has 'search_query' => ( is => 'rw', isa => 'Str' );
has 'search_qualifiers' => ( is => 'rw', isa => 'ArrayRef', default => sub { ['gene'] } );
has 'output_filename' => ( is => 'rw', isa => 'Str' );
has '_error_message' => ( is => 'rw', isa => 'Str' );
lib/Bio/AutomatedAnnotation/External/Cmscan.pm view on Meta::CPAN
use Moose;
use Bio::SeqFeature::Generic;
has 'cmdb' => ( is => 'ro', isa => 'Str', required => 1 );
has 'input_file' => ( is => 'ro', isa => 'Str', required => 1 );
has 'exec' => ( is => 'ro', isa => 'Str', default => 'cmscan' );
has 'version' => ( is => 'ro', isa => 'Str', default => '1.1' );
has 'cpus' => ( is => 'ro', isa => 'Int', default => 1 );
has 'evalue' => ( is => 'ro', isa => 'Num', default => 1E-6 );
has 'features' => ( is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build_features' );
has 'number_of_features' => ( is => 'rw', isa => 'Int', default => 0 );
has '_tool' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build__tool' );
has '_cpus' => ( is => 'ro', isa => 'Int', lazy => 1, builder => '_build__cpus' );
has '_infernal_fh' => ( is => 'ro', lazy => 1, builder => '_build__infernal_fh' );
sub _build__tool {
my ($self) = @_;
return "Infernal:" . $self->version;
}
lib/Bio/AutomatedAnnotation/GeneNameOccurances.pm view on Meta::CPAN
package Bio::AutomatedAnnotation::GeneNameOccurances;
$Bio::AutomatedAnnotation::GeneNameOccurances::VERSION = '1.182770';
# ABSTRACT: Parse the gene names from multiple GFF files and provide a matrix of matches.
use Moose;
use Bio::Tools::GFF;
use Bio::AutomatedAnnotation::Exceptions;
use Bio::AutomatedAnnotation::GeneNamesFromGFF;
has 'gff_files' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'all_gene_names' => ( is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build_all_gene_names' );
has 'sorted_all_gene_names' => ( is => 'ro', isa => 'ArrayRef', lazy => 1, builder => '_build_sorted_all_gene_names' );
has 'gene_name_hashes' => ( is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build_gene_name_hashes' );
has 'number_of_files' => ( is => 'ro', isa => 'Int', lazy => 1, builder => '_build_number_of_files' );
sub _build_sorted_all_gene_names
{
my ($self) = @_;
my %all_gene_names = %{$self->all_gene_names};
my @sorted_gene_names = sort { $b cmp $a } keys %all_gene_names;
return \@sorted_gene_names;
}
lib/Bio/AutomatedAnnotation/GeneNamesFromGFF.pm view on Meta::CPAN
use Bio::Tools::GFF;
has 'gff_file' => ( is => 'ro', isa => 'Str', required => 1 );
has '_tags_to_filter' => ( is => 'ro', isa => 'Str', default => 'CDS' );
has '_tags_to_ignore' => ( is => 'ro', isa => 'Str', default => 'rRNA|tRNA|ncRNA|tmRNA' );
has '_gff_parser' => ( is => 'ro', isa => 'Bio::Tools::GFF', lazy => 1, builder => '_build__gff_parser' );
has '_awk_filter' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build__awk_filter' );
has '_remove_sequence_filter' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build__remove_sequence_filter' );
has 'gene_names' => ( is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build_gene_names' );
sub _build_gene_names {
my ($self) = @_;
my %gene_names;
while ( my $raw_feature = $self->_gff_parser->next_feature() ) {
last unless defined($raw_feature); # No more features
next if !( $raw_feature->primary_tag eq 'CDS' );
if ( $raw_feature->has_tag('gene') ) {
lib/Bio/AutomatedAnnotation/ParseGenesFromGFF.pm view on Meta::CPAN
use Bio::PrimarySeq;
use Bio::SeqIO;
use Bio::Perl;
has 'gff_file' => ( is => 'ro', isa => 'Str', required => 1 );
has 'search_query' => ( is => 'ro', isa => 'Str', required => 1 );
has '_awk_filter' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build__awk_filter' );
has '_gff_parser' => ( is => 'ro', isa => 'Bio::Tools::GFF', lazy => 1, builder => '_build__gff_parser' );
has '_tags_to_filter' => ( is => 'ro', isa => 'Str', default => 'CDS' );
has '_matching_features' => ( is => 'ro', isa => 'ArrayRef', lazy => 1, builder => '_build__matching_features' );
has '_bio_seq_objects' => ( is => 'ro', isa => 'ArrayRef', lazy => 1, builder => '_build__bio_seq_objects' );
has 'search_qualifiers' => ( is => 'ro', isa => 'ArrayRef', lazy => 1, builder => '_build_search_qualifiers' );
has '_sequences' => ( is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build__sequences' );
sub _build_search_qualifiers
{
my ($self) = @_;
return [ 'gene', 'product' ];
}
sub _build__sequences {
my ($self) = @_;
lib/Bio/AutomatedAnnotation/ParseGenesFromGFFs.pm view on Meta::CPAN
package Bio::AutomatedAnnotation::ParseGenesFromGFFs;
$Bio::AutomatedAnnotation::ParseGenesFromGFFs::VERSION = '1.182770';
# ABSTRACT: Parse GFF files and efficiency extract the gene sequence.
use Moose;
use Bio::AutomatedAnnotation::ParseGenesFromGFF;
use Bio::SeqIO;
has 'gff_files' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'search_query' => ( is => 'ro', isa => 'Str', required => 1 );
has 'search_qualifiers' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'codontable_id' => ( is => 'ro', isa => 'Int', default => 11 );
has 'amino_acids' => ( is => 'ro', isa => 'Bool', default => 0 );
has 'output_file' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build_output_file' );
has 'output_base' => ( is => 'rw', isa => 'Str', default => 'output' );
has '_parser_objects' => ( is => 'ro', isa => 'ArrayRef', lazy => 1, builder => '_build__parser_objects' );
has 'files_with_hits' => ( is => 'rw', isa => 'Int', default => 0 );
has 'files_without_hits' => ( is => 'rw', isa => 'Int', default => 0 );
sub _build_output_file {
my ($self) = @_;
my $file_suffix = $self->search_query;
$file_suffix =~ s!\W!!gi;
return join( '.', ( $self->output_base, $file_suffix, 'fa' ) );
}