Ignore:
Timestamp:
Jan 23, 2008, 3:21:52 PM (13 years ago)
Author:
mbayer
Message:

have restructured the code completely that writes the hybs section

Location:
branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins
Files:
11 edited

Legend:

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

    r548 r550  
    6767<body>
    6868
    69 <h1>Tab2MAGE Import Wizard -- Additional Information for Autogenerate Mode</h1>
     69<h2>Tab2MAGE Import Wizard -- Additional Information for Autogenerate Mode</h2>
    7070<p>
    7171<form name="autogenerate" action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/submit.jsp?ID=<%=ID%>">
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/configureImporter.jsp

    r548 r550  
    144144<input type="hidden"name="parameter:subjectList" value="<%=inputDataBean.getSubjectList()%>" />
    145145<input type="hidden"name="parameter:tissueList" value="<%=inputDataBean.getTissueList()%>" />
     146<input type="hidden"name="parameter:combinationList" value=""/>
    146147<input type="hidden"name="parameter:useWizard" value="<%=inputDataBean.getUseWizard()%>" />
    147148<input type="hidden"name="parameter:legacyData" value="<%=inputDataBean.getLegacyData()%>" />
     
    153154<input type="hidden"name="parameter:proceed" value="<%= inputDataBean.getProceed()%>"/>
    154155
    155 <input type="hidden"name="parameter:fileList" value=""/>
    156 <input type="hidden"name="parameter:subjectList" value=""/>
    157 <input type="hidden"name="parameter:tissueList" value=""/>
    158 <input type="hidden"name="parameter:combinationList" value=""/>
    159 
    160 
    161 
    162 <h1>Tab2MAGE Import Wizard -- Select Your Data File</h1>
     156
     157
     158
     159
     160<h2>Tab2MAGE Import Wizard -- Select Your Data File</h2>
    163161
    164162<p>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/experiment.jsp

    r548 r550  
    3434
    3535<script>
    36 self.resizeTo(800,1100);
     36self.resizeTo(800,900);
    3737</script>
    3838
     
    123123 
    124124
    125 <h1>Tab2MAGE Import Wizard -- Your Experiment</h1>
     125<h2>Tab2MAGE Import Wizard -- Your Experiment</h2>
    126126<p>
    127127
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/hybridizations.jsp

    r548 r550  
    7373      frm.recentFile.selectedIndex = 0;
    7474    }
     75   
     76    function hideTwoChannelQuestions()
     77    {
     78      var dyeSwapRow = document.getElementById('dyeSwapRow');
     79      var refSampleRow = document.getElementById('refSampleRow');
     80      var poolingRow = document.getElementById('poolingRow');
     81
     82            //items are currently displayed, so hide them
     83          dyeSwapRow.style.display = "none";
     84          refSampleRow.style.display = "none";
     85          poolingRow.style.display = "none";
     86    }
     87   
     88    function showTwoChannelQuestions()
     89    {
     90      var dyeSwapRow = document.getElementById('dyeSwapRow');
     91      var refSampleRow = document.getElementById('refSampleRow');
     92      var poolingRow = document.getElementById('poolingRow');
     93
     94           //items are currently hidden, so display them
     95          dyeSwapRow.style.display = "table-row";
     96          refSampleRow.style.display = "table-row";
     97          poolingRow.style.display = "table-row";
     98    }
     99   
     100    function checkRefSampleLogic()
     101    {
     102        if(document.getElementById("dyeSwapYes").checked && document.getElementById("refSampleYes").checked)
     103        {
     104          alert('Reference Sample and Dye Swap cannot both be set to "yes"');
     105        }
     106    }
    75107
    76108   
     
    93125<input type="hidden" name="zipFile" value="/home/michab/potato_small.zip"  id="zipFile">
    94126
    95 <h1>Tab2MAGE Import Wizard -- Your Hybridizations</h1>
     127<h2>Tab2MAGE Import Wizard -- Your Hybridizations</h2>
    96128
    97129<p>
     
    99131<table cellpadding="15">
    100132
    101   <!-- question 1 -->
     133  <!-- platform -->
    102134  <tr >
    103135    <td class="boldText">Microarray platform:</td>
    104136    <td class="input">
    105137    <select name="platform">
    106     <option >Affymetrix</option>
    107     <option >Agilent</option>
    108     <option >AIDA</option>
    109     <option >BZScan</option>
    110     <option >ChipSkipper</option>
    111     <option selected="selected">GenePix</option>
    112     <option >GeneTAC</option>
    113     <option >Illumina</option>
    114     <option >Imagene</option>
    115     <option >QuantArray Biotin</option>
    116     <option >QuantArray Cy</option>
    117     <option >Spotfinder</option>
    118     <option ><i>Custom</i></option>
     138    <option onclick="hideTwoChannelQuestions();" selected="selected" >Affymetrix</option>
     139    <option onclick="showTwoChannelQuestions();">Agilent</option>
     140    <option onclick="showTwoChannelQuestions();">AIDA</option>
     141    <option onclick="showTwoChannelQuestions();">BZScan</option>
     142    <option onclick="showTwoChannelQuestions();">ChipSkipper</option>
     143    <option onclick="showTwoChannelQuestions();">GenePix</option>
     144    <option onclick="showTwoChannelQuestions();">GeneTAC</option>
     145    <option onclick="showTwoChannelQuestions();">Illumina</option>
     146    <option onclick="showTwoChannelQuestions();">Imagene</option>
     147    <option onclick="showTwoChannelQuestions();">QuantArray Biotin</option>
     148    <option onclick="showTwoChannelQuestions();">QuantArray Cy</option>
     149    <option onclick="showTwoChannelQuestions();">Spotfinder</option>
     150    <option onclick="showTwoChannelQuestions();"><i>Custom</i></option>
    119151    </select></td>
    120152    <td>The manufacturer of the microarray chip used.</td>
    121153  </tr>
    122154
    123   <!-- question 2 -->
     155  <!-- organism -->
    124156  <tr>
    125157    <td class="boldText">Experimental organism:</td>
     
    128160  </tr>
    129161
    130   <!-- question 3 -->
     162  <!-- num array designs -->
    131163  <tr>
    132164    <td class="boldText">Number of different arrays designs used:</td>
     
    136168  </tr>
    137169
    138   <!-- question 4 -->
    139   <tr>
    140     <td class="boldText">Dye-swap</td>
    141     <td class="input">
    142     <table class="noBorder" cellpadding="4">
    143       <tr>
    144         <td class="noBorder"><input type="radio" name="dyeSwap" value="yes"></td>
    145         <td class="noBorder">yes</td>
    146       </tr>
    147 
    148       <tr>
    149         <td class="noBorder"><input type="radio" name="dyeSwap" value="no" checked="checked"></td>
    150         <td class="noBorder">no</td>
    151       </tr>
    152     </table>     
    153     </td>
    154     <td>If you used a dye-swap design please indicate this here.</td>
    155   </tr>
    156 
    157   <!-- question 5 -->
    158   <tr>
    159     <td class="boldText">Reference sample</td>
    160     <td class="input"> 
    161     <table class="noBorder" cellpadding="4">
    162       <tr>
    163         <td class="noBorder"><input type="radio" name="refSample" value="yes"></td>
    164         <td class="noBorder">yes</td>
    165       </tr>
    166 
    167       <tr>
    168         <td class="noBorder"><input type="radio"name="refSample" value="no"  checked="checked"></td>
    169         <td class="noBorder">no</td>
    170       </tr>
    171     </table>       
    172     </td>
    173     <td>If you used a reference sample please indicate this here.</td>
    174   </tr>
    175 
    176   <!-- question 6 -->
     170
     171  <!-- num treatment grps -->
    177172  <tr>
    178173    <td class="boldText">Number of treatment groups:</td>
     
    183178  </tr>
    184179
    185   <!-- question 7 -->
     180  <!-- exp factors -->
    186181  <tr>
    187182    <td class="boldText">Experimental factors:
     
    193188    <p>Example: <i><br>
    194189    Compound(aspirin,ibuprofen) <br>
    195     Dose(control,low,medium,high)</i></td>
    196   </tr>
    197 
    198   <!-- question 8 -->
     190    Dose(control,low,medium,high) <br>
     191    Time(1h,4h,12h,24h)</i>
     192    <p>
     193    <b>IMPORTANT: If your experimental design includes a time series of any sort, the corresponding factor must be called "Time".</b></td>
     194  </tr>
     195
     196  <!-- num subjects -->
    199197  <tr>
    200198    <td class="boldText">Number of subjects per group:</td>
     
    203201  </tr>
    204202 
    205   <!-- question 8a -->
     203  <!-- subject labels -->
    206204  <tr>
    207205    <td class="boldText">Subject (replicate) labels:</td>
     
    211209  </tr>
    212210 
    213   <!-- question 9 -->
     211  <!-- tissues -->
    214212  <tr>
    215213    <td class="boldText">Target tissues:</td>
     
    217215    <td>List all target tissues one per line, in no particular order (copy and paste from Excel works).</td>
    218216  </tr>
     217
     218
     219  <!-- dye swap -->
     220  <tr id="dyeSwapRow"  style="display:none">
     221    <td class="boldText">Dye-swap</td>
     222    <td class="input">
     223    <table class="noBorder" cellpadding="4">
     224      <tr>
     225        <td class="noBorder"><input type="radio" name="dyeSwap" id="dyeSwapYes" value="yes" onchange="checkRefSampleLogic();"/></td>
     226        <td class="noBorder">yes</td>
     227      </tr>
     228
     229      <tr>
     230        <td class="noBorder"><input type="radio" name="dyeSwap" id="dyeSwapNo" value="no" checked="checked"  onchange="checkRefSampleLogic();"/></td>
     231        <td class="noBorder">no</td>
     232      </tr>
     233    </table>     
     234    </td>
     235    <td>If you used a dye-swap design please indicate this here.</td>
     236  </tr>
     237
     238  <!-- ref sample -->
     239  <tr id="refSampleRow"  style="display:none">
     240    <td class="boldText">Reference sample</td>
     241    <td class="input"> 
     242    <table class="noBorder" cellpadding="4">
     243      <tr>
     244        <td class="noBorder"><input type="radio" name="refSample" id="refSampleYes" value="yes"  onchange="checkRefSampleLogic();"/></td>
     245        <td class="noBorder">yes</td>
     246      </tr>
     247
     248      <tr>
     249        <td class="noBorder"><input type="radio"name="refSample" id="refSampleNo" value="no"  checked="checked"  onchange="checkRefSampleLogic();"/></td>
     250        <td class="noBorder">no</td>
     251      </tr>
     252    </table>       
     253    </td>
     254    <td>If you used a reference sample please indicate this here.</td>
     255  </tr>
    219256 
    220   <!-- question 10 -->
    221   <tr>
     257  <!-- pooling -->
     258  <tr id="poolingRow"  style="display:none">
    222259    <td class="boldText">Sample pooling:</td>
    223260    <td class="input">
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/mappings.jsp

    r548 r550  
    1515  final String ID = sc.getId();
    1616  final String requestId = request.getParameter("requestId");
    17 
    1817%>
    1918
     
    7372      tissueList += frm.elements[i].value + '\t';
    7473    }
     74    if(id.match("dyeInput"))
     75    {
     76      dyeList += frm.elements[i].value + '\t';
     77    }
    7578    if(id.match("combinationInput"))
    7679    {
     
    8184  frm.subjectList.value = subjectList;
    8285  frm.tissueList.value = tissueList;
     86  frm.dyeList.value = dyeList;
    8387  frm.combinationList.value = combinationList;
    8488}
     
    101105<input type="hidden" id="subjectList" name="subjectList" value""/>
    102106<input type="hidden" id="tissueList" name="tissueList" value""/>
     107<input type="hidden" id="dyeList" name="dyeList" value""/>
    103108<input type="hidden" id="combinationList" name="combinationList" value""/>
    104109
     
    120125    //extract the possible values from between the parentheses
    121126    String allValues = rawFactors[i].substring(rawFactors[i].indexOf("(") + 1,
    122         rawFactors[i].indexOf(")"));
     127    rawFactors[i].indexOf(")"));
    123128    String[] values = allValues.split(",");
    124129    factorValues[i] = values;
     
    171176  {
    172177    singleChannel = true;
    173   } 
     178  }
    174179  int numReplicates = Integer.parseInt(inputDataBean.getNumReplicates());
    175180  int numTreatmentGroups = Integer.parseInt(inputDataBean.getNumTreatmentGroups());
    176181  int numTissues = inputDataBean.getTissues().split("\n").length;
    177   int numHybs = Tab2MageWriter.calcNumHybs(singleChannel,numReplicates, numTreatmentGroups, numTissues);
     182  boolean dyeSwapBool = false;
     183  boolean poolingBool = false;
     184  if(inputDataBean.getDyeSwap().equals("yes"))
     185  {
     186    dyeSwapBool = true;
     187  }
     188  if(inputDataBean.getPooling().equals("yes"))
     189  {
     190    poolingBool = true;
     191  }
     192   
     193  int numHybs = Tab2MageUtils.calcNumHybs(dyeSwapBool,poolingBool,Integer.parseInt(inputDataBean.getNumDesigns()), numReplicates, numTreatmentGroups,numTissues);
     194
    178195  System.out.println("numHybs = " + numHybs);
    179196  System.out.println("products.length = " + products.length);
    180197%>
    181198
    182 <h1>Tab2MAGE Import Wizard -- File Mappings</h1>
     199<h2>Tab2MAGE Import Wizard -- File Mappings</h2>
    183200<p>
    184201
     
    198215    <td class="header"><h3>Subject</h3></td>
    199216    <td class="header"><h3>Tissue</h3></td>
     217    <td class="header"><h3>Dye</h3></td>
    200218    <td class="header"><h3>Factor Value Combination</h3></td>
    201219
     
    205223
    206224  <%
    207     for (int i = 0; i < numHybs; i++)
    208     {
     225      for (int i = 0; i < numHybs; i++)
     226      {
    209227  %>
    210228
     
    215233    <td class="input" ><select id="fileInput<%=i %>">
    216234      <%
    217           for (int k = 0; k < fileNamesArr.length; k++)
    218           {
     235            for (int k = 0; k < fileNamesArr.length; k++)
     236            {
    219237      %>
    220238
     
    230248    <td class="input" ><select id="subjectInput<%=i %>">
    231249      <%
    232           for (int k = 0; k < subjectNames.length; k++)
    233           {
     250            for (int k = 0; k < subjectNames.length; k++)
     251            {
    234252      %>
    235253
     
    245263    <td class="input" ><select id="tissueInput<%=i %>">
    246264      <%
    247           for (int k = 0; k < tissueNames.length; k++)
    248           {
     265            for (int k = 0; k < tissueNames.length; k++)
     266            {
    249267      %>
    250268
     
    256274    </select></td>
    257275
    258 <!-- need a single cell with a select box that lets the user select from a list of unique factor value combinations -->
     276    <!-- select your dye here-->
     277
     278    <td class="input"><select id="dyeInput<%=i %>">
     279      <%
     280            if (!singleChannel)
     281            {
     282      %>
     283      <option>Cy3</option>
     284      <option>Cy5</option>
     285      <%
     286            }
     287            else
     288            {
     289      %>
     290      <option>biotin</option>
     291      <%
     292      }
     293      %>
     294
     295    </select></td>
     296
     297    <!-- need a single cell with a select box that lets the user select from a list of unique factor value combinations -->
    259298
    260299    <td>
    261300    <select id="combinationInput<%=i %>">
    262301      <%
    263           for (int k = 0; k < products.length; k++)
     302            for (int k = 0; k < products.length; k++)
     303            {
     304          //make a String with all the factor values in this combination
     305          //separate values in each combi with a space
     306          String combi = "";
     307          for (int j = 0; j < products[k].length; j++)
    264308          {
    265             //make a String with all the factor values in this combination
    266             //separate values in each combi with a space
    267             String combi = "";
    268             for (int j = 0; j < products[k].length; j++)
    269             {
    270               combi += products[k][j] + " ";
    271             }
     309            combi += products[k][j] + " ";
     310          }
    272311      %>
    273312
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/protocols.jsp

    r547 r550  
    122122<input type="hidden"name="requestId" value="<%=requestId%>">
    123123
    124 <h1>Tab2MAGE Import Wizard -- Your Protocols</h1>
     124<h2>Tab2MAGE Import Wizard -- Your Protocols</h2>
    125125<p>
    126126<table cellpadding="10">
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/spreadsheetdata.jsp

    r547 r550  
    3535<body>
    3636
    37 <h1>Tab2MAGE Import Wizard -- Enter Spreadsheet Data for Mappings</h1>
     37<h2>Tab2MAGE Import Wizard -- Enter Spreadsheet Data for Mappings</h2>
    3838
    3939<form name="spreadSheetMappingsForm" action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/submit.jsp?ID=<%=ID%>" method="post">
     
    5151<li>Columns must be in the order as below and the column headers must be exactly as follows (please replace 'myFactorName1' etc. with your actual factor names):<p>
    5252<b>
    53 File&nbsp;&nbsp;&nbsp;Subject&nbsp;&nbsp;&nbsp;Tissue&nbsp;&nbsp;&nbsp;FactorValue[myFactorName1]&nbsp;&nbsp;&nbsp;FactorValue[myFactorName2]&nbsp;&nbsp;&nbsp;etc....
     53File&nbsp;&nbsp;&nbsp;Subject&nbsp;&nbsp;&nbsp;Tissue&nbsp;&nbsp;&nbsp;Dye&nbsp;&nbsp;&nbsp;FactorValue[myFactorName1]&nbsp;&nbsp;&nbsp;FactorValue[myFactorName2]&nbsp;&nbsp;&nbsp;etc....
    5454</b></p>
    5555</ul>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/submit.jsp

    r548 r550  
    3131<body>
    3232
    33 <h1>Tab2MAGE Import Wizard -- Summary</h1>
     33<h2>Tab2MAGE Import Wizard -- Summary</h2>
    3434<p>
    3535
     
    145145<input type="hidden"name="parameter:subjectList" value="<%=inputDataBean.getSubjectList()%>" />
    146146<input type="hidden"name="parameter:tissueList" value="<%=inputDataBean.getTissueList()%>" />
     147<input type="hidden"name="parameter:dyeList" value="<%=inputDataBean.getDyeList()%>"/>
     148<input type="hidden"name="parameter:combinationList" value=""/>
    147149<input type="hidden"name="parameter:useWizard" value="<%=inputDataBean.getUseWizard()%>" />
    148150<input type="hidden"name="parameter:legacyData" value="<%=inputDataBean.getLegacyData()%>" />
     
    154156<input type="hidden"name="parameter:proceed" value="<%= inputDataBean.getProceed()%>"/>
    155157
    156 <input type="hidden"name="parameter:fileList" value=""/>
    157 <input type="hidden"name="parameter:subjectList" value=""/>
    158 <input type="hidden"name="parameter:tissueList" value=""/>
    159 <input type="hidden"name="parameter:combinationList" value=""/>
    160158
    161159
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/userchoice1.jsp

    r545 r550  
    5050<body>
    5151
    52 <h1>Tab2MAGE Importer -- Choose Import Mode</h1>
     52<h2>Tab2MAGE Importer -- Choose Import Mode</h2>
    5353<p>
    5454
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/userchoice2.jsp

    r548 r550  
    4141  if(document.getElementById("legacyDataNo").checked)
    4242  {
    43     form.action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/autogenerate.jsp?ID=<%=ID%>";
     43    var platform = '<%=inputDataBean.getPlatform()%>';
     44    var refSample = '<%=inputDataBean.getRefSample()%>';
     45    //two channel experiment without reference sample -- we need more info first, go to autogenerate.jsp
     46    if((platform != 'Affymetrix') && refSample == 'no')
     47    {
     48      form.action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/autogenerate.jsp?ID=<%=ID%>";
     49    }
     50    //single channel experiments and two channel experiment with reference sample - no extra info needed, proceed straight to submit page
     51    else
     52    {
     53      form.action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/submit.jsp?ID=<%=ID%>";
     54    }
    4455  }
     56 
    4557
    4658  //submit the form
     
    5365<body>
    5466
    55 <h1>Tab2MAGE Import Wizard -- Choose Data Mode</h1>
     67<h2>Tab2MAGE Import Wizard -- Choose Data Mode</h2>
    5668<p>
    5769
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/userchoice3.jsp

    r543 r550  
    4949<body>
    5050
    51 <h1>Tab2MAGE Import Wizard -- Choose Mappings Mode</h1>
     51<h2>Tab2MAGE Import Wizard -- Choose Mappings Mode</h2>
    5252<p>
    5353
Note: See TracChangeset for help on using the changeset viewer.