line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::VertRes::Config::Pipelines::Assembly; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: A base class for generating the Assembly pipeline config file which archives data to nfs units |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
137907
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Bio::VertRes::Config::Pipelines::Common; |
8
|
|
|
|
|
|
|
extends 'Bio::VertRes::Config::Pipelines::Common'; |
9
|
|
|
|
|
|
|
with 'Bio::VertRes::Config::Pipelines::Roles::MetaDataFilter'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'pipeline_short_name' => ( is => 'ro', isa => 'Str', default => 'assembly' ); |
12
|
|
|
|
|
|
|
has 'module' => ( is => 'ro', isa => 'Str', default => 'VertRes::Pipelines::Assembly' ); |
13
|
|
|
|
|
|
|
has 'prefix' => ( is => 'ro', isa => 'Bio::VertRes::Config::Prefix', default => '_assembly_' ); |
14
|
|
|
|
|
|
|
has 'toplevel_action' => ( is => 'ro', isa => 'Str', default => '__VRTrack_Assembly__' ); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has '_max_failures' => ( is => 'ro', isa => 'Int', default => 3 ); |
17
|
|
|
|
|
|
|
has '_max_lanes_to_search' => ( is => 'ro', isa => 'Int', default => 200 ); |
18
|
|
|
|
|
|
|
has '_limit' => ( is => 'ro', isa => 'Int', default => 100 ); |
19
|
|
|
|
|
|
|
has '_tmp_directory' => ( is => 'ro', isa => 'Str', default => '/lustre/scratch108/pathogen/pathpipe/tmp' ); |
20
|
|
|
|
|
|
|
has '_genome_size' => ( is => 'ro', isa => 'Int', default => 10000000 ); |
21
|
|
|
|
|
|
|
has '_assembler' => ( is => 'ro', isa => 'Str', default => 'velvet' ); |
22
|
|
|
|
|
|
|
has '_assembler_exec' => ( is => 'ro', isa => 'Str', default => '/software/pathogen/external/apps/usr/bin/velvet' ); |
23
|
|
|
|
|
|
|
has '_optimiser_exec' => ( is => 'ro', isa => 'Str', default => '/software/pathogen/external/apps/usr/bin/VelvetOptimiser.pl' ); |
24
|
|
|
|
|
|
|
has '_max_threads' => ( is => 'ro', isa => 'Int', default => 1 ); |
25
|
|
|
|
|
|
|
has '_pipeline_version' => ( is => 'ro', isa => 'Num', default => 2.1 ); |
26
|
|
|
|
|
|
|
has '_error_correct' => ( is => 'ro', isa => 'Bool', default => 0 ); |
27
|
|
|
|
|
|
|
has '_sga_exec' => ( is => 'ro', isa => 'Str', default => '/software/pathogen/external/apps/usr/bin/sga' ); |
28
|
|
|
|
|
|
|
has '_normalise' => ( is => 'ro', isa => 'Bool', default => 0 ); |
29
|
|
|
|
|
|
|
has '_post_contig_filtering' => ( is => 'ro', isa => 'Int', default => 300 ); |
30
|
|
|
|
|
|
|
has '_primers_file' => ( is => 'ro', isa => 'Str', default => '/nfs/pathnfs05/conf/primers/virus_primers' ); |
31
|
|
|
|
|
|
|
has '_remove_primers' => ( is => 'ro', isa => 'Bool', default => 0 ); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
override 'to_hash' => sub { |
35
|
|
|
|
|
|
|
my ($self) = @_; |
36
|
|
|
|
|
|
|
my $output_hash = super(); |
37
|
|
|
|
|
|
|
$output_hash->{limit} = $self->_limit; |
38
|
|
|
|
|
|
|
$output_hash->{max_lanes_to_search} = $self->_max_lanes_to_search; |
39
|
|
|
|
|
|
|
$output_hash->{max_failures} = $self->_max_failures; |
40
|
|
|
|
|
|
|
$output_hash->{vrtrack_processed_flags} = { stored => 1, assembled => 0, rna_seq_expression => 0 }; |
41
|
|
|
|
|
|
|
$output_hash->{limits} = $self->_escaped_limits; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
$output_hash->{data}{tmp_directory} = $self->_tmp_directory; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# rough guess at the maximum you expect to get |
46
|
|
|
|
|
|
|
$output_hash->{data}{genome_size} = $self->_genome_size; |
47
|
|
|
|
|
|
|
$output_hash->{data}{seq_pipeline_root} = $self->root; |
48
|
|
|
|
|
|
|
$output_hash->{data}{assembler} = $self->_assembler; |
49
|
|
|
|
|
|
|
$output_hash->{data}{assembler_exec} = $self->_assembler_exec; |
50
|
|
|
|
|
|
|
$output_hash->{data}{optimiser_exec} = $self->_optimiser_exec; |
51
|
|
|
|
|
|
|
$output_hash->{data}{max_threads} = $self->_max_threads; |
52
|
|
|
|
|
|
|
$output_hash->{data}{pipeline_version} = $self->_pipeline_version; |
53
|
|
|
|
|
|
|
$output_hash->{data}{error_correct} = $self->_error_correct; |
54
|
|
|
|
|
|
|
$output_hash->{data}{sga_exec} = $self->_sga_exec; |
55
|
|
|
|
|
|
|
$output_hash->{data}{normalise} = $self->_normalise; |
56
|
|
|
|
|
|
|
$output_hash->{data}{post_contig_filtering} = $self->_post_contig_filtering; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# Remove primers |
59
|
|
|
|
|
|
|
$output_hash->{data}{primers_file} = $self->_primers_file; |
60
|
|
|
|
|
|
|
$output_hash->{data}{remove_primers} = $self->_remove_primers; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
return $output_hash; |
63
|
|
|
|
|
|
|
}; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub _construct_filename |
66
|
|
|
|
|
|
|
{ |
67
|
|
|
|
|
|
|
my ($self, $suffix) = @_; |
68
|
|
|
|
|
|
|
my $output_filename = join('_',($self->_limits_values_part_of_filename(),$self->_assembler)); |
69
|
|
|
|
|
|
|
return $self->_filter_characters_truncate_and_add_suffix($output_filename,$suffix); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
override 'log_file_name' => sub { |
73
|
|
|
|
|
|
|
my ($self) = @_; |
74
|
|
|
|
|
|
|
return $self->_construct_filename('log'); |
75
|
|
|
|
|
|
|
}; |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
override 'config_file_name' => sub { |
78
|
|
|
|
|
|
|
my ($self) = @_; |
79
|
|
|
|
|
|
|
return $self->_construct_filename('conf'); |
80
|
|
|
|
|
|
|
}; |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
84
|
|
|
|
|
|
|
no Moose; |
85
|
|
|
|
|
|
|
1; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
__END__ |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=pod |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 NAME |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Bio::VertRes::Config::Pipelines::Assembly - A base class for generating the Assembly pipeline config file which archives data to nfs units |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 VERSION |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
version 1.133090 |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 SYNOPSIS |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
A base class for generating the Assembly pipeline config file |
102
|
|
|
|
|
|
|
use Bio::VertRes::Config::Pipelines::Assembly; |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
my $pipeline = Bio::VertRes::Config::Pipelines::Assembly->new(database => 'abc' |
105
|
|
|
|
|
|
|
config_base => '/path/to/config/base', |
106
|
|
|
|
|
|
|
limits => { project => ['project name']); |
107
|
|
|
|
|
|
|
$pipeline->to_hash(); |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 AUTHOR |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Andrew J. Page <ap13@sanger.ac.uk> |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This software is Copyright (c) 2013 by Wellcome Trust Sanger Institute. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
This is free software, licensed under: |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
The GNU General Public License, Version 3, June 2007 |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |