Skip to content

Commit

Permalink
Issue #472, ISPyB-91 : Now uses 'MR.pdb' for the MR map
Browse files Browse the repository at this point in the history
  • Loading branch information
Olof Svensson committed Nov 21, 2018
1 parent 1d3769a commit a1216fb
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions js/mx/view/phasingview/phasinggridview.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ PhasingGridView.prototype.printHTML = function(target) {
}
}
} else if (step == "REFINEMENT") {
var pdbFileId = -1;
var refinedPdbFileId = -1;
var mrPdbFileId = -1;
var mapsArr = steps[z].map.split(",");
var pdbsArr = steps[z].pdb.split(",");
if ("mapFileName" in steps[z]) {
Expand All @@ -182,29 +183,33 @@ PhasingGridView.prototype.printHTML = function(target) {
var pdbFileNamesArr = steps[z].pdbFileName.split(",");
for (var i = 0; i < pdbFileNamesArr.length; i++) {
if (pdbFileNamesArr[i] == "refined.pdb") {
pdbFileId = pdbsArr[i];
refinedPdbFileId = pdbsArr[i];
} else if (pdbFileNamesArr[i] == "MR.pdb") {
mrPdbFileId = pdbsArr[i];
}
}
} else {
var pdbFileNamesArr = [];
}
if (pdbFileId != -1) {
if (mrPdbFileId != -1) {
index2FOFC_MR = mapFileNamesArr.indexOf("2FOFC_MR");
indexFOFC_MR = mapFileNamesArr.indexOf("FOFC_MR");
index2FOFC_REFINE = mapFileNamesArr.indexOf("2FOFC_REFINE");
indexFOFC_REFINE = mapFileNamesArr.indexOf("FOFC_REFINE");
if ( (index2FOFC_MR == -1) || (indexFOFC_MR) == -1) {
listUglyMol.push("");
} else {
var pdbUrl = EXI.getDataAdapter().mx.phasing.downloadPhasingFilesByPhasingAttachmentId( pdbFileId );
var pdbUrl = EXI.getDataAdapter().mx.phasing.downloadPhasingFilesByPhasingAttachmentId( mrPdbFileId );
var mapUrl1 = EXI.getDataAdapter().mx.phasing.downloadPhasingFilesByPhasingAttachmentId( mapsArr[index2FOFC_MR]);
var mapUrl2 = EXI.getDataAdapter().mx.phasing.downloadPhasingFilesByPhasingAttachmentId( mapsArr[indexFOFC_MR]);
listUglyMol.push('../viewer/uglymol/index.html?pdb=' + pdbUrl + '&map1=' + mapUrl1 + '&map2=' + mapUrl2);
}
}
if (refinedPdbFileId != -1) {
index2FOFC_REFINE = mapFileNamesArr.indexOf("2FOFC_REFINE");
indexFOFC_REFINE = mapFileNamesArr.indexOf("FOFC_REFINE");
if ( (index2FOFC_REFINE == -1) || (indexFOFC_REFINE == -1) ) {
listUglyMol.push("");
} else {
var pdbUrl = EXI.getDataAdapter().mx.phasing.downloadPhasingFilesByPhasingAttachmentId( pdbFileId );
var pdbUrl = EXI.getDataAdapter().mx.phasing.downloadPhasingFilesByPhasingAttachmentId( refinedPdbFileId );
var mapUrl1 = EXI.getDataAdapter().mx.phasing.downloadPhasingFilesByPhasingAttachmentId( mapsArr[index2FOFC_REFINE]);
var mapUrl2 = EXI.getDataAdapter().mx.phasing.downloadPhasingFilesByPhasingAttachmentId( mapsArr[indexFOFC_REFINE]);
listUglyMol.push('../viewer/uglymol/index.html?pdb=' + pdbUrl + '&map1=' + mapUrl1 + '&map2=' + mapUrl2);
Expand Down

0 comments on commit a1216fb

Please sign in to comment.