Changeset 526


Ignore:
Timestamp:
Jan 7, 2008, 12:18:54 PM (13 years ago)
Author:
mbayer
Message:

added a fourth JSP page which will be used to let the user configure mappings from filenames to factor value combinations

Location:
branches/uk_ac_ebi_Tab2MageImporter
Files:
1 added
5 edited

Legend:

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

    r525 r526  
    8585
    8686
    87 <form name="hybridizations"action="<%= request.getContextPath()%>/common/plugin/index.jsp" method="post">
     87<form name="hybridizations"action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/mappings.jsp" method="post">
    8888<input type="hidden" name="ID" value="<%=ID%>"> <input type="hidden" name="cmd" value="SetParameters">
    8989<input type="hidden"name="requestID" value="<%=requestID%>">
     
    131131  <tr >
    132132    <td class="boldText">Microarray platform:</td>
    133     <td class="input"><select name="parameter:platform">
     133    <td class="input"><select name="platform">
    134134    <option >Affymetrix</option>
    135135    <option >Agilent</option>
     
    152152  <tr>
    153153    <td class="boldText">Experimental organism:</td>
    154     <td class="input"><input type="text" size="50" name="parameter:organism" value="Solanum tuberosum"/></td>
     154    <td class="input"><input type="text" size="50" name="organism" value="Solanum tuberosum"/></td>
    155155    <td>The full scientific name of the experimental organism used.</td>
    156156  </tr>
     
    159159  <tr>
    160160    <td class="boldText">Number of different arrays designs used:</td>
    161     <td class="input"><input type="text" size="3" name="parameter:numDesigns" value="1"/></td>
     161    <td class="input"><input type="text" size="3" name="numDesigns" value="1"/></td>
    162162    <td>If more than one array design was used in parallel, please specify the number here.
    163163    We assume that all samples are applied once to each array design</td>
     
    167167  <tr>
    168168    <td class="boldText">Dye-swap</td>
    169     <td class="input">yes <input type="radio" name="parameter:dyeSwap" value="yes"> no <input type="radio"
     169    <td class="input">yes <input type="radio" name="dyeSwap" value="yes"> no <input type="radio"
    170170      name="parameter:dyeSwap" value="no" checked="checked"> <br>
    171171     
     
    177177  <tr>
    178178    <td class="boldText">Reference sample</td>
    179     <td class="input">yes <input type="radio" name="parameter:refSample" value="yes" > no <input type="radio"
     179    <td class="input">yes <input type="radio" name="refSample" value="yes" > no <input type="radio"
    180180      name="parameter:refSample" value="no" checked="checked"></td>
    181181    <td>If you used a reference sample please indicate this here.</td>
     
    185185  <tr>
    186186    <td class="boldText">Number of treatment groups:</td>
    187     <td class="input"><input type="text" size="3" name="parameter:numTreatmentGroups" value="2"/></td>
     187    <td class="input"><input type="text" size="3" name="numTreatmentGroups" value="2"/></td>
    188188    <td>The number of permutations of factor values. <p>
    189189    Example: an experiment with 2 factors and 3 factor values in each will have 6 treatment groups (2 X 3).
     
    195195    <td class="boldText">Experimental factors:
    196196    </td>
    197     <td class="input"><textarea rows="7" cols="32" name="parameter:expFactors">Strain(mutant,wildtype)</textarea></td>
     197    <td class="input"><textarea rows="7" cols="32" name="expFactors">Strain(mutant,wildtype)<br/>Treament(treated,control)</textarea></td>
    198198    <td>Please list all experimental factors and value ranges using the following format (one per
    199199    line):<br>
     
    207207  <tr>
    208208    <td class="boldText">Number of subjects per group:</td>
    209     <td class="input"><input type="text" size="3" name="parameter:numReplicates" value="2"/></td>
     209    <td class="input"><input type="text" size="3" name="numReplicates" value="2"/></td>
    210210    <td>This is the number of biological replicates in each treatment group.</td>
    211211  </tr>
     
    214214  <tr>
    215215    <td class="boldText">Target tissues:</td>
    216     <td class="input"><textarea rows="2" cols="32" name="parameter:tissues">stem</textarea></td>
     216    <td class="input"><textarea rows="2" cols="32" name="tissues">stem</textarea></td>
    217217    <td>List all target tissues (as a comma separated list).<br>
    218218    Example: liver,heart</td>
     
    222222  <tr>
    223223    <td class="boldText">Sample pooling:</td>
    224     <td class="input">yes <input type="radio" name="parameter:pooling" value="yes"> no <input type="radio"
     224    <td class="input">yes <input type="radio" name="pooling" value="yes"> no <input type="radio"
    225225      name="parameter:pooling" value="no" checked="checked"></td>
    226226    <td>If the samples were pooled please indicate this here.</td>
     
    270270  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
    271271  <tr class="noBorder">
    272     <td id="next" width="50%" style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="submit()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/gonext.gif" border="0"></td><td style="border-style: none;">Run Import</td></tr></table></div></div></td>
     272    <td id="next" width="50%" style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="submit()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/gonext.gif" border="0"></td><td style="border-style: none;">Next</td></tr></table></div></div></td>
    273273    <td id="close" width="50%" style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="window.close()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/cancel.gif" border="0"></td><td style="border-style: none;">Cancel</td></tr></table></div></div></td>  </tr>
    274274  </table>
  • branches/uk_ac_ebi_Tab2MageImporter/src/uk/ac/ebi/nugo/plugins/Tab2MageWriter.java

    r525 r526  
    55import java.io.Writer;
    66import java.lang.reflect.Field;
     7import java.util.HashMap;
     8import java.util.Iterator;
     9import java.util.LinkedList;
     10import java.util.Map;
    711
    812import net.sf.basedb.core.DbControl;
     
    2125  ParameterValues job;
    2226  String[] paramNames;
     27  HashMap<String,LinkedList> factors;
    2328 
    2429  String domain;
     
    9499        field.set(this, job.getValue(paramNames[i]));
    95100      }
     101     
     102      //now extract the factor values and store them suitably so we can access them
     103      extractFactorValues();
    96104    }
    97105    catch (Exception e)
     
    99107      e.printStackTrace();
    100108    }
     109  }
     110 
     111  // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     112  //extracts the factor names and their list of possible values from the single string that we obtain from the web page
     113  public void extractFactorValues()
     114  {
     115    factors = new HashMap<String,LinkedList>();
     116   
     117    String [] rawFactors = expFactors.split("\n");
     118    for (int i = 0; i < rawFactors.length; i++)
     119    {
     120      //extract the factor name
     121      String factorName = rawFactors[i].substring(0, rawFactors[i].indexOf("("));
     122      //extract the possible values from between the parentheses
     123      String allValues = rawFactors[i].substring(rawFactors[i].indexOf("(")+1,rawFactors[i].length()-1);
     124      String [] values = allValues.split(",");
     125      System.out.println("factorName = " + factorName);
     126      System.out.println("allValues = "+ allValues);
     127      //add them to a linkedlist object
     128      LinkedList<String> valueList = new LinkedList<String>();
     129      for (int j = 0; j < values.length; j++)
     130      {
     131        System.out.println("value: " + values[j]);
     132        valueList.add(values[j]);
     133       
     134      }
     135      //add this pair to the hashmap
     136      factors.put(factorName, valueList);
     137    }   
    101138  }
    102139
     
    196233      t2mContent += colHeaders[i] + "\t";
    197234    }
     235    //now print the factorvalue headers
     236    for (Iterator iter = factors.entrySet().iterator(); iter.hasNext();)
     237    {
     238      Map.Entry<String, LinkedList> entry = (Map.Entry<String, LinkedList>)iter.next();
     239      String factorName = entry.getKey();     
     240    }
     241   
     242    //next line will be data
    198243    t2mContent += "\n";
    199244
     
    514559    refSample = "yes";
    515560    numTreatmentGroups = "6";
    516     expFactors = "compound(aspirin,ibuprofen);dose(none,medium,high) )";
     561    expFactors = "compound(aspirin,ibuprofen)\ndose(none,medium,high)";
    517562    numReplicates = "4";
    518563    tissues = "liver,heart,brain";
    519564    pooling = "no";
    520565    zipFile = "/home/michab/potato_small.zip";
     566   
     567    extractFactorValues();
    521568
    522569  }
  • branches/uk_ac_ebi_Tab2MageImporter/src/uk/ac/ebi/nugo/plugins/Tab2MageWriterTest.java

    r520 r526  
    3131    }
    3232  }
     33 
     34 
    3335}
Note: See TracChangeset for help on using the changeset viewer.