Changeset 4918


Ignore:
Timestamp:
May 4, 2009, 9:52:04 AM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #1120: The dynamic part of BASE should keep track whether intensity data is in log space or not

GUI for forumlas has been updated.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/Install.java

    r4917 r4918  
    721721        expressions.add("log2(rawCh(" + channel + "))");
    722722        createFormula(Formula.Type.INTENSITY_TRANSFORMATION, Formula.Parser.JEP,
    723           Formula.AverageMethod.NONE, IntensityTransform.NONE, IntensityTransform.LOG2,
     723          Formula.AverageMethod.GEOMETRIC_MEAN, IntensityTransform.NONE, IntensityTransform.LOG2,
    724724          "Log2", "Transform all intensity values to log2 scale",
    725725          null, channel, expressions.subList(0, channel).toArray(new String[0]),
  • trunk/www/include/scripts/main.js

    r4889 r4918  
    409409    this.controllers['TRANSFORMATION'] = { url:'views/experiments/transformations/index.jsp', width:500, height:300 };
    410410    this.controllers['JOB'] = { url:'views/jobs/index.jsp', width:640, height:480, popup:true, edit:false };
    411     this.controllers['FORMULA'] = { url:'views/formulas/index.jsp', width:740, height:500 };
     411    this.controllers['FORMULA'] = { url:'views/formulas/index.jsp', width:850, height:600 };
    412412    this.controllers['HYBRIDIZATION'] = { url:'views/hybridizations/index.jsp', width:800, height:500 };
    413413    this.controllers['RAWBIOASSAY'] = { url:'views/rawbioassays/index.jsp', width:800, height:500 };
  • trunk/www/views/formulas/edit_formula.jsp

    r4889 r4918  
    3232  import="net.sf.basedb.core.Permission"
    3333  import="net.sf.basedb.core.Formula"
     34  import="net.sf.basedb.core.IntensityTransform"
    3435  import="net.sf.basedb.core.Coloring"
    3536  import="net.sf.basedb.core.RawDataType"
     
    6263  RawDataType currentRawDataType = null;
    6364  RawDataType defaultRawDataType = null;
     65  IntensityTransform currentSourceIntensityTransform = null;
     66  IntensityTransform currentResultIntensityTransform = null;
    6467  List<String> expressions = null;
    6568  Coloring coloring = null;
     
    8992      currentRawDataType = RawDataTypes.getRawDataType(cc.getRecent("RawDataType", 0));
    9093    }
     94    if (cc.getPropertyValue("sourceIntensityTransform") != null)
     95    {
     96      currentSourceIntensityTransform = IntensityTransform.fromValue(Values.getInt(cc.getPropertyValue("sourceIntensityTransform")));
     97    }
     98    if (cc.getPropertyValue("resultIntensityTransform") != null)
     99    {
     100      currentResultIntensityTransform = IntensityTransform.fromValue(Values.getInt(cc.getPropertyValue("resultIntensityTransform")));
     101    }
    91102    coloring = new Coloring();
    92103    coloring.setUsingColors(Values.getBoolean(cc.getPropertyValue("coloring.usingColors")));
     
    105116    currentType = formula.getFormulaType();
    106117    currentRawDataType = formula.getRawDataType();
     118    currentSourceIntensityTransform = formula.getSourceIntensityTransform();
     119    currentResultIntensityTransform = formula.getResultIntensityTransform();
    107120    expressions = formula.getFormulas();
    108121    coloring = formula.getColoring();
     
    370383
    371384    <h3 class="docked"><%=title%> <base:help tabcontrol="settings" /></h3>
    372     <t:tabcontrol id="settings" contentstyle="<%="height: "+(int)(scale*380)+"px;"%>"
     385    <t:tabcontrol id="settings" contentstyle="<%="height: "+(int)(scale*460)+"px;"%>"
    373386      position="bottom"  remember="<%=formula != null%>">
    374387    <t:tab id="info" title="Formula" validate="validateFormula()" helpid="formula.edit">
     
    492505        </td>
    493506      </tr>
    494      
     507      <tr>
     508        <td class="prompt">Source intensity<br>transformation</td>
     509        <td colspan="">
     510          <select name="sourceIntensityTransform">
     511          <option value="">- any -
     512          <%
     513          for (IntensityTransform t : IntensityTransform.values())
     514          {
     515            String selected = t == currentSourceIntensityTransform ? "selected" : "";
     516            %>
     517            <option value="<%=t.name()%>" <%=selected%>><%=HTML.encodeTags(t.toString())%>
     518            <%
     519          }
     520          %>
     521          </select>
     522        </td>
     523      </tr>
     524      <tr>
     525        <td class="prompt">Result intensity<br>transformation</td>
     526        <td colspan="">
     527          <select name="resultIntensityTransform">
     528          <option value="">- any -
     529          <%
     530          for (IntensityTransform t : IntensityTransform.values())
     531          {
     532            String selected = t == currentResultIntensityTransform ? "selected" : "";
     533            %>
     534            <option value="<%=t.name()%>" <%=selected%>><%=HTML.encodeTags(t.toString())%>
     535            <%
     536          }
     537          %>
     538          </select>
     539        </td>
     540      </tr>
    495541      <tr>
    496542        <td class="prompt">Use colors</td>
  • trunk/www/views/formulas/index.jsp

    r4889 r4918  
    3030  import="net.sf.basedb.core.Include"
    3131  import="net.sf.basedb.core.Formula"
     32  import="net.sf.basedb.core.IntensityTransform"
    3233  import="net.sf.basedb.core.Coloring"
    3334  import="net.sf.basedb.core.ItemQuery"
     
    148149    formula.setParser(Formula.Parser.valueOf(request.getParameter("parser")));
    149150    formula.setAverageMethod(Formula.AverageMethod.valueOf(Values.getString(request.getParameter("averageMethod"), "NONE")));
     151    formula.setSourceIntensityTransform(request.getParameter("sourceIntensityTransform") == null ?
     152      null : IntensityTransform.valueOf(request.getParameter("sourceIntensityTransform")));
     153    formula.setResultIntensityTransform(request.getParameter("resultIntensityTransform") == null ?
     154        null : IntensityTransform.valueOf(request.getParameter("resultIntensityTransform")));
    150155    Formula.Type formulaType = Formula.Type.valueOf(request.getParameter("type"));
    151156    formula.setFormulaType(formulaType);
  • trunk/www/views/formulas/list_formulas.jsp

    r4889 r4918  
    2929  import="net.sf.basedb.core.Item"
    3030  import="net.sf.basedb.core.Formula"
     31  import="net.sf.basedb.core.IntensityTransform"
    3132  import="net.sf.basedb.core.ItemQuery"
    3233  import="net.sf.basedb.core.ItemResultIterator"
     
    6869  private static final Enumeration<String, String> parsers = new Enumeration<String, String>();
    6970  private static final Enumeration<String, String> avgMethods = new Enumeration<String, String>();
     71  private static final Enumeration<String, String> transforms = new Enumeration<String, String>();
    7072  private static final Enumeration<String, String> rawEnumeration = new Enumeration<String, String>();
    7173  static
     
    8284    {
    8385      avgMethods.add(Integer.toString(m.getValue()), HTML.encodeTags(m.toString()));
     86    }
     87    transforms.add("", "- any -");
     88    for (IntensityTransform t : IntensityTransform.values())
     89    {
     90      transforms.add(Integer.toString(t.getValue()), HTML.encodeTags(t.toString()));
    8491    }
    8592    rawEnumeration.add("", "- none -");
     
    288295        enumeration="<%=avgMethods%>"
    289296        title="Avg. method"
     297        sortable="true"
     298        filterable="true"
     299        exportable="true"
     300      />
     301      <tbl:columndef
     302        id="sourceIntensityTransform"
     303        property="sourceIntensityTransform"
     304        datatype="int"
     305        enumeration="<%=transforms%>"
     306        title="Source intensity transform"
     307        sortable="true"
     308        filterable="true"
     309        exportable="true"
     310      />
     311      <tbl:columndef
     312        id="resultIntensityTransform"
     313        property="resultIntensityTransform"
     314        datatype="int"
     315        enumeration="<%=transforms%>"
     316        title="Result intensity transform"
    290317        sortable="true"
    291318        filterable="true"
     
    562589                <tbl:cell column="parser"><%=item.getParser().toString()%></tbl:cell>
    563590                <tbl:cell column="averageMethod"><%=item.getAverageMethod().toString()%></tbl:cell>
     591                <tbl:cell column="sourceIntensityTransform"><%=item.getSourceIntensityTransform() == null ? "<i>- any -</i>" : item.getSourceIntensityTransform().toString()%></tbl:cell>
     592                <tbl:cell column="resultIntensityTransform"><%=item.getResultIntensityTransform() == null ? "<i>- any -</i>" : item.getResultIntensityTransform().toString()%></tbl:cell>
    564593                <tbl:cell column="rawDataType"><%=rawDataType == null ? "<i>- none -</i>" : HTML.encodeTags(rawDataType.getName())%></tbl:cell>
    565594                <tbl:cell column="channels"><%=item.getChannels()%></tbl:cell>
  • trunk/www/views/formulas/view_formula.jsp

    r4889 r4918  
    282282        <td class="prompt">Avg. method</td>
    283283        <td><%=formula.getAverageMethod().toString()%></td>
     284      </tr>
     285      <tr>
     286        <td class="prompt">Source intensity transform</td>
     287        <td><%=formula.getSourceIntensityTransform() == null ? "<i>- any -</i>" : formula.getSourceIntensityTransform().toString()%></td>
     288      </tr>
     289      <tr>
     290        <td class="prompt">Result intensity transform</td>
     291        <td><%=formula.getResultIntensityTransform() == null ? "<i>- any -</i>" : formula.getResultIntensityTransform().toString()%></td>
    284292      </tr>
    285293      <tr>
Note: See TracChangeset for help on using the changeset viewer.