line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::VertRes::Config::Pipelines::AnnotateAssembly; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: A class for generating the AnnotateAssembly pipeline config file which annotates an assembly |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
120073
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Bio::VertRes::Config::Pipelines::Common; |
8
|
|
|
|
|
|
|
use Bio::VertRes::Config::Pipelines::Roles::MetaDataFilter; |
9
|
|
|
|
|
|
|
extends 'Bio::VertRes::Config::Pipelines::Common'; |
10
|
|
|
|
|
|
|
with 'Bio::VertRes::Config::Pipelines::Roles::MetaDataFilter'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has 'pipeline_short_name' => ( is => 'ro', isa => 'Str', default => 'annotate_assembly' ); |
13
|
|
|
|
|
|
|
has 'module' => ( is => 'ro', isa => 'Str', default => 'VertRes::Pipelines::AnnotateAssembly' ); |
14
|
|
|
|
|
|
|
has 'prefix' => ( is => 'ro', isa => 'Bio::VertRes::Config::Prefix', default => '_annotate_' ); |
15
|
|
|
|
|
|
|
has 'toplevel_action' => ( is => 'ro', isa => 'Str', default => '__VRTrack_AnnotateAssembly__' ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has '_max_failures' => ( is => 'ro', isa => 'Int', default => 3 ); |
18
|
|
|
|
|
|
|
has '_max_lanes_to_search' => ( is => 'ro', isa => 'Int', default => 1000 ); |
19
|
|
|
|
|
|
|
has '_limit' => ( is => 'ro', isa => 'Int', default => 100 ); |
20
|
|
|
|
|
|
|
has '_tmp_directory' => ( is => 'ro', isa => 'Str', default => '/lustre/scratch108/pathogen/pathpipe/tmp' ); |
21
|
|
|
|
|
|
|
has '_assembler' => ( is => 'ro', isa => 'Str', default => 'velvet' ); |
22
|
|
|
|
|
|
|
has '_annotation_tool' => ( is => 'ro', isa => 'Str', default => 'Prokka' ); |
23
|
|
|
|
|
|
|
has '_dbdir' => ( is => 'ro', isa => 'Str', default => '/lustre/scratch108/pathogen/pathpipe/prokka' ); |
24
|
|
|
|
|
|
|
has '_pipeline_version' => ( is => 'ro', isa => 'Int', default => 1 ); |
25
|
|
|
|
|
|
|
has '_memory_in_mb' => ( is => 'ro', isa => 'Int', default => 3000 ); |
26
|
|
|
|
|
|
|
has '_kingdom' => ( is => 'ro', isa => 'Str', default => 'Bacteria' ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
override 'to_hash' => sub { |
29
|
|
|
|
|
|
|
my ($self) = @_; |
30
|
|
|
|
|
|
|
my $output_hash = super(); |
31
|
|
|
|
|
|
|
$output_hash->{limit} = $self->_limit; |
32
|
|
|
|
|
|
|
$output_hash->{max_lanes_to_search} = $self->_max_lanes_to_search; |
33
|
|
|
|
|
|
|
$output_hash->{max_failures} = $self->_max_failures; |
34
|
|
|
|
|
|
|
$output_hash->{vrtrack_processed_flags} = { assembled => 1, annotated => 0 }; |
35
|
|
|
|
|
|
|
$output_hash->{limits} = $self->_escaped_limits; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
$output_hash->{data}{tmp_directory} = $self->_tmp_directory; |
38
|
|
|
|
|
|
|
$output_hash->{data}{assembler} = $self->_assembler; |
39
|
|
|
|
|
|
|
$output_hash->{data}{annotation_tool} = $self->_annotation_tool; |
40
|
|
|
|
|
|
|
$output_hash->{data}{dbdir} = $self->_dbdir; |
41
|
|
|
|
|
|
|
$output_hash->{data}{pipeline_version} = $self->_pipeline_version; |
42
|
|
|
|
|
|
|
$output_hash->{data}{memory} = $self->_memory_in_mb; |
43
|
|
|
|
|
|
|
$output_hash->{data}{kingdom} = $self->_kingdom; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
return $output_hash; |
46
|
|
|
|
|
|
|
}; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub _construct_filename |
49
|
|
|
|
|
|
|
{ |
50
|
|
|
|
|
|
|
my ($self, $suffix) = @_; |
51
|
|
|
|
|
|
|
my $output_filename = join('_',($self->_limits_values_part_of_filename(),$self->_assembler)); |
52
|
|
|
|
|
|
|
return $self->_filter_characters_truncate_and_add_suffix($output_filename,$suffix); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
override 'log_file_name' => sub { |
58
|
|
|
|
|
|
|
my ($self) = @_; |
59
|
|
|
|
|
|
|
return $self->_construct_filename('log'); |
60
|
|
|
|
|
|
|
}; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
override 'config_file_name' => sub { |
63
|
|
|
|
|
|
|
my ($self) = @_; |
64
|
|
|
|
|
|
|
return $self->_construct_filename('conf'); |
65
|
|
|
|
|
|
|
}; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
69
|
|
|
|
|
|
|
no Moose; |
70
|
|
|
|
|
|
|
1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
__END__ |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=pod |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 NAME |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Bio::VertRes::Config::Pipelines::AnnotateAssembly - A class for generating the AnnotateAssembly pipeline config file which annotates an assembly |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 VERSION |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
version 1.133090 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 SYNOPSIS |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
A class for generating the AnnotateAssembly pipeline config file |
87
|
|
|
|
|
|
|
use Bio::VertRes::Config::Pipelines::AnnotateAssembly; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
my $pipeline = Bio::VertRes::Config::Pipelines::AnnotateAssembly->new(database => 'abc' |
90
|
|
|
|
|
|
|
config_base => '/path/to/config/base', |
91
|
|
|
|
|
|
|
limits => { project => ['project name'] }); |
92
|
|
|
|
|
|
|
$pipeline->to_hash(); |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 AUTHOR |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Andrew J. Page <ap13@sanger.ac.uk> |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This software is Copyright (c) 2013 by Wellcome Trust Sanger Institute. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
This is free software, licensed under: |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The GNU General Public License, Version 3, June 2007 |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=cut |