676 |
for my $genomeID (@genomes) { |
for my $genomeID (@genomes) { |
677 |
# Only process this genome if it's one of ours. |
# Only process this genome if it's one of ours. |
678 |
if (exists $genomeHash->{$genomeID}) { |
if (exists $genomeHash->{$genomeID}) { |
679 |
|
Trace("Processing genome $genomeID for subsystem $subsysID."); |
680 |
# Connect the genome to the subsystem. |
# Connect the genome to the subsystem. |
681 |
$loadParticipatesIn->Put($genomeID, $subsysID); |
$loadParticipatesIn->Put($genomeID, $subsysID); |
682 |
|
# Count the PEGs and cells found for verification purposes. |
683 |
|
my $pegCount = 0; |
684 |
|
my $cellCount = 0; |
685 |
# Loop through the subsystem's roles. We use an index because it is |
# Loop through the subsystem's roles. We use an index because it is |
686 |
# part of the spreadsheet cell ID. |
# part of the spreadsheet cell ID. |
687 |
for (my $i = 0; $i <= $#roles; $i++) { |
for (my $i = 0; $i <= $#roles; $i++) { |
691 |
# Only proceed if features exist. |
# Only proceed if features exist. |
692 |
if (@pegs > 0) { |
if (@pegs > 0) { |
693 |
# Create the spreadsheet cell. |
# Create the spreadsheet cell. |
694 |
|
$cellCount++; |
695 |
my $cellID = "$subsysID:$genomeID:$i"; |
my $cellID = "$subsysID:$genomeID:$i"; |
696 |
$loadSSCell->Put($cellID); |
$loadSSCell->Put($cellID); |
697 |
$loadIsGenomeOf->Put($genomeID, $cellID); |
$loadIsGenomeOf->Put($genomeID, $cellID); |
700 |
# Attach the features to it. |
# Attach the features to it. |
701 |
for my $pegID (@pegs) { |
for my $pegID (@pegs) { |
702 |
$loadContainsFeature->Put($cellID, $pegID); |
$loadContainsFeature->Put($cellID, $pegID); |
703 |
|
$pegCount++; |
704 |
} |
} |
705 |
} |
} |
706 |
} |
} |
707 |
|
Trace("$pegCount PEGs found in $cellCount cells.") if T(3); |
708 |
} |
} |
709 |
} |
} |
710 |
} |
} |