[Bio] / Sprout / SproutLoad.pm Repository:
ViewVC logotype

Diff of /Sprout/SproutLoad.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.83, Fri May 11 06:37:38 2007 UTC revision 1.84, Thu May 17 23:44:51 2007 UTC
# Line 1661  Line 1661 
1661              my ($pdbID, $docking_key, @valueData) = @{$dockData};              my ($pdbID, $docking_key, @valueData) = @{$dockData};
1662              # Fix the PDB ID. It's supposed to be lower-case, but this does not always happen.              # Fix the PDB ID. It's supposed to be lower-case, but this does not always happen.
1663              $pdbID = lc $pdbID;              $pdbID = lc $pdbID;
1664                # Strip off the object type.
1665                $pdbID =~ s/pdb://;
1666              # Extract the ZINC ID from the docking key. Note that there are two possible              # Extract the ZINC ID from the docking key. Note that there are two possible
1667              # formats.              # formats.
1668              my (undef, $zinc_id) = $docking_key =~ /^docking_results::(ZINC)?(\d+)$/;              my (undef, $zinc_id) = $docking_key =~ /^docking_results::(ZINC)?(\d+)$/;
# Line 1668  Line 1670 
1670                  Trace("Invalid docking result key $docking_key for $pdbID.") if T(0);                  Trace("Invalid docking result key $docking_key for $pdbID.") if T(0);
1671                  $loadDocksWith->Add("errors");                  $loadDocksWith->Add("errors");
1672              } else {              } else {
1673                    # Get the pieces of the value and parse the energy.
1674                    # Note that we don't care about the rank, since
1675                    # we can sort on the energy level itself in our database.
1676                    my ($energy, $tool, $type) = @valueData;
1677                    my ($rank, $total, $vanderwaals, $electrostatic) = split /\s*;\s*/, $energy;
1678                    # Ignore predicted results.
1679                    if ($type ne "Predicted") {
1680                  # Count this docking result.                  # Count this docking result.
1681                  if (! exists $pdbHash{$pdbID}) {                  if (! exists $pdbHash{$pdbID}) {
1682                      $pdbHash{$pdbID} = 1;                      $pdbHash{$pdbID} = 1;
1683                  } else {                  } else {
1684                      $pdbHash{$pdbID}++;                      $pdbHash{$pdbID}++;
1685                  }                  }
1686                  # Get the pieces of the value and parse the energy.                      # Write the result to the output.
                 # Note that we don't care about the rank, since  
                 # we can sort on the energy level itself in our database.  
                 my ($energy, $tool, $type) = @valueData;  
                 my ($rank, $total, $vanderwaals, $electrostatic) = split /\s*;\s*/, $energy;  
                 # Write the results to the output.  
1687                  $loadDocksWith->Put($pdbID, $zinc_id, $electrostatic, $type, $tool,                  $loadDocksWith->Put($pdbID, $zinc_id, $electrostatic, $type, $tool,
1688                                      $total, $vanderwaals);                                      $total, $vanderwaals);
1689              }              }
1690          }          }
1691            }
1692          Trace("Connecting features.") if T(2);          Trace("Connecting features.") if T(2);
1693          # Loop through the genomes.          # Loop through the genomes.
1694          for my $genome (sort keys %{$genomeHash}) {          for my $genome (sort keys %{$genomeHash}) {
# Line 1692  Line 1697 
1697              my @attributeData = $fig->get_attributes("fig|$genome%", 'PDB::%');              my @attributeData = $fig->get_attributes("fig|$genome%", 'PDB::%');
1698              for my $pdbData (@attributeData) {              for my $pdbData (@attributeData) {
1699                  # The PDB ID is coded as a subkey.                  # The PDB ID is coded as a subkey.
1700                  if ($pdbData->[1] !~ /PDB::(.+)/) {                  if ($pdbData->[1] !~ /PDB::(.+)/i) {
1701                      Trace("Invalid PDB ID \"$pdbData->[1]\" in attribute table.") if T(0);                      Trace("Invalid PDB ID \"$pdbData->[1]\" in attribute table.") if T(0);
1702                      $loadPDB->Add("errors");                      $loadPDB->Add("errors");
1703                  } else {                  } else {

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.84

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3