Filename | /Users/ap13/pathogens/Roary/lib/Bio/Roary/Output/EmblGroups.pm |
Statements | Executed 1520758 statements in 3.05s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 1 | 1 | 2.24s | 3.25s | _build__groups_to_files | Bio::Roary::Output::EmblGroups::
36430 | 1 | 1 | 811ms | 4.46s | _block | Bio::Roary::Output::EmblGroups::
36430 | 1 | 1 | 559ms | 872ms | _header_block | Bio::Roary::Output::EmblGroups::
2 | 2 | 1 | 469ms | 6.50s | create_files | Bio::Roary::Output::EmblGroups::
2 | 1 | 1 | 314ms | 505ms | _fragment_blocks | Bio::Roary::Output::EmblGroups::
4967 | 1 | 1 | 23.7ms | 27.5ms | _annotation_type | Bio::Roary::Output::EmblGroups::
4975 | 2 | 1 | 11.5ms | 11.5ms | _block_colour | Bio::Roary::Output::EmblGroups::
2 | 1 | 1 | 67µs | 503µs | _build__output_header_fh | Bio::Roary::Output::EmblGroups::
1 | 1 | 1 | 59µs | 4.52ms | BEGIN@19 | Bio::Roary::Output::EmblGroups::
2 | 1 | 1 | 56µs | 88µs | _build__sorted_file_names | Bio::Roary::Output::EmblGroups::
2 | 1 | 1 | 47µs | 90µs | _build_output_header_filename | Bio::Roary::Output::EmblGroups::
2 | 1 | 1 | 43µs | 341µs | _build__output_fh | Bio::Roary::Output::EmblGroups::
2 | 1 | 1 | 20µs | 20µs | _header_top | Bio::Roary::Output::EmblGroups::
1 | 1 | 1 | 12µs | 2.56ms | BEGIN@20 | Bio::Roary::Output::EmblGroups::
2 | 1 | 1 | 11µs | 11µs | _header_bottom | Bio::Roary::Output::EmblGroups::
1 | 1 | 1 | 11µs | 112µs | BEGIN@239 | Bio::Roary::Output::EmblGroups::
1 | 1 | 1 | 10µs | 10µs | BEGIN@22 | Bio::Roary::Output::EmblGroups::
1 | 1 | 1 | 8µs | 8µs | BEGIN@21 | Bio::Roary::Output::EmblGroups::
1 | 1 | 1 | 7µs | 7µs | BEGIN@23 | Bio::Roary::Output::EmblGroups::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Bio::Roary::Output::EmblGroups; | ||||
2 | |||||
3 | # ABSTRACT: Create a tab/embl file with the features for drawing pretty pictures | ||||
4 | |||||
5 | =head1 SYNOPSIS | ||||
6 | |||||
7 | reate a tab/embl file with the features for drawing pretty pictures | ||||
8 | use Bio::Roary::Output::EmblGroups; | ||||
9 | |||||
10 | my $obj = Bio::Roary::Output::EmblGroups->new( | ||||
11 | output_filename => 'group_statitics.csv', | ||||
12 | annotate_groups_obj => $annotate_groups_obj, | ||||
13 | analyse_groups_obj => $analyse_groups_obj | ||||
14 | ); | ||||
15 | $obj->create_file; | ||||
16 | |||||
17 | =cut | ||||
18 | |||||
19 | 2 | 56µs | 2 | 8.98ms | # spent 4.52ms (59µs+4.46) within Bio::Roary::Output::EmblGroups::BEGIN@19 which was called:
# once (59µs+4.46ms) by Bio::Roary::PostAnalysis::BEGIN@21 at line 19 # spent 4.52ms making 1 call to Bio::Roary::Output::EmblGroups::BEGIN@19
# spent 4.46ms making 1 call to Moose::import |
20 | 2 | 32µs | 2 | 5.12ms | # spent 2.56ms (12µs+2.55) within Bio::Roary::Output::EmblGroups::BEGIN@20 which was called:
# once (12µs+2.55ms) by Bio::Roary::PostAnalysis::BEGIN@21 at line 20 # spent 2.56ms making 1 call to Bio::Roary::Output::EmblGroups::BEGIN@20
# spent 2.55ms making 1 call to POSIX::import |
21 | 2 | 23µs | 1 | 8µs | # spent 8µs within Bio::Roary::Output::EmblGroups::BEGIN@21 which was called:
# once (8µs+0s) by Bio::Roary::PostAnalysis::BEGIN@21 at line 21 # spent 8µs making 1 call to Bio::Roary::Output::EmblGroups::BEGIN@21 |
22 | 2 | 26µs | 1 | 10µs | # spent 10µs within Bio::Roary::Output::EmblGroups::BEGIN@22 which was called:
# once (10µs+0s) by Bio::Roary::PostAnalysis::BEGIN@21 at line 22 # spent 10µs making 1 call to Bio::Roary::Output::EmblGroups::BEGIN@22 |
23 | 2 | 1.23ms | 1 | 7µs | # spent 7µs within Bio::Roary::Output::EmblGroups::BEGIN@23 which was called:
# once (7µs+0s) by Bio::Roary::PostAnalysis::BEGIN@21 at line 23 # spent 7µs making 1 call to Bio::Roary::Output::EmblGroups::BEGIN@23 |
24 | |||||
25 | 1 | 2µs | 1 | 2.65ms | has 'annotate_groups_obj' => ( is => 'ro', isa => 'Bio::Roary::AnnotateGroups', required => 1 ); # spent 2.65ms making 1 call to Moose::has |
26 | 1 | 2µs | 1 | 1.57ms | has 'analyse_groups_obj' => ( is => 'ro', isa => 'Bio::Roary::AnalyseGroups', required => 1 ); # spent 1.57ms making 1 call to Moose::has |
27 | 1 | 2µs | 1 | 1.57ms | has 'output_filename' => ( is => 'ro', isa => 'Str', default => 'core_accessory.tab' ); # spent 1.57ms making 1 call to Moose::has |
28 | 1 | 3µs | 1 | 2.39ms | has 'output_header_filename' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build_output_header_filename'); # spent 2.39ms making 1 call to Moose::has |
29 | 1 | 3µs | 1 | 2.00ms | has 'groups_to_contigs' => ( is => 'ro', isa => 'Maybe[HashRef]'); # spent 2.00ms making 1 call to Moose::has |
30 | 1 | 3µs | 1 | 3.04ms | has 'ordering_key' => ( is => 'ro', isa => 'Str', default => 'core_accessory_overall_order' ); # spent 3.04ms making 1 call to Moose::has |
31 | |||||
32 | 1 | 3µs | 1 | 1.97ms | has '_output_fh' => ( is => 'ro', lazy => 1, builder => '_build__output_fh' ); # spent 1.97ms making 1 call to Moose::has |
33 | 1 | 2µs | 1 | 1.78ms | has '_output_header_fh' => ( is => 'ro', lazy => 1, builder => '_build__output_header_fh' ); # spent 1.78ms making 1 call to Moose::has |
34 | 1 | 2µs | 1 | 1.90ms | has '_sorted_file_names' => ( is => 'ro', isa => 'ArrayRef', lazy => 1, builder => '_build__sorted_file_names' ); # spent 1.90ms making 1 call to Moose::has |
35 | 1 | 3µs | 1 | 1.81ms | has '_groups_to_files' => ( is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build__groups_to_files' ); # spent 1.81ms making 1 call to Moose::has |
36 | |||||
37 | # spent 341µs (43+298) within Bio::Roary::Output::EmblGroups::_build__output_fh which was called 2 times, avg 171µs/call:
# 2 times (43µs+298µs) by Bio::Roary::Output::EmblGroups::_output_fh at line 11 of (eval 25)[Eval/Closure.pm:125], avg 171µs/call | ||||
38 | 6 | 334µs | my ($self) = @_; | ||
39 | 4 | 298µs | open( my $fh, '>', $self->output_filename ) # spent 287µs making 2 calls to Bio::Roary::Output::EmblGroups::CORE:open, avg 144µs/call
# spent 10µs making 2 calls to Bio::Roary::Output::EmblGroups::output_filename, avg 5µs/call | ||
40 | or Bio::Roary::Exceptions::CouldntWriteToFile->throw( | ||||
41 | error => "Couldnt write output file:" . $self->output_filename ); | ||||
42 | return $fh; | ||||
43 | } | ||||
44 | |||||
45 | sub _build__output_header_fh | ||||
46 | # spent 503µs (67+436) within Bio::Roary::Output::EmblGroups::_build__output_header_fh which was called 2 times, avg 252µs/call:
# 2 times (67µs+436µs) by Bio::Roary::Output::EmblGroups::_output_header_fh at line 11 of (eval 25)[Eval/Closure.pm:125], avg 252µs/call | ||||
47 | 6 | 316µs | my ($self) = @_; | ||
48 | 4 | 437µs | open( my $fh, '>', $self->output_header_filename ) # spent 252µs making 2 calls to Bio::Roary::Output::EmblGroups::CORE:open, avg 126µs/call
# spent 184µs making 2 calls to Bio::Roary::Output::EmblGroups::output_header_filename, avg 92µs/call | ||
49 | or Bio::Roary::Exceptions::CouldntWriteToFile->throw( | ||||
50 | error => "Couldnt write output file:" . $self->output_filename ); | ||||
51 | return $fh; | ||||
52 | } | ||||
53 | |||||
54 | sub _build_output_header_filename | ||||
55 | # spent 90µs (47+44) within Bio::Roary::Output::EmblGroups::_build_output_header_filename which was called 2 times, avg 45µs/call:
# 2 times (47µs+44µs) by Bio::Roary::Output::EmblGroups::output_header_filename at line 12 of (eval 25)[Eval/Closure.pm:125], avg 45µs/call | ||||
56 | 8 | 77µs | my ($self) = @_; | ||
57 | 2 | 14µs | my $base_name = $self->output_filename; # spent 14µs making 2 calls to Bio::Roary::Output::EmblGroups::output_filename, avg 7µs/call | ||
58 | 2 | 29µs | $base_name =~ s/\.tab/.header.embl/i; # spent 29µs making 2 calls to Bio::Roary::Output::EmblGroups::CORE:subst, avg 15µs/call | ||
59 | return $base_name; | ||||
60 | } | ||||
61 | |||||
62 | # spent 88µs (56+33) within Bio::Roary::Output::EmblGroups::_build__sorted_file_names which was called 2 times, avg 44µs/call:
# 2 times (56µs+33µs) by Bio::Roary::Output::EmblGroups::_sorted_file_names at line 12 of (eval 25)[Eval/Closure.pm:125], avg 44µs/call | ||||
63 | 6 | 66µs | my ($self) = @_; | ||
64 | 6 | 33µs | my @sorted_file_names = sort( @{ $self->analyse_groups_obj->fasta_files } ); # spent 17µs making 2 calls to Bio::Roary::Output::EmblGroups::analyse_groups_obj, avg 8µs/call
# spent 8µs making 2 calls to Bio::Roary::Output::EmblGroups::CORE:sort, avg 4µs/call
# spent 8µs making 2 calls to Bio::Roary::AnalyseGroups::fasta_files, avg 4µs/call | ||
65 | return \@sorted_file_names; | ||||
66 | } | ||||
67 | |||||
68 | # spent 3.25s (2.24+1.01) within Bio::Roary::Output::EmblGroups::_build__groups_to_files which was called 2 times, avg 1.62s/call:
# 2 times (2.24s+1.01s) by Bio::Roary::Output::EmblGroups::_groups_to_files at line 12 of (eval 25)[Eval/Closure.pm:125], avg 1.62s/call | ||||
69 | 8 | 3.78ms | my ($self) = @_; | ||
70 | my %groups_to_files; | ||||
71 | 4 | 26.4ms | for my $group ( @{ $self->annotate_groups_obj->_groups } ) { # spent 26.4ms making 2 calls to Bio::Roary::AnnotateGroups::_groups, avg 13.2ms/call
# spent 4µs making 2 calls to Bio::Roary::Output::EmblGroups::annotate_groups_obj, avg 2µs/call | ||
72 | 145720 | 185ms | 72860 | 134ms | my $genes = $self->annotate_groups_obj->_groups_to_id_names->{$group}; # spent 70.6ms making 36430 calls to Bio::Roary::AnnotateGroups::_groups_to_id_names, avg 2µs/call
# spent 63.9ms making 36430 calls to Bio::Roary::Output::EmblGroups::annotate_groups_obj, avg 2µs/call |
73 | my %filenames; | ||||
74 | for my $gene_name ( @{$genes} ) { | ||||
75 | 577168 | 1.29s | 577168 | 846ms | my $filename = $self->analyse_groups_obj->_genes_to_file->{$gene_name}; # spent 436ms making 288584 calls to Bio::Roary::Output::EmblGroups::analyse_groups_obj, avg 2µs/call
# spent 410ms making 288584 calls to Bio::Roary::AnalyseGroups::_genes_to_file, avg 1µs/call |
76 | push( @{ $filenames{$filename} }, $gene_name ); | ||||
77 | } | ||||
78 | $groups_to_files{$group} = \%filenames; | ||||
79 | } | ||||
80 | return \%groups_to_files; | ||||
81 | } | ||||
82 | |||||
83 | # spent 4.46s (811ms+3.65) within Bio::Roary::Output::EmblGroups::_block which was called 36430 times, avg 122µs/call:
# 36430 times (811ms+3.65s) by Bio::Roary::Output::EmblGroups::create_files at line 229, avg 122µs/call | ||||
84 | 195390 | 375ms | my ( $self, $group ) = @_; | ||
85 | my @taxon_names_array; | ||||
86 | 72860 | 114ms | my $annotated_group_name = $self->annotate_groups_obj->_groups_to_consensus_gene_names->{$group}; # spent 64.6ms making 36430 calls to Bio::Roary::AnnotateGroups::_groups_to_consensus_gene_names, avg 2µs/call
# spent 49.7ms making 36430 calls to Bio::Roary::Output::EmblGroups::annotate_groups_obj, avg 1µs/call | ||
87 | |||||
88 | 82596 | 121ms | return '' if(!(defined($self->groups_to_contigs->{$annotated_group_name}) && defined($self->groups_to_contigs->{$annotated_group_name}->{$self->ordering_key}) )); # spent 82.8ms making 59513 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 1µs/call
# spent 38.1ms making 23083 calls to Bio::Roary::Output::EmblGroups::ordering_key, avg 2µs/call | ||
89 | |||||
90 | 9934 | 14.2ms | return '' if(defined($self->groups_to_contigs->{$annotated_group_name}->{comment}) && $self->groups_to_contigs->{$annotated_group_name}->{comment} ne ''); # spent 14.2ms making 9934 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 1µs/call | ||
91 | |||||
92 | 9934 | 15.4ms | my $coordindates = $self->groups_to_contigs->{$annotated_group_name}->{$self->ordering_key}; # spent 8.38ms making 4967 calls to Bio::Roary::Output::EmblGroups::ordering_key, avg 2µs/call
# spent 6.98ms making 4967 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 1µs/call | ||
93 | |||||
94 | 4967 | 10.9ms | for my $filename ( @{ $self->_sorted_file_names } ) { # spent 10.9ms making 4967 calls to Bio::Roary::Output::EmblGroups::_sorted_file_names, avg 2µs/call | ||
95 | 79472 | 90.7ms | 39736 | 3.32s | my $group_to_file_genes = $self->_groups_to_files->{$group}->{$filename}; # spent 3.32s making 39736 calls to Bio::Roary::Output::EmblGroups::_groups_to_files, avg 84µs/call |
96 | |||||
97 | 150724 | 148ms | if ( defined($group_to_file_genes) && @{$group_to_file_genes} > 0 ) { | ||
98 | my $filename_cpy = $filename; | ||||
99 | 37681 | 44.9ms | $filename_cpy =~ s!\.gff\.proteome\.faa!!; # spent 44.9ms making 37681 calls to Bio::Roary::Output::EmblGroups::CORE:subst, avg 1µs/call | ||
100 | push( @taxon_names_array, $filename_cpy ); | ||||
101 | next; | ||||
102 | } | ||||
103 | } | ||||
104 | |||||
105 | my $colour = 4; | ||||
106 | |||||
107 | my $taxon_names = join(" ",@taxon_names_array); | ||||
108 | |||||
109 | my $tab_file_entry = "FT variation $coordindates\n"; | ||||
110 | $tab_file_entry .= "FT /colour=$colour\n"; | ||||
111 | $tab_file_entry .= "FT /gene=$annotated_group_name\n"; | ||||
112 | $tab_file_entry .= "FT /taxa=\"$taxon_names\"\n"; | ||||
113 | |||||
114 | return $tab_file_entry; | ||||
115 | } | ||||
116 | |||||
117 | sub _block_colour | ||||
118 | # spent 11.5ms within Bio::Roary::Output::EmblGroups::_block_colour which was called 4975 times, avg 2µs/call:
# 4967 times (11.5ms+0s) by Bio::Roary::Output::EmblGroups::_header_block at line 158, avg 2µs/call
# 8 times (46µs+0s) by Bio::Roary::Output::EmblGroups::_fragment_blocks at line 216, avg 6µs/call | ||||
119 | 15401 | 15.5ms | my ( $self, $accessory_label ) = @_; | ||
120 | my $colour = 2; | ||||
121 | return $colour unless(defined($accessory_label) ); | ||||
122 | |||||
123 | $colour += $accessory_label % 6; | ||||
124 | return $colour; | ||||
125 | } | ||||
126 | |||||
127 | |||||
128 | sub _header_top | ||||
129 | # spent 20µs within Bio::Roary::Output::EmblGroups::_header_top which was called 2 times, avg 10µs/call:
# 2 times (20µs+0s) by Bio::Roary::Output::EmblGroups::create_files at line 226, avg 10µs/call | ||||
130 | 12 | 22µs | my ( $self) = @_; | ||
131 | my $header_lines = 'ID Genome standard; DNA; PRO; 1234 BP.'."\n"; | ||||
132 | $header_lines .= 'XX'."\n"; | ||||
133 | $header_lines .= 'FH Key Location/Qualifiers'."\n"; | ||||
134 | $header_lines .= 'FH'."\n"; | ||||
135 | return $header_lines; | ||||
136 | } | ||||
137 | |||||
138 | sub _header_bottom | ||||
139 | # spent 11µs within Bio::Roary::Output::EmblGroups::_header_bottom which was called 2 times, avg 6µs/call:
# 2 times (11µs+0s) by Bio::Roary::Output::EmblGroups::create_files at line 233, avg 6µs/call | ||||
140 | 10 | 23µs | my ( $self) = @_; | ||
141 | my $header_lines = 'XX'."\n"; | ||||
142 | $header_lines .= 'SQ Sequence 1234 BP; 789 A; 1717 C; 1693 G; 691 T; 0 other;'."\n"; | ||||
143 | $header_lines .= '//'."\n"; | ||||
144 | return $header_lines; | ||||
145 | } | ||||
146 | |||||
147 | sub _header_block | ||||
148 | # spent 872ms (559+313) within Bio::Roary::Output::EmblGroups::_header_block which was called 36430 times, avg 24µs/call:
# 36430 times (559ms+313ms) by Bio::Roary::Output::EmblGroups::create_files at line 230, avg 24µs/call | ||||
149 | 190423 | 376ms | my ( $self, $group ) = @_; | ||
150 | 72860 | 115ms | my $annotated_group_name = $self->annotate_groups_obj->_groups_to_consensus_gene_names->{$group}; # spent 65.7ms making 36430 calls to Bio::Roary::AnnotateGroups::_groups_to_consensus_gene_names, avg 2µs/call
# spent 49.3ms making 36430 calls to Bio::Roary::Output::EmblGroups::annotate_groups_obj, avg 1µs/call | ||
151 | my $colour = 1; | ||||
152 | |||||
153 | 82596 | 122ms | return '' if(!(defined($self->groups_to_contigs->{$annotated_group_name}) && defined($self->groups_to_contigs->{$annotated_group_name}->{$self->ordering_key}) )); # spent 83.7ms making 59513 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 1µs/call
# spent 37.9ms making 23083 calls to Bio::Roary::Output::EmblGroups::ordering_key, avg 2µs/call | ||
154 | 9934 | 14.3ms | return '' if(defined($self->groups_to_contigs->{$annotated_group_name}->{comment}) && $self->groups_to_contigs->{$annotated_group_name}->{comment} ne ''); # spent 14.3ms making 9934 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 1µs/call | ||
155 | 9934 | 15.3ms | my $coordindates = $self->groups_to_contigs->{$annotated_group_name}->{$self->ordering_key}; # spent 8.34ms making 4967 calls to Bio::Roary::Output::EmblGroups::ordering_key, avg 2µs/call
# spent 6.95ms making 4967 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 1µs/call | ||
156 | 4967 | 27.5ms | my $annotation_type = $self->_annotation_type($annotated_group_name); # spent 27.5ms making 4967 calls to Bio::Roary::Output::EmblGroups::_annotation_type, avg 6µs/call | ||
157 | |||||
158 | 9934 | 19.6ms | $colour = $self->_block_colour($self->groups_to_contigs->{$annotated_group_name}->{accessory_label}); # spent 11.5ms making 4967 calls to Bio::Roary::Output::EmblGroups::_block_colour, avg 2µs/call
# spent 8.14ms making 4967 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 2µs/call | ||
159 | |||||
160 | my $tab_file_entry = "FT$annotation_type$coordindates\n"; | ||||
161 | $tab_file_entry .= "FT /label=$annotated_group_name\n"; | ||||
162 | $tab_file_entry .= "FT /locus_tag=$annotated_group_name\n"; | ||||
163 | $tab_file_entry .= "FT /colour=$colour\n"; | ||||
164 | |||||
165 | return $tab_file_entry; | ||||
166 | } | ||||
167 | |||||
168 | sub _annotation_type | ||||
169 | # spent 27.5ms (23.7+3.86) within Bio::Roary::Output::EmblGroups::_annotation_type which was called 4967 times, avg 6µs/call:
# 4967 times (23.7ms+3.86ms) by Bio::Roary::Output::EmblGroups::_header_block at line 156, avg 6µs/call | ||||
170 | 19868 | 29.0ms | my ( $self, $annotated_group_name ) = @_; | ||
171 | my $annotation_type = " feature "; | ||||
172 | 4967 | 3.86ms | if($annotated_group_name =~ /group_/) # spent 3.86ms making 4967 calls to Bio::Roary::Output::EmblGroups::CORE:match, avg 778ns/call | ||
173 | { | ||||
174 | $annotation_type = " misc_feature "; | ||||
175 | } | ||||
176 | return $annotation_type; | ||||
177 | } | ||||
178 | |||||
179 | sub _fragment_blocks | ||||
180 | # spent 505ms (314+191) within Bio::Roary::Output::EmblGroups::_fragment_blocks which was called 2 times, avg 252ms/call:
# 2 times (314ms+191ms) by Bio::Roary::Output::EmblGroups::create_files at line 232, avg 252ms/call | ||||
181 | 8 | 2.53ms | my ( $self, $fh ) = @_; | ||
182 | my %fragment_numbers; | ||||
183 | 4 | 14.8ms | for my $group ( @{ $self->annotate_groups_obj->_groups }) # spent 14.8ms making 2 calls to Bio::Roary::AnnotateGroups::_groups, avg 7.40ms/call
# spent 6µs making 2 calls to Bio::Roary::Output::EmblGroups::annotate_groups_obj, avg 3µs/call | ||
184 | { | ||||
185 | 73552 | 193ms | 72860 | 120ms | my $annotated_group_name = $self->annotate_groups_obj->_groups_to_consensus_gene_names->{$group}; # spent 65.4ms making 36430 calls to Bio::Roary::AnnotateGroups::_groups_to_consensus_gene_names, avg 2µs/call
# spent 54.8ms making 36430 calls to Bio::Roary::Output::EmblGroups::annotate_groups_obj, avg 2µs/call |
186 | |||||
187 | 36430 | 52.8ms | next unless(defined($self->groups_to_contigs->{$annotated_group_name}->{accessory_label})); # spent 52.8ms making 36430 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 1µs/call | ||
188 | 464 | 1.11ms | next unless(defined($self->groups_to_contigs->{$annotated_group_name}->{$self->ordering_key})); # spent 784µs making 232 calls to Bio::Roary::Output::EmblGroups::ordering_key, avg 3µs/call
# spent 329µs making 232 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 1µs/call | ||
189 | 460 | 757µs | next if($self->groups_to_contigs->{$annotated_group_name}->{$self->ordering_key} eq ''); # spent 411µs making 230 calls to Bio::Roary::Output::EmblGroups::ordering_key, avg 2µs/call
# spent 346µs making 230 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 2µs/call | ||
190 | 690 | 1.09ms | push(@{$fragment_numbers{$self->groups_to_contigs->{$annotated_group_name}->{accessory_label}} }, $self->groups_to_contigs->{$annotated_group_name}->{$self->ordering_key}); # spent 675µs making 460 calls to Bio::Roary::Output::EmblGroups::groups_to_contigs, avg 1µs/call
# spent 412µs making 230 calls to Bio::Roary::Output::EmblGroups::ordering_key, avg 2µs/call | ||
191 | } | ||||
192 | |||||
193 | for my $accessory_label (keys %fragment_numbers) | ||||
194 | { | ||||
195 | 48 | 319µs | next unless(defined($fragment_numbers{$accessory_label})); | ||
196 | 8 | 56µs | my @sorted_fragment = sort {$a <=> $b} @{$fragment_numbers{$accessory_label} }; # spent 56µs making 8 calls to Bio::Roary::Output::EmblGroups::CORE:sort, avg 7µs/call | ||
197 | my $tab_file_entry = ''; | ||||
198 | 30 | 28µs | if(@sorted_fragment > 1) | ||
199 | { | ||||
200 | my $min = $sorted_fragment[0]; | ||||
201 | my $max = $sorted_fragment[-1]; | ||||
202 | |||||
203 | next if(!defined($min) || !defined($max) || $min eq '' || $max eq ''); | ||||
204 | $tab_file_entry = "FT feature $min".'..'."$max\n"; | ||||
205 | } | ||||
206 | elsif(@sorted_fragment == 1) | ||||
207 | { | ||||
208 | my $min = $sorted_fragment[0]; | ||||
209 | next if(!defined($min) || $min eq ''); | ||||
210 | $tab_file_entry = "FT feature $min\n"; | ||||
211 | } | ||||
212 | else | ||||
213 | { | ||||
214 | next; | ||||
215 | } | ||||
216 | 8 | 46µs | $tab_file_entry .= "FT /colour=".$self->_block_colour($accessory_label)."\n"; # spent 46µs making 8 calls to Bio::Roary::Output::EmblGroups::_block_colour, avg 6µs/call | ||
217 | |||||
218 | 8 | 12µs | print {$fh} $tab_file_entry; # spent 12µs making 8 calls to Bio::Roary::Output::EmblGroups::CORE:print, avg 2µs/call | ||
219 | } | ||||
220 | |||||
221 | } | ||||
222 | |||||
223 | # spent 6.50s (469ms+6.03) within Bio::Roary::Output::EmblGroups::create_files which was called 2 times, avg 3.25s/call:
# once (246ms+3.40s) by Bio::Roary::PostAnalysis::_create_embl_files at line 193 of lib/Bio/Roary/PostAnalysis.pm
# once (223ms+2.63s) by Bio::Roary::PostAnalysis::_create_embl_files at line 202 of lib/Bio/Roary/PostAnalysis.pm | ||||
224 | 14 | 3.39ms | my ($self) = @_; | ||
225 | |||||
226 | 6 | 600µs | print { $self->_output_header_fh } $self->_header_top(); # spent 569µs making 2 calls to Bio::Roary::Output::EmblGroups::_output_header_fh, avg 284µs/call
# spent 20µs making 2 calls to Bio::Roary::Output::EmblGroups::_header_top, avg 10µs/call
# spent 11µs making 2 calls to Bio::Roary::Output::EmblGroups::CORE:print, avg 5µs/call | ||
227 | 4 | 20.4ms | for my $group ( @{ $self->annotate_groups_obj->_groups }) # spent 20.3ms making 2 calls to Bio::Roary::AnnotateGroups::_groups, avg 10.2ms/call
# spent 13µs making 2 calls to Bio::Roary::Output::EmblGroups::annotate_groups_obj, avg 7µs/call | ||
228 | { | ||||
229 | 72860 | 342ms | 109290 | 4.55s | print { $self->_output_fh } $self->_block($group); # spent 4.46s making 36430 calls to Bio::Roary::Output::EmblGroups::_block, avg 122µs/call
# spent 72.4ms making 36430 calls to Bio::Roary::Output::EmblGroups::_output_fh, avg 2µs/call
# spent 17.3ms making 36430 calls to Bio::Roary::Output::EmblGroups::CORE:print, avg 475ns/call |
230 | 109290 | 960ms | print { $self->_output_header_fh } $self->_header_block($group); # spent 872ms making 36430 calls to Bio::Roary::Output::EmblGroups::_header_block, avg 24µs/call
# spent 73.5ms making 36430 calls to Bio::Roary::Output::EmblGroups::_output_header_fh, avg 2µs/call
# spent 14.8ms making 36430 calls to Bio::Roary::Output::EmblGroups::CORE:print, avg 407ns/call | ||
231 | } | ||||
232 | 4 | 505ms | $self->_fragment_blocks($self->_output_header_fh); # spent 505ms making 2 calls to Bio::Roary::Output::EmblGroups::_fragment_blocks, avg 252ms/call
# spent 26µs making 2 calls to Bio::Roary::Output::EmblGroups::_output_header_fh, avg 13µs/call | ||
233 | 6 | 24µs | print { $self->_output_header_fh } $self->_header_bottom(); # spent 11µs making 2 calls to Bio::Roary::Output::EmblGroups::_header_bottom, avg 6µs/call
# spent 11µs making 2 calls to Bio::Roary::Output::EmblGroups::_output_header_fh, avg 6µs/call
# spent 2µs making 2 calls to Bio::Roary::Output::EmblGroups::CORE:print, avg 900ns/call | ||
234 | 4 | 310µs | close( $self->_output_header_fh); # spent 305µs making 2 calls to Bio::Roary::Output::EmblGroups::CORE:close, avg 152µs/call
# spent 5µs making 2 calls to Bio::Roary::Output::EmblGroups::_output_header_fh, avg 2µs/call | ||
235 | 4 | 219µs | close( $self->_output_fh ); # spent 204µs making 2 calls to Bio::Roary::Output::EmblGroups::CORE:close, avg 102µs/call
# spent 15µs making 2 calls to Bio::Roary::Output::EmblGroups::_output_fh, avg 7µs/call | ||
236 | } | ||||
237 | |||||
238 | |||||
239 | 2 | 50µs | 2 | 213µs | # spent 112µs (11+101) within Bio::Roary::Output::EmblGroups::BEGIN@239 which was called:
# once (11µs+101µs) by Bio::Roary::PostAnalysis::BEGIN@21 at line 239 # spent 112µs making 1 call to Bio::Roary::Output::EmblGroups::BEGIN@239
# spent 101µs making 1 call to Moose::unimport |
240 | 1 | 7µs | 2 | 7.22ms | __PACKAGE__->meta->make_immutable; # spent 7.21ms making 1 call to Class::MOP::Class::make_immutable
# spent 15µs making 1 call to Bio::Roary::Output::EmblGroups::meta |
241 | |||||
242 | 1 | 62µs | 1; |