Skip to content
Snippets Groups Projects
Commit 6a4b50d3 authored by Glenn Proctor's avatar Glenn Proctor
Browse files

More memory efficient way of doing get all genes loop

parent de5f9f65
No related branches found
No related tags found
No related merge requests found
......@@ -117,12 +117,13 @@ foreach my $to_species (@to_multi) {
print_stats($to_ga);
# Get all genes, find homologies, set xrefs
my @genes = @{$from_ga->list_dbIDs};
my $genes = $from_ga->fetch_all();
my $i = 0;
my $total_genes = scalar(@genes);
foreach my $gene_id (@genes) {
my $total_genes = count_rows($from_ga, "SELECT COUNT(*) FROM gene g");
while (my $gene = shift(@$genes)) {
my $gene = $from_ga->fetch_by_dbID($gene_id);
# next unless ($gene->biotype eq "protein_coding");
print "$i of $total_genes source genes\n" if ($i % 1000 == 0);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment