← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/pan_genome_post_analysis
  Run on Fri Mar 27 11:43:32 2015
Reported on Fri Mar 27 11:45:50 2015

Filename/Users/ap13/pathogens/Roary/lib/Bio/Roary/OrderGenes.pm
StatementsExecuted 467208 statements in 613ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111401ms2.45sBio::Roary::OrderGenes::::_build__groups_to_file_contigsBio::Roary::OrderGenes::_build__groups_to_file_contigs
221170ms4.11sBio::Roary::OrderGenes::::_reorder_connected_componentsBio::Roary::OrderGenes::_reorder_connected_components
111102ms3.95sBio::Roary::OrderGenes::::_add_groups_to_graphBio::Roary::OrderGenes::_add_groups_to_graph
11185.8ms193msBio::Roary::OrderGenes::::_create_accessory_graphBio::Roary::OrderGenes::_create_accessory_graph
11185.1ms2.53sBio::Roary::OrderGenes::::_build_group_orderBio::Roary::OrderGenes::_build_group_order
11157.5ms102msBio::Roary::OrderGenes::::BEGIN@22Bio::Roary::OrderGenes::BEGIN@22
11131.3ms9.70sBio::Roary::OrderGenes::::_build_groups_to_contigsBio::Roary::OrderGenes::_build_groups_to_contigs
11113.7ms23.6msBio::Roary::OrderGenes::::_remove_weak_edges_from_graphBio::Roary::OrderGenes::_remove_weak_edges_from_graph
111845µs28.4msBio::Roary::OrderGenes::::BEGIN@21Bio::Roary::OrderGenes::BEGIN@21
11164µs4.69msBio::Roary::OrderGenes::::BEGIN@18Bio::Roary::OrderGenes::BEGIN@18
11127µs410µsBio::Roary::OrderGenes::::_build_group_graphsBio::Roary::OrderGenes::_build_group_graphs
11114µs140µsBio::Roary::OrderGenes::::BEGIN@352Bio::Roary::OrderGenes::BEGIN@352
11112µs26µsBio::Roary::OrderGenes::::_build_number_of_filesBio::Roary::OrderGenes::_build_number_of_files
1119µs9µsBio::Roary::OrderGenes::::__ANON__[lib/Bio/Roary/OrderGenes.pm:33]Bio::Roary::OrderGenes::__ANON__[lib/Bio/Roary/OrderGenes.pm:33]
1119µs9µsBio::Roary::OrderGenes::::BEGIN@19Bio::Roary::OrderGenes::BEGIN@19
1116µs6µsBio::Roary::OrderGenes::::BEGIN@20Bio::Roary::OrderGenes::BEGIN@20
0000s0sBio::Roary::OrderGenes::::_build_groupsBio::Roary::OrderGenes::_build_groups
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Bio::Roary::OrderGenes;
2
3# ABSTRACT: Take in GFF files and create a matrix of what genes are beside what other genes
4
5=head1 SYNOPSIS
6
7Take in the analyse groups and create a matrix of what genes are beside what other genes
8 use Bio::Roary::OrderGenes;
9
10 my $obj = Bio::Roary::OrderGenes->new(
11 analyse_groups_obj => $analyse_groups_obj,
12 gff_files => ['file1.gff','file2.gff']
13 );
14 $obj->groups_to_contigs;
15
16=cut
17
18250µs29.31ms
# spent 4.69ms (64µs+4.62) within Bio::Roary::OrderGenes::BEGIN@18 which was called: # once (64µs+4.62ms) by Bio::Roary::PostAnalysis::BEGIN@20 at line 18
use Moose;
# spent 4.69ms making 1 call to Bio::Roary::OrderGenes::BEGIN@18 # spent 4.62ms making 1 call to Moose::import
19225µs19µs
# spent 9µs within Bio::Roary::OrderGenes::BEGIN@19 which was called: # once (9µs+0s) by Bio::Roary::PostAnalysis::BEGIN@20 at line 19
use Bio::Roary::Exceptions;
# spent 9µs making 1 call to Bio::Roary::OrderGenes::BEGIN@19
20222µs16µs
# spent 6µs within Bio::Roary::OrderGenes::BEGIN@20 which was called: # once (6µs+0s) by Bio::Roary::PostAnalysis::BEGIN@20 at line 20
use Bio::Roary::AnalyseGroups;
# spent 6µs making 1 call to Bio::Roary::OrderGenes::BEGIN@20
212160µs128.4ms
# spent 28.4ms (845µs+27.5) within Bio::Roary::OrderGenes::BEGIN@21 which was called: # once (845µs+27.5ms) by Bio::Roary::PostAnalysis::BEGIN@20 at line 21
use Bio::Roary::ContigsToGeneIDsFromGFF;
# spent 28.4ms making 1 call to Bio::Roary::OrderGenes::BEGIN@21
2221.94ms1102ms
# spent 102ms (57.5+44.7) within Bio::Roary::OrderGenes::BEGIN@22 which was called: # once (57.5ms+44.7ms) by Bio::Roary::PostAnalysis::BEGIN@20 at line 22
use Graph;
# spent 102ms making 1 call to Bio::Roary::OrderGenes::BEGIN@22
23
2413µs12.73mshas 'gff_files' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
# spent 2.73ms making 1 call to Moose::has
2513µs12.63mshas 'analyse_groups_obj' => ( is => 'ro', isa => 'Bio::Roary::AnalyseGroups', required => 1 );
# spent 2.63ms making 1 call to Moose::has
2614µs12.34mshas 'group_order' => ( is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build_group_order');
# spent 2.34ms making 1 call to Moose::has
2713µs12.65mshas 'group_graphs' => ( is => 'ro', isa => 'Graph', lazy => 1, builder => '_build_group_graphs');
# spent 2.65ms making 1 call to Moose::has
2813µs12.05mshas 'groups_to_contigs' => ( is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build_groups_to_contigs');
# spent 2.05ms making 1 call to Moose::has
2914µs12.14mshas '_groups_to_file_contigs' => ( is => 'ro', isa => 'ArrayRef', lazy => 1, builder => '_build__groups_to_file_contigs');
# spent 2.14ms making 1 call to Moose::has
30
3113µs11.96mshas '_groups' => ( is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build_groups');
# spent 1.96ms making 1 call to Moose::has
3213µs12.76mshas 'number_of_files' => ( is => 'ro', isa => 'Int', lazy => 1, builder => '_build_number_of_files');
# spent 2.76ms making 1 call to Moose::has
33217µs11.76ms
# spent 9µs within Bio::Roary::OrderGenes::__ANON__[lib/Bio/Roary/OrderGenes.pm:33] which was called: # once (9µs+0s) by Bio::Roary::OrderGenes::new at line 52 of (eval 25)[Eval/Closure.pm:125]
has '_groups_qc' => ( is => 'ro', isa => 'HashRef', default => sub {{}});
# spent 1.76ms making 1 call to Moose::has
34
3512µs11.54mshas '_percentage_of_largest_weak_threshold' => ( is => 'ro', isa => 'Num', default => 0.9);
# spent 1.54ms making 1 call to Moose::has
36
37sub _build_number_of_files
38
# spent 26µs (12+13) within Bio::Roary::OrderGenes::_build_number_of_files which was called: # once (12µs+13µs) by Bio::Roary::OrderGenes::number_of_files at line 12 of (eval 25)[Eval/Closure.pm:125]
{
39219µs my ($self) = @_;
40113µs return @{$self->gff_files};
# spent 13µs making 1 call to Bio::Roary::OrderGenes::gff_files
41}
42
43sub _build_groups
44{
45 my ($self) = @_;
46 my %groups;
47 for my $group_name (@{$self->analyse_groups_obj->_groups})
48 {
49 $groups{$group_name}++;
50 }
51 return \%groups;
52}
53
54
55sub _build__groups_to_file_contigs
56
# spent 2.45s (401ms+2.05) within Bio::Roary::OrderGenes::_build__groups_to_file_contigs which was called: # once (401ms+2.05s) by Bio::Roary::OrderGenes::_groups_to_file_contigs at line 12 of (eval 25)[Eval/Closure.pm:125]
{
57550µs my ($self) = @_;
58 my @groups_to_contigs;
59 my @overlapping_hypothetical_gene_ids;
60
61 # Open each GFF file
62110µs for my $filename (@{$self->gff_files})
# spent 10µs making 1 call to Bio::Roary::OrderGenes::gff_files
63 {
6416837µs8894µs my $contigs_to_ids_obj = Bio::Roary::ContigsToGeneIDsFromGFF->new(gff_file => $filename);
# spent 894µs making 8 calls to Bio::Roary::ContigsToGeneIDsFromGFF::new, avg 112µs/call
65
66 # Loop over each contig in the GFF file
67157.1ms161.40s for my $contig_name (keys %{$contigs_to_ids_obj->contig_to_ids})
# spent 1.40s making 8 calls to Bio::Roary::ContigsToGeneIDsFromGFF::contig_to_ids, avg 175ms/call # spent 180µs making 8 calls to Bio::Roary::ContigsToGeneIDsFromGFF::DESTROY, avg 23µs/call
68 {
6913322.04ms my @groups_on_contig;
70 # loop over each gene in each contig in the GFF file
714441.15ms for my $gene_id (@{$contigs_to_ids_obj->contig_to_ids->{$contig_name}})
# spent 1.15ms making 444 calls to Bio::Roary::ContigsToGeneIDsFromGFF::contig_to_ids, avg 3µs/call
72 {
73 # convert to group name
74155372203ms80016108ms my $group_name = $self->analyse_groups_obj->_genes_to_groups->{$gene_id};
# spent 54.5ms making 40008 calls to Bio::Roary::OrderGenes::analyse_groups_obj, avg 1µs/call # spent 53.8ms making 40008 calls to Bio::Roary::AnalyseGroups::_genes_to_groups, avg 1µs/call
75 next unless(defined($group_name));
76
7737725536ms if($contigs_to_ids_obj->overlapping_hypothetical_protein_ids->{$gene_id})
# spent 536ms making 37678 calls to Bio::Roary::ContigsToGeneIDsFromGFF::overlapping_hypothetical_protein_ids, avg 14µs/call # spent 266µs making 47 calls to Bio::Roary::OrderGenes::_groups_qc, avg 6µs/call
78 {
79 $self->_groups_qc->{$group_name} = 'Hypothetical protein with no hits to refseq/uniprot/clusters/cdd/tigrfams/pfam overlapping another protein with hits';
80 }
81 push(@groups_on_contig, $group_name);
82 }
83 push(@groups_to_contigs,\@groups_on_contig);
84 }
85 }
86
87 return \@groups_to_contigs;
88
89}
90
91sub _build_group_order
92
# spent 2.53s (85.1ms+2.45) within Bio::Roary::OrderGenes::_build_group_order which was called: # once (85.1ms+2.45s) by Bio::Roary::OrderGenes::group_order at line 12 of (eval 25)[Eval/Closure.pm:125]
{
93454µs my ($self) = @_;
94 my %group_order;
95
9612.45s for my $groups_on_contig (@{$self->_groups_to_file_contigs})
# spent 2.45s making 1 call to Bio::Roary::OrderGenes::_groups_to_file_contigs
97 {
9814986064.9ms for(my $i = 1; $i < @{$groups_on_contig}; $i++)
99 {
100 my $group_from = $groups_on_contig->[$i -1];
101 my $group_to = $groups_on_contig->[$i];
102 $group_order{$group_from}{$group_to}++;
103 # TODO: remove because you only need half the matix
104 $group_order{$group_to}{$group_from}++;
105 }
1064236µs if(@{$groups_on_contig} == 1)
107 {
108 my $group_from = $groups_on_contig->[0];
109 my $group_to = $groups_on_contig->[0];
110 $group_order{$group_from}{$group_to}++;
111 }
112 }
113
114 return \%group_order;
115}
116
117sub _build_group_graphs
118
# spent 410µs (27+383) within Bio::Roary::OrderGenes::_build_group_graphs which was called: # once (27µs+383µs) by Bio::Roary::OrderGenes::group_graphs at line 12 of (eval 25)[Eval/Closure.pm:125]
{
119233µs my($self) = @_;
1201383µs return Graph->new(undirected => 1);
# spent 383µs making 1 call to Graph::new
121}
122
123
124sub _add_groups_to_graph
125
# spent 3.95s (102ms+3.85) within Bio::Roary::OrderGenes::_add_groups_to_graph which was called: # once (102ms+3.85s) by Bio::Roary::OrderGenes::_build_groups_to_contigs at line 204
{
1262930µs my($self) = @_;
127
12812.53s for my $current_group (keys %{$self->group_order()})
# spent 2.53s making 1 call to Bio::Roary::OrderGenes::group_order
129 {
130487120.7ms48719.74ms for my $group_to (keys %{$self->group_order->{$current_group}})
# spent 9.74ms making 4871 calls to Bio::Roary::OrderGenes::group_order, avg 2µs/call
131 {
1321953445.2ms976717.8ms my $weight = 1.0/($self->group_order->{$current_group}->{$group_to} );
# spent 17.8ms making 9767 calls to Bio::Roary::OrderGenes::group_order, avg 2µs/call
133195341.29s $self->group_graphs->add_weighted_edge($current_group,$group_to, $weight);
# spent 1.27s making 9767 calls to Graph::add_weighted_edge, avg 131µs/call # spent 17.6ms making 9767 calls to Bio::Roary::OrderGenes::group_graphs, avg 2µs/call
134 }
135 }
136
137}
138
139
140sub _reorder_connected_components
141
# spent 4.11s (170ms+3.94) within Bio::Roary::OrderGenes::_reorder_connected_components which was called 2 times, avg 2.05s/call: # once (165ms+3.81s) by Bio::Roary::OrderGenes::_build_groups_to_contigs at line 233 # once (4.71ms+127ms) by Bio::Roary::OrderGenes::_build_groups_to_contigs at line 214
{
14214139µs my($self, $graph_groups) = @_;
143
144 my @ordered_graph_groups;
145
146 my @paths_and_weights;
147
148 for my $graph_group( @{$graph_groups})
149 {
150
15143261.7ms365.46ms my $graph = Graph->new(undirected => 1);
# spent 5.46ms making 36 calls to Graph::new, avg 152µs/call
152 my %groups;
153 $groups{$_}++ for (@{$graph_group});
154
155 my $total_weight =0;
156 my $number_of_edges = 0;
157 for my $current_group (keys %groups)
158 {
159499116.5ms49919.88ms for my $group_to (keys %{$self->group_order->{$current_group}})
# spent 9.88ms making 4991 calls to Bio::Roary::OrderGenes::group_order, avg 2µs/call
160 {
1615003449.7ms next if(! defined($groups{$group_to}));
162999870.4ms next if($graph->has_edge($group_to,$current_group));
# spent 70.4ms making 9998 calls to Graph::has_edge, avg 7µs/call
16350059.03ms my $current_weight = $self->group_order->{$current_group}->{$group_to} ;
# spent 9.03ms making 5005 calls to Bio::Roary::OrderGenes::group_order, avg 2µs/call
16450058.85ms $current_weight = $self->number_of_files if($current_weight > $self->number_of_files);
# spent 8.85ms making 5005 calls to Bio::Roary::OrderGenes::number_of_files, avg 2µs/call
16550057.64ms my $weight = ($self->number_of_files - $current_weight) +1;
# spent 7.64ms making 5005 calls to Bio::Roary::OrderGenes::number_of_files, avg 2µs/call
166
1675005753ms $graph->add_weighted_edge($current_group,$group_to, $weight);
# spent 753ms making 5005 calls to Graph::add_weighted_edge, avg 150µs/call
168 $total_weight += $weight;
169 $number_of_edges++;
170 }
171 }
172
173 my $average_weight ;
1743646µs if($number_of_edges <= 0)
175 {
176 $average_weight = $self->number_of_files;
177 }
178 else
179 {
180 $average_weight = $total_weight/$number_of_edges;
181 }
182
183361.80s my $minimum_spanning_tree = $graph->minimum_spanning_tree;
# spent 1.80s making 36 calls to Graph::MST_Prim, avg 50.0ms/call
1843620.7ms my $dfs_obj = Graph::Traversal::DFS->new($minimum_spanning_tree);
# spent 20.7ms making 36 calls to Graph::Traversal::new, avg 575µs/call
185361.26s my @reordered_dfs_groups = $dfs_obj->dfs;
# spent 1.26s making 36 calls to Graph::Traversal::postorder, avg 34.9ms/call
186
187 push(@paths_and_weights, {
188 path => \@reordered_dfs_groups,
189 average_weight => $average_weight
190 });
191
192 }
193
194264µs my @ordered_paths_and_weights = sort { $a->{average_weight} <=> $b->{average_weight} } @paths_and_weights;
# spent 64µs making 2 calls to Bio::Roary::OrderGenes::CORE:sort, avg 32µs/call
195
196 @ordered_graph_groups = map { $_->{path}} @ordered_paths_and_weights;
197
198 return \@ordered_graph_groups;
199}
200
201sub _build_groups_to_contigs
202
# spent 9.70s (31.3ms+9.66) within Bio::Roary::OrderGenes::_build_groups_to_contigs which was called: # once (31.3ms+9.66s) by Bio::Roary::OrderGenes::groups_to_contigs at line 12 of (eval 25)[Eval/Closure.pm:125]
{
203191.95ms my($self) = @_;
20413.95s $self->_add_groups_to_graph;
# spent 3.95s making 1 call to Bio::Roary::OrderGenes::_add_groups_to_graph
205
206 my %groups_to_contigs;
207 my $counter = 1;
208 my $overall_counter = 1 ;
209 my $counter_filtered = 1;
210
211 # Accessory
2121193ms my $accessory_graph = $self->_create_accessory_graph;
# spent 193ms making 1 call to Bio::Roary::OrderGenes::_create_accessory_graph
213134.7ms my @group_graphs = $accessory_graph->connected_components();
# spent 34.7ms making 1 call to Graph::connected_components
2141132ms my $reordered_graphs = $self->_reorder_connected_components(\@group_graphs);
215
216 for my $contig_groups (@{$reordered_graphs})
217 {
218249µs my $order_counter = 1;
219
220 for my $group_name (@{$contig_groups})
221 {
222580195µs $groups_to_contigs{$group_name}{accessory_label} = $counter;
223 $groups_to_contigs{$group_name}{accessory_order} = $order_counter;
224 $groups_to_contigs{$group_name}{'accessory_overall_order'} = $overall_counter;
225 $order_counter++;
226 $overall_counter++;
227 }
228 $counter++;
229 }
230
231 # Core + accessory
23221.37s my @group_graphs_all = $self->group_graphs->connected_components();
# spent 1.37s making 1 call to Graph::connected_components # spent 6µs making 1 call to Bio::Roary::OrderGenes::group_graphs
23313.98s my $reordered_graphs_all = $self->_reorder_connected_components(\@group_graphs_all);
234
235 $overall_counter = 1;
236 $counter = 1;
237 $counter_filtered = 1;
238 for my $contig_groups (@{$reordered_graphs_all})
239 {
2408429µs my $order_counter = 1;
241
242 for my $group_name (@{$contig_groups})
243 {
2443407617.6ms $groups_to_contigs{$group_name}{label} = $counter;
245 $groups_to_contigs{$group_name}{comment} = '';
246 $groups_to_contigs{$group_name}{order} = $order_counter;
247 $groups_to_contigs{$group_name}{'core_accessory_overall_order'} = $overall_counter;
248
24997042.12ms48846.39ms if(@{$contig_groups} <= 2)
# spent 6.39ms making 4884 calls to Bio::Roary::OrderGenes::_groups_qc, avg 1µs/call
250 {
251 $groups_to_contigs{$group_name}{comment} = 'Investigate';
252 }
253 elsif($self->_groups_qc->{$group_name})
254 {
255 $groups_to_contigs{$group_name}{comment} = $self->_groups_qc->{$group_name};
256 }
257 else
258 {
259 $groups_to_contigs{$group_name}{'core_accessory_overall_order_filtered'} = $counter_filtered;
260 $counter_filtered++;
261 }
262 $order_counter++;
263 $overall_counter++;
264 }
265 $counter++;
266 }
267
268 $counter_filtered = 1;
269 for my $contig_groups (@{$reordered_graphs})
270 {
27185µs for my $group_name (@{$contig_groups})
272 {
273346174µs if( (!defined($groups_to_contigs{$group_name}{comment})) || (defined($groups_to_contigs{$group_name}{comment}) && $groups_to_contigs{$group_name}{comment} eq '') )
274 {
275 $groups_to_contigs{$group_name}{'accessory_overall_order_filtered'} = $counter_filtered;
276 $counter_filtered++;
277 }
278 }
279 }
280
281
282 return \%groups_to_contigs;
283}
284
285sub _create_accessory_graph
286
# spent 193ms (85.8+107) within Bio::Roary::OrderGenes::_create_accessory_graph which was called: # once (85.8ms+107ms) by Bio::Roary::OrderGenes::_build_groups_to_contigs at line 212
{
28774.13ms my($self) = @_;
2881145µs my $graph = Graph->new(undirected => 1);
# spent 145µs making 1 call to Graph::new
289
290 my %core_groups;
291
29212µs for my $current_group (keys %{$self->group_order()})
# spent 2µs making 1 call to Bio::Roary::OrderGenes::group_order
293 {
2941461328.0ms my $sum_of_weights = 0;
295487110.1ms for my $group_to (keys %{$self->group_order->{$current_group}})
# spent 10.1ms making 4871 calls to Bio::Roary::OrderGenes::group_order, avg 2µs/call
296 {
297976720.5ms976719.9ms $sum_of_weights += $self->group_order->{$current_group}->{$group_to};
# spent 19.9ms making 9767 calls to Bio::Roary::OrderGenes::group_order, avg 2µs/call
298 }
29948719.53ms if($sum_of_weights >= $self->number_of_files )
# spent 9.53ms making 4871 calls to Bio::Roary::OrderGenes::number_of_files, avg 2µs/call
300 {
301 $core_groups{$current_group}++;
302 }
303 }
304
305110µs for my $current_group (keys %{$self->group_order()})
# spent 10µs making 1 call to Bio::Roary::OrderGenes::group_order
306 {
30750343.48ms next if(defined($core_groups{$current_group}));
308163471µs for my $group_to (keys %{$self->group_order->{$current_group}})
# spent 471µs making 163 calls to Bio::Roary::OrderGenes::group_order, avg 3µs/call
309 {
3107701.74ms next if(defined($core_groups{$group_to}));
3114621.12ms my $weight = ($self->number_of_files - $self->group_order->{$current_group}->{$group_to}) +1;
# spent 609µs making 231 calls to Bio::Roary::OrderGenes::number_of_files, avg 3µs/call # spent 515µs making 231 calls to Bio::Roary::OrderGenes::group_order, avg 2µs/call
31223142.5ms $graph->add_weighted_edge($current_group,$group_to, $weight);
# spent 42.5ms making 231 calls to Graph::add_weighted_edge, avg 184µs/call
313 }
314 }
315123.6ms $self->_remove_weak_edges_from_graph($graph);
316 return $graph;
317}
318
319sub _remove_weak_edges_from_graph
320
# spent 23.6ms (13.7+9.91) within Bio::Roary::OrderGenes::_remove_weak_edges_from_graph which was called: # once (13.7ms+9.91ms) by Bio::Roary::OrderGenes::_create_accessory_graph at line 315
{
3212737µs my($self, $graph) = @_;
322
32313µs for my $current_group (keys %{$self->group_order()})
# spent 3µs making 1 call to Bio::Roary::OrderGenes::group_order
324 {
32553556.36ms48719.00ms next unless($graph->has_vertex($current_group));
# spent 9.00ms making 4871 calls to Graph::has_vertex, avg 2µs/call
326
327 my $largest = 0;
328120201µs for my $group_to (keys %{$self->group_order->{$current_group}})
# spent 201µs making 120 calls to Bio::Roary::OrderGenes::group_order, avg 2µs/call
329 {
330239522µs361529µs if($largest < $self->group_order->{$current_group}->{$group_to})
# spent 529µs making 361 calls to Bio::Roary::OrderGenes::group_order, avg 1µs/call
331 {
332 $largest = $self->group_order->{$current_group}->{$group_to};
333 }
334 }
335120160µs my $threshold_link = int($largest*$self->_percentage_of_largest_weak_threshold);
# spent 160µs making 120 calls to Bio::Roary::OrderGenes::_percentage_of_largest_weak_threshold, avg 1µs/call
336 next if($threshold_link <= 1);
337
33846µs for my $group_to (keys %{$self->group_order->{$current_group}})
# spent 6µs making 4 calls to Bio::Roary::OrderGenes::group_order, avg 2µs/call
339 {
340610µs69µs if($self->group_order->{$current_group}->{$group_to} < $threshold_link && $graph->has_edge($current_group,$group_to))
# spent 9µs making 6 calls to Bio::Roary::OrderGenes::group_order, avg 1µs/call
341 {
342 $graph->delete_edge($current_group, $group_to);
343 }
344 }
345 }
346
347}
348
- -
352258µs2265µs
# spent 140µs (14+125) within Bio::Roary::OrderGenes::BEGIN@352 which was called: # once (14µs+125µs) by Bio::Roary::PostAnalysis::BEGIN@20 at line 352
no Moose;
# spent 140µs making 1 call to Bio::Roary::OrderGenes::BEGIN@352 # spent 125µs making 1 call to Moose::unimport
35317µs27.09ms__PACKAGE__->meta->make_immutable;
# spent 7.08ms making 1 call to Class::MOP::Class::make_immutable # spent 14µs making 1 call to Bio::Roary::OrderGenes::meta
354
355197µs1;