a2a021905196ddc79f605ee081113e5eb00fd6ca
kate
  Tue Apr 10 22:17:31 2012 -0700
hgEncodeApi cleanup - retire encodeExpId request.  Merge functionality into experiments request (it now filters on db= parameter)
diff --git src/hg/js/encodeChipMatrix.js src/hg/js/encodeChipMatrix.js
index d0e1690..c230d90 100644
--- src/hg/js/encodeChipMatrix.js
+++ src/hg/js/encodeChipMatrix.js
@@ -1,79 +1,71 @@
 /* encodeChipMatrix.js - ENCODE web app to display ChIP-seq data vs. cell types in a matrix
 
  Formatted: jsbeautify.py -j
  Syntax checked: jslint indent:4, plusplus: true, continue: true, unparam: true, sloppy: true, browser: true 
 */
 /*global $, encodeProject */
 
 $(function () {
     var dataType, server, requests = [
         // requests to server API
         encodeProject.serverRequests.experiment,
         encodeProject.serverRequests.cellType,
-        encodeProject.serverRequests.antibody,
-        encodeProject.serverRequests.expId
+        encodeProject.serverRequests.antibody
         ];
 
     var $matrixTable = $('#matrixTable');
 
     function handleServerData(responses) {
         // Main actions, called when loading data from server is complete
 
         var experiments = responses[0], 
                 cellTypes = responses[1], 
-                antibodies = responses[2], 
-                expIds = responses[3];
+                antibodies = responses[2];
 
-        var antibodyGroups, cellTiers, expIdHash;
+        var antibodyGroups, cellTiers;
         var antibodyTarget, cellType;
         var matrix, antibodyTargetExps = {};
 
         // hide spinner and show table
         encodeMatrix.show($matrixTable);
 
         // set up structures for antibody targets and groups
         antibodyGroups = encodeProject.getAntibodyGroups(antibodies);
 
         // set up structures for cell types and their tiers
         cellTiers = encodeProject.getCellTiers(cellTypes);
 
-        // use to filter out experiments not in this assembly
-        expIdHash = encodeProject.getExpIdHash(expIds);
-
         // gather experiments into matrix
-        matrix = makeExperimentMatrix(experiments, expIdHash, antibodyTargetExps);
+        matrix = makeExperimentMatrix(experiments, antibodyTargetExps);
 
        // fill in table using matrix
         encodeMatrix.tableOut($matrixTable, matrix, cellTiers, 
                         antibodyGroups, antibodyTargetExps, tableHeaderOut, rowAddCells);
     }
 
-    function makeExperimentMatrix(experiments, expIdHash, antibodyTargetExps) {
+    function makeExperimentMatrix(experiments, antibodyTargetExps) {
         // Populate antibodyTarget vs. cellType array with counts of experiments
 
         var antibody, target, cellType;
         var matrix = {};
 
         $.each(experiments, function (i, exp) {
             // exclude ref genome annotations
             if (exp.cellType === 'None') {
                 return true;
             }
-            if (expIdHash[exp.ix] === undefined) {
-                return true;
-            }
             // todo: filter out with arg to hgApi ?
             if (exp.dataType !== 'ChipSeq') {
                 return true;
             }
             // count experiments per target so we can prune those having none
             // (the matrix[cellType] indicates this for cell types 
             // so don't need hash for those
             antibody = encodeProject.antibodyFromExp(exp);
             if (antibody === undefined) {
                 return true;
             }
             target = encodeProject.targetFromAntibody(antibody);
             if (target === undefined) {
                 return true;
             }