340 |
my $fig = $self->{fig}; |
my $fig = $self->{fig}; |
341 |
# Get the genome hash. |
# Get the genome hash. |
342 |
my $genomeFilter = $self->{genomes}; |
my $genomeFilter = $self->{genomes}; |
343 |
my $genomeCount = (keys %{$genomeFilter}); |
# Set up an ID counter for the PCHs. |
344 |
my $featureCount = $genomeCount * 4000; |
my $pchID = 0; |
345 |
# Start the loads. |
# Start the loads. |
346 |
my $loadCoupling = $self->_TableLoader('Coupling'); |
my $loadCoupling = $self->_TableLoader('Coupling'); |
347 |
my $loadIsEvidencedBy = $self->_TableLoader('IsEvidencedBy', $self->PrimaryOnly); |
my $loadIsEvidencedBy = $self->_TableLoader('IsEvidencedBy', $self->PrimaryOnly); |
370 |
Trace("Processing PEG $peg1 for $genome.") if T(4); |
Trace("Processing PEG $peg1 for $genome.") if T(4); |
371 |
# Get a list of the coupled PEGs. |
# Get a list of the coupled PEGs. |
372 |
my @couplings = $fig->coupled_to($peg1); |
my @couplings = $fig->coupled_to($peg1); |
373 |
|
Trace(scalar(@couplings) . " couplings found for $peg1.") if T(4); |
374 |
# For each coupled PEG, we need to verify that a coupling already |
# For each coupled PEG, we need to verify that a coupling already |
375 |
# exists. If not, we have to create one. |
# exists. If not, we have to create one. |
376 |
for my $coupleData (@couplings) { |
for my $coupleData (@couplings) { |
377 |
|
Trace("Coupling string is $coupleData (should be an array).") if T(4); |
378 |
my ($peg2, $score) = @{$coupleData}; |
my ($peg2, $score) = @{$coupleData}; |
379 |
# Compute the coupling ID. |
# Compute the coupling ID. |
380 |
my $coupleID = $self->{erdb}->CouplingID($peg1, $peg2); |
my $coupleID = $self->{erdb}->CouplingID($peg1, $peg2); |
413 |
} |
} |
414 |
} |
} |
415 |
for my $evidenceID (keys %evidenceMap) { |
for my $evidenceID (keys %evidenceMap) { |
416 |
|
# Get the ID for this evidence. |
417 |
|
$pchID++; |
418 |
# Create the evidence record. |
# Create the evidence record. |
419 |
my ($peg3, $peg4, $usage) = @{$evidenceMap{$evidenceID}}; |
my ($peg3, $peg4, $usage) = @{$evidenceMap{$evidenceID}}; |
420 |
$loadPCH->Put($evidenceID, $usage); |
$loadPCH->Put($pchID, $usage); |
421 |
# Connect it to the coupling. |
# Connect it to the coupling. |
422 |
$loadIsEvidencedBy->Put($coupleID, $evidenceID); |
$loadIsEvidencedBy->Put($coupleID, $pchID); |
423 |
# Connect it to the features. |
# Connect it to the features. |
424 |
$loadUsesAsEvidence->Put($evidenceID, $peg3, 1); |
$loadUsesAsEvidence->Put($pchID, $peg3, 1); |
425 |
$loadUsesAsEvidence->Put($evidenceID, $peg4, 2); |
$loadUsesAsEvidence->Put($pchID, $peg4, 2); |
426 |
} |
} |
427 |
} |
} |
428 |
} |
} |
1574 |
$retVal->Accumulate($stats); |
$retVal->Accumulate($stats); |
1575 |
Trace("Statistics for $relName:\n" . $stats->Show()) if T(2); |
Trace("Statistics for $relName:\n" . $stats->Show()) if T(2); |
1576 |
} |
} |
|
} |
|
1577 |
# Return the load statistics. |
# Return the load statistics. |
1578 |
return $retVal; |
return $retVal; |
1579 |
} |
} |