rawProcessorFxns.js
/* Combines files in the two "output" tables for output to main Hydra interface.
 * No input params required, and no output is returned.
 */
Combines files in the two "output" tables for output to main Hydra interface.
No input params required, and no output is returned.
Combines files in the two " output " tables for output to main Hydra interface . No input params required and no output is returned .
function combineFiles () {
   var protID, protData, ligID, ligData, objId;
   for (var i=0; i<$$('protOutTable').count(); i++) {
      protID = $$('protOutTable').getIdByIndex(i);
      protData = $$('protOutTable').getItem(protID).protData;
      protFileName = $$('protOutTable').getItem(protID).protFileName;
      ligID = $$('ligOutTable').getIdByIndex(i);
      ligData = $$('ligOutTable').getItem(ligID).ligData;
      ligData = ligData.replace(/ATOM  /g, 'HETATM');
      protData += '\n'+ligData; 
      dataObjs.add({col:0, oCol:0, row:0, oRow:0,
                            fileName:protFileName, fileData:protData});
      objId = dataObjs.getLastId();
      parseForZinc(protData, objId);
      parseLigInfo(protData, objId);
      $$('uploadTable').parse(dataObjs);
      $$('comp_table').parse(dataObjs);
   }
}
function combineFiles ( ) { var protID , protData , ligID , ligData , objId ; for ( var i = 0 ; i < $$ ( 'protOutTable' ) . count ( ) ; i ++ ) { protID = $$ ( 'protOutTable' ) . getIdByIndex ( i ) ; protData = $$ ( 'protOutTable' ) . getItem ( protID ) . protData ; protFileName = $$ ( 'protOutTable' ) . getItem ( protID ) . protFileName ; ligID = $$ ( 'ligOutTable' ) . getIdByIndex ( i ) ; ligData = $$ ( 'ligOutTable' ) . getItem ( ligID ) . ligData ; ligData = ligData . replace ( / ATOM   / g , 'HETATM' ) ; protData += '\n' + ligData ; dataObjs . add ( { col : 0 , oCol : 0 , row : 0 , oRow : 0 , fileName : protFileName , fileData : protData } ) ; objId = dataObjs . getLastId ( ) ; parseForZinc ( protData , objId ) ; parseLigInfo ( protData , objId ) ; $$ ( 'uploadTable' ) . parse ( dataObjs ) ; $$ ( 'comp_table' ) . parse ( dataObjs ) ; } }
Combines files in the two "output" tables for output to main Hydra interface.
Combines files in the two " output " tables for output to main Hydra interface .
//Loop through all items //Dump the protein file data into protData //Dump lig file data into ligData //Replace "ATOM" tags with "HETATM" //Uses a regular expression (regex) with the g (global) setting //Add ZINC ID to protData /*protData +=
         'REMARK   10                                                                     '+
         '\nREMARK   10 '+$$('ligOutTable').getItem(ligID).zincId;*/ //Join files //Would prefer to do this via an event in the uploadTable, but not sure how to //grab the contents for what's being added //Parse for the ZINC ID and pull data using that //Display new data object in each table //$$('file_dump').setValue(protData);