Closed blackpan2 closed 5 years ago
Currently, in the response JSON for motif testing and for alignment searching, we have a lot of duplicate information in the response.
For example, both have the following commonalities across a motif testing response
Example:
``` { "motifPdbId":"1YPH", "motifEcNumber":"3.4.21.1", "activeSiteResidues":[ { "residueName":"His", "residueChainName":"C", "residueId":"57", "residueAltLoc":"", "identifier":"His C 57" },... ], "alignments":[ { "queryPdbId":"1AB9", "queryEcNumber":"3.4.21.1", "rmsd":0.8217166578377232, "levenshtein":0, "alignedResidues":[ { "residueName":"HIS", "residueChainName":"B", "residueId":"57", "residueAltLoc":"", "identifier":"HIS B 57" },... ] },... ], "failedAlignments":[ { "queryPdbId":"1EQ9", "queryEcNumber":"3.4.21.1" }, { "queryPdbId":"4Q2K", "queryEcNumber":"3.4.21.1" } ], "failedPdbIds":[ ] } ```
For an alignment response, we are returning an object with inconsistent keys and that can make it difficult to access in the frontend.
``` { "entries":[ { "queryPdbId":"5MOO", "queryEcNumber":"3.4.21.4", "alignments":[ { "motifPdbId":"1AVW", "motifEcNumber":"3.4.21.4", "rmsd":0.20288088969917398, "levenshtein":0, "activeSiteResidues":[ { "residueName":"HIS", "residueChainName":"A", "residueId":"57", "residueAltLoc":"", "identifier":"HIS A 57" },... ], "alignedResidues":[ { "residueName":"HIS", "residueChainName":"A", "residueId":"57", "residueAltLoc":"", "identifier":"HIS A 57" },... ] },... ], "failedAlignments":[ ] } ], "failedPdbIds":[ ] } ```
Currently, in the response JSON for motif testing and for alignment searching, we have a lot of duplicate information in the response.
For example, both have the following commonalities across a motif testing response
Example:
Motif Test Example
``` { "motifPdbId":"1YPH", "motifEcNumber":"3.4.21.1", "activeSiteResidues":[ { "residueName":"His", "residueChainName":"C", "residueId":"57", "residueAltLoc":"", "identifier":"His C 57" },... ], "alignments":[ { "queryPdbId":"1AB9", "queryEcNumber":"3.4.21.1", "rmsd":0.8217166578377232, "levenshtein":0, "alignedResidues":[ { "residueName":"HIS", "residueChainName":"B", "residueId":"57", "residueAltLoc":"", "identifier":"HIS B 57" },... ] },... ], "failedAlignments":[ { "queryPdbId":"1EQ9", "queryEcNumber":"3.4.21.1" }, { "queryPdbId":"4Q2K", "queryEcNumber":"3.4.21.1" } ], "failedPdbIds":[ ] } ```
For an alignment response, we are returning an object with inconsistent keys and that can make it difficult to access in the frontend.
Alignment Example
``` { "entries":[ { "queryPdbId":"5MOO", "queryEcNumber":"3.4.21.4", "alignments":[ { "motifPdbId":"1AVW", "motifEcNumber":"3.4.21.4", "rmsd":0.20288088969917398, "levenshtein":0, "activeSiteResidues":[ { "residueName":"HIS", "residueChainName":"A", "residueId":"57", "residueAltLoc":"", "identifier":"HIS A 57" },... ], "alignedResidues":[ { "residueName":"HIS", "residueChainName":"A", "residueId":"57", "residueAltLoc":"", "identifier":"HIS A 57" },... ] },... ], "failedAlignments":[ ] } ], "failedPdbIds":[ ] } ```