Ignore:
Timestamp:
Jan 21, 2008, 11:25:30 AM (13 years ago)
Author:
mbayer
Message:

number of issues fixed in UI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/mappings.jsp

    r544 r547  
    1515  final String ID = sc.getId();
    1616  final String requestId = request.getParameter("requestId");
    17  
    18   System.out.println("mappings.jsp: inputDataBean = " + inputDataBean.toString());
    19   System.out.println("mappings.jsp: ID = " + ID);
     17
    2018%>
    2119
     
    7573      tissueList += frm.elements[i].value + '\t';
    7674    }
     75    if(id.match("combinationInput"))
     76    {
     77      combinationList += frm.elements[i].value + '\t';
     78    }
    7779  }
    7880  frm.fileList.value = fileList;
    7981  frm.subjectList.value = subjectList;
    8082  frm.tissueList.value = tissueList;
     83  frm.combinationList.value = combinationList;
    8184}
    8285
     
    98101<input type="hidden" id="subjectList" name="subjectList" value""/>
    99102<input type="hidden" id="tissueList" name="tissueList" value""/>
     103<input type="hidden" id="combinationList" name="combinationList" value""/>
    100104
    101105
    102106
    103107<%
    104 
    105108  //first extract the factor names and the possible values
    106109  String expFactors = inputDataBean.getExpFactors().trim();
     
    131134  System.out.println("zipFilePath = " + zipFilePath);
    132135  String zipFileDirStr = zipFilePath.substring(0, zipFilePath.lastIndexOf("/"));
    133   String zipFileName = zipFilePath.substring(zipFilePath.lastIndexOf("/")+1);
     136  String zipFileName = zipFilePath.substring(zipFilePath.lastIndexOf("/") + 1);
    134137
    135138  //get hold of the appropriate BASE objects for this
     
    147150    entry = zipStream.getNextEntry();
    148151  }
    149  
    150   String [] fileNamesArr = new String[fileNames.size()];
     152
     153  String[] fileNamesArr = new String[fileNames.size()];
    151154  fileNames.toArray(fileNamesArr);
    152155  Arrays.sort(fileNamesArr);
    153  
     156
    154157  dc.close();
    155  
     158
    156159  //next get the subjectNames and make up select boxes with these
    157160  //they too have to be mapped to filenames
    158   String [] subjectNames = inputDataBean.getSubjectNames().split("\n");
    159  
     161  String[] subjectNames = inputDataBean.getSubjectNames().split("\n");
     162
    160163  //we also need to parse out the tissues string to produce another column of select boxes
    161   String [] tissueNames = inputDataBean.getTissues().split("\n");
    162  
    163  
     164  String[] tissueNames = inputDataBean.getTissues().split("\n");
     165
    164166  //work out the number of hybridizations
    165167  int numReplicates = Integer.parseInt(inputDataBean.getNumReplicates());
    166   int numTreatmentGroups =Integer.parseInt(inputDataBean.getNumTreatmentGroups());
     168  int numTreatmentGroups = Integer.parseInt(inputDataBean.getNumTreatmentGroups());
    167169  int numTissues = inputDataBean.getTissues().split("\n").length;
    168   int numHybs = Tab2MageWriter.calcNumHybs( numReplicates, numTreatmentGroups, numTissues);
     170  int numHybs = Tab2MageWriter.calcNumHybs(numReplicates, numTreatmentGroups, numTissues);
    169171  System.out.println("numHybs = " + numHybs);
    170172  System.out.println("products.length = " + products.length);
     
    189191    <td class="header"><h3>Subject</h3></td>
    190192    <td class="header"><h3>Tissue</h3></td>
    191 
    192     <!-- factor names -->
    193     <%
    194       for (int i = 0; i < products[i].length; i++)
    195       {
    196     %>
    197     <td class="header"><h3><%=factorNames[i]%></h3></td>
    198     <%
    199     }
    200     %>
     193    <td class="header"><h3>Factor Value Combination</h3></td>
     194
    201195  </tr>
    202196
     
    255249    </select></td>
    256250
    257 <!-- now print the values of this factor value combination, each in a separate cell -->
    258     <%
    259         for (int j = 0; j < products[i].length; j++)
    260         {
    261     %>
    262     <td class="border"><%=products[i][j]%></td>
    263     <%
    264     }
    265     %>
    266 
     251<!-- need a single cell with a select box that lets the user select from a list of unique factor value combinations -->
     252
     253    <td>
     254    <select id="combinationInput<%=i %>">
     255      <%
     256          for (int k = 0; k < products.length; k++)
     257          {
     258            //make a String with all the factor values in this combination
     259            //separate values in each combi with a space
     260            String combi = "";
     261            for (int j = 0; j < products[k].length; j++)
     262            {
     263              combi += products[k][j] + " ";
     264            }
     265      %>
     266
     267      <option><%=combi%></option>
     268
     269      <%
     270      }
     271      %>
     272    </select>
     273    </td>
    267274
    268275  </tr>
Note: See TracChangeset for help on using the changeset viewer.