← 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:46:14 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]
{
3911µs my ($self) = @_;
40117µs113µ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]
{
5713µs my ($self) = @_;
581400ns my @groups_to_contigs;
591200ns my @overlapping_hypothetical_gene_ids;
60
61 # Open each GFF file
62116µs110µs for my $filename (@{$self->gff_files})
# spent 10µs making 1 call to Bio::Roary::OrderGenes::gff_files
63 {
648238µ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
67857.7ms161.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 {
6944472µs my @groups_on_contig;
70 # loop over each gene in each contig in the GFF file
714441.95ms4441.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
7440008115ms80016108ms 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
75400084.79ms next unless(defined($group_name));
76
773767843.7ms37725536ms 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 }
813767838.9ms push(@groups_on_contig, $group_name);
82 }
83444561µs push(@groups_to_contigs,\@groups_on_contig);
84 }
85 }
86
87130µs 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]
{
9313µs my ($self) = @_;
9412µs my %group_order;
95
96114µs12.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 {
984448.29ms for(my $i = 1; $i < @{$groups_on_contig}; $i++)
99 {
100372436.01ms my $group_from = $groups_on_contig->[$i -1];
101372437.63ms my $group_to = $groups_on_contig->[$i];
1023724318.1ms $group_order{$group_from}{$group_to}++;
103 # TODO: remove because you only need half the matix
1043724324.2ms $group_order{$group_to}{$group_from}++;
105 }
106444683µs if(@{$groups_on_contig} == 1)
107 {
108149µs my $group_from = $groups_on_contig->[0];
109145µs my $group_to = $groups_on_contig->[0];
1101422µs $group_order{$group_from}{$group_to}++;
111 }
112 }
113
114135µs 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]
{
11913µs my($self) = @_;
120130µs1383µ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
{
12613µs my($self) = @_;
127
1281927µs12.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 {
132976717.9ms976717.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
133976727.4ms195341.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
{
14222µs my($self, $graph_groups) = @_;
143
14421µs my @ordered_graph_groups;
145
1462700ns my @paths_and_weights;
147
14825µs for my $graph_group( @{$graph_groups})
149 {
150
15136304µs365.46ms my $graph = Graph->new(undirected => 1);
# spent 5.46ms making 36 calls to Graph::new, avg 152µs/call
152369µs my %groups;
153363.03ms $groups{$_}++ for (@{$graph_group});
154
1553617µs my $total_weight =0;
1563614µs my $number_of_edges = 0;
157361.45ms for my $current_group (keys %groups)
158 {
159499118.3ms49919.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 {
161100064.55ms next if(! defined($groups{$group_to}));
162999811.7ms999870.4ms next if($graph->has_edge($group_to,$current_group));
# spent 70.4ms making 9998 calls to Graph::has_edge, avg 7µs/call
16350057.95ms50059.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
16450055.40ms50058.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
16550056.27ms50057.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
16750056.85ms5005753ms $graph->add_weighted_edge($current_group,$group_to, $weight);
# spent 753ms making 5005 calls to Graph::add_weighted_edge, avg 150µs/call
1685005996µs $total_weight += $weight;
16950054.20ms $number_of_edges++;
170 }
171 }
172
1733610µs my $average_weight ;
1743629µs if($number_of_edges <= 0)
175 {
176 $average_weight = $self->number_of_files;
177 }
178 else
179 {
1803646µs $average_weight = $total_weight/$number_of_edges;
181 }
182
18336137µs361.80s my $minimum_spanning_tree = $graph->minimum_spanning_tree;
# spent 1.80s making 36 calls to Graph::MST_Prim, avg 50.0ms/call
18436226µs3620.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
18536883µs361.26s my @reordered_dfs_groups = $dfs_obj->dfs;
# spent 1.26s making 36 calls to Graph::Traversal::postorder, avg 34.9ms/call
186
1873655.6ms push(@paths_and_weights, {
188 path => \@reordered_dfs_groups,
189 average_weight => $average_weight
190 });
191
192 }
193
194288µs264µ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
196219µs @ordered_graph_groups = map { $_->{path}} @ordered_paths_and_weights;
197
198224µs 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]
{
2031900ns my($self) = @_;
2041570µs13.95s $self->_add_groups_to_graph;
# spent 3.95s making 1 call to Bio::Roary::OrderGenes::_add_groups_to_graph
205
20614µs my %groups_to_contigs;
2071800ns my $counter = 1;
2081300ns my $overall_counter = 1 ;
2091200ns my $counter_filtered = 1;
210
211 # Accessory
212110µs1193ms my $accessory_graph = $self->_create_accessory_graph;
# spent 193ms making 1 call to Bio::Roary::OrderGenes::_create_accessory_graph
213117µs134.7ms my @group_graphs = $accessory_graph->connected_components();
# spent 34.7ms making 1 call to Graph::connected_components
21416µs1132ms my $reordered_graphs = $self->_reorder_connected_components(\@group_graphs);
215
21614µs for my $contig_groups (@{$reordered_graphs})
217 {
21881µs my $order_counter = 1;
219
22085µs for my $group_name (@{$contig_groups})
221 {
222116102µs $groups_to_contigs{$group_name}{accessory_label} = $counter;
22311630µs $groups_to_contigs{$group_name}{accessory_order} = $order_counter;
22411632µs $groups_to_contigs{$group_name}{'accessory_overall_order'} = $overall_counter;
2251165µs $order_counter++;
22611625µs $overall_counter++;
227 }
22882µs $counter++;
229 }
230
231 # Core + accessory
232111µs21.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
23314µs13.98s my $reordered_graphs_all = $self->_reorder_connected_components(\@group_graphs_all);
234
2351500ns $overall_counter = 1;
2361200ns $counter = 1;
2371300ns $counter_filtered = 1;
23811µs for my $contig_groups (@{$reordered_graphs_all})
239 {
240283µs my $order_counter = 1;
241
2422819µs for my $group_name (@{$contig_groups})
243 {
24448685.13ms $groups_to_contigs{$group_name}{label} = $counter;
24548682.21ms $groups_to_contigs{$group_name}{comment} = '';
24648681.52ms $groups_to_contigs{$group_name}{order} = $order_counter;
24748681.46ms $groups_to_contigs{$group_name}{'core_accessory_overall_order'} = $overall_counter;
248
24948686.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 {
25948521.63ms $groups_to_contigs{$group_name}{'core_accessory_overall_order_filtered'} = $counter_filtered;
2604852496µs $counter_filtered++;
261 }
262486820µs $order_counter++;
26348681.19ms $overall_counter++;
264 }
265287µs $counter++;
266 }
267
2681200ns $counter_filtered = 1;
26911µs for my $contig_groups (@{$reordered_graphs})
270 {
27185µs for my $group_name (@{$contig_groups})
272 {
27311690µs if( (!defined($groups_to_contigs{$group_name}{comment})) || (defined($groups_to_contigs{$group_name}{comment}) && $groups_to_contigs{$group_name}{comment} eq '') )
274 {
27511573µs $groups_to_contigs{$group_name}{'accessory_overall_order_filtered'} = $counter_filtered;
27611512µs $counter_filtered++;
277 }
278 }
279 }
280
281
28211.31ms 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
{
28711µs my($self) = @_;
28817µs1145µs my $graph = Graph->new(undirected => 1);
# spent 145µs making 1 call to Graph::new
289
2901200ns my %core_groups;
291
29211.69ms12µs for my $current_group (keys %{$self->group_order()})
# spent 2µs making 1 call to Bio::Roary::OrderGenes::group_order
293 {
2944871844µs my $sum_of_weights = 0;
295487116.5ms487110.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 }
299487110.7ms48719.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
30512.31ms110µs for my $current_group (keys %{$self->group_order()})
# spent 10µs making 1 call to Bio::Roary::OrderGenes::group_order
306 {
30748711.90ms next if(defined($core_groups{$current_group}));
308163783µs163471µ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 {
310308157µs next if(defined($core_groups{$group_to}));
311231922µs4621.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
312231630µs23142.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 }
3151649µs123.6ms $self->_remove_weak_edges_from_graph($graph);
3161311µs 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
{
32111µs my($self, $graph) = @_;
322
32311.42ms13µs for my $current_group (keys %{$self->group_order()})
# spent 3µs making 1 call to Bio::Roary::OrderGenes::group_order
324 {
32548715.18ms48719.00ms next unless($graph->has_vertex($current_group));
# spent 9.00ms making 4871 calls to Graph::has_vertex, avg 2µs/call
326
32712014µs my $largest = 0;
328120275µs120201µ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µs120160µ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
33612038µs next if($threshold_link <= 1);
337
33849µs46µ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;