Changeset 4371


Ignore:
Timestamp:
Jul 3, 2008, 7:51:08 AM (15 years ago)
Author:
Nicklas Nordborg
Message:

Merged patch release 2.7.2 to the trunk.

Location:
trunk
Files:
10 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/admindoc/installation_upgrade.xml

    r4298 r4371  
    6666  <sect1 id="installation_upgrade.upgrade">
    6767    <title>Upgrade instructions</title>
     68
     69    <important id="lowess_bug">
     70      <title>Bug in the LOWESS plug-in affecting BASE version 2.0 -- 2.7.1</title>
     71      <para>
     72      BASE 2.7.2 fixes a serious bug in the LOWESS plug-in shipped
     73      as a part of the BASE package. The bug is found in all
     74      BASE versions between 2.0 and 2.7.1, and has caused incorrect normalization values to be
     75      calculated. All data that has been normalized with the LOWESS plug-in prior
     76      to BASE 2.7.2 should be considered invalid and needs to be re-normalized with
     77      the fixed version. Downstream analysis steps that has used the incorrectly
     78      normalized data also needs to be redone. For more information about the bug see
     79      <ulink url="http://base.thep.lu.se/ticket/1077">http://base.thep.lu.se/ticket/1077</ulink>
     80      </para>
     81     
     82      <para>
     83      BASE 2.7.2 includes a utility for finding all experiments/bioassay sets that
     84      includes data normalized with the LOWESS plug-in. An administrator can use
     85      this utility to extract a list of all experiments/bioassay sets that needs to be fixed.
     86      The utility can also tag the name of the found experiments/bioassay sets with
     87      <code>FIX LOWESS</code> to make it easier to find data that needs to be fixed.
     88      </para>
     89     
     90      <para>
     91      The utility can't see any difference between data normalized with the
     92      old version and the fixed version. It will simply report all data that
     93      has been normalized with the LOWESS plug-in. Only use the utility a single
     94      time right after the upgrade to BASE 2.7.2.
     95      </para>
     96     
     97      <para>
     98      The utility is a command line program that should be executed on the BASE
     99      application (web) server.
     100      </para>
     101     
     102      <programlisting>
     103<![CDATA[
     104cd <base-dir>/bin
     105./onetimefix.sh lowess_warn -u <login> -p <password> -f
     106]]>
     107</programlisting>
     108     
     109      <para>
     110        We recommend running the utility as the root user. The <option>-f</option>
     111        option is optional. If it is included the found experiments/bioassay sets
     112        are tagged with <code>FIX LOWESS</code>, otherwise only a list with the
     113        information is generated.
     114      </para>
     115     
     116    </important>
    68117
    69118    <important id="tomcat6">
  • trunk/src/clients/web/net/sf/basedb/clients/web/DynamicUtil.java

    r3679 r4371  
    4545import net.sf.basedb.clients.web.taglib.table.TableColumn;
    4646import net.sf.basedb.util.formatter.Formatter;
     47import net.sf.basedb.util.formatter.MultiFormatter;
     48import net.sf.basedb.util.formatter.ToStringFormatter;
    4749
    4850import java.util.ArrayList;
     
    207209    ItemResultIterator<Formula> result = query.iterate(dc);
    208210    SessionControl sc = dc.getSessionControl();
    209     Formatter<Number> numberFormatter = FormatterFactory.getNumberFormatter(sc);
     211    Formatter<Number> floatFormatter = FormatterFactory.getNumberFormatter(sc);
     212    Formatter<Number> intFormatter = FormatterFactory.getIntFormatter(sc);
     213    Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
     214    Formatter<Boolean> booleanFormatter = FormatterFactory.getBooleanFormatter(sc);
     215    Formatter<String> stringFormatter = FormatterFactory.getStringFormatter(sc);
     216    Formatter<Object> defaultFormatter = new ToStringFormatter();
    210217    while (result.hasNext())
    211218    {
     
    217224            titlePrefix + f.getName(), f.getDescription(), "auto", true, true, true,
    218225            f.getAverageMethod(), null);
    219         tc.setFormatter(FormatterFactory.getColorFormatter(sc, f.getColoring(), numberFormatter));
     226        Formatter<Number> intColorFormatter = FormatterFactory.getColorFormatter(sc, f.getColoring(), intFormatter);
     227        Formatter<Number> floatColorFormatter = FormatterFactory.getColorFormatter(sc, f.getColoring(), floatFormatter);
     228        MultiFormatter multiFormatter = new MultiFormatter(defaultFormatter, true);
     229        multiFormatter.registerFormatter(Integer.class, intColorFormatter);
     230        multiFormatter.registerFormatter(Long.class, intColorFormatter);
     231        multiFormatter.registerFormatter(Number.class, floatColorFormatter);
     232        multiFormatter.registerFormatter(Date.class, dateFormatter);
     233        multiFormatter.registerFormatter(Boolean.class, booleanFormatter);
     234        multiFormatter.registerFormatter(String.class, stringFormatter);
     235        tc.setFormatter(multiFormatter);
    220236        columns.add(tc);
    221237      }
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/ColumnDef.java

    r4326 r4371  
    616616
    617617        sb.append("<span class=\"link\" onclick=\"Table.setSortOrder(event, '").append(table.getId()).append("', '");
    618         sb.append(getSortproperty()).append("', '").append(direction.name()).append("')\" title=\"");
     618        sb.append(HTML.javaScriptEncode(getSortproperty())).append("', '").append(direction.name()).append("')\" title=\"");
    619619        sb.append(theTooltip).append("\">").append(getTitle()).append("</span>").append(image);
    620620       
  • trunk/src/core/net/sf/basedb/util/IntensityCalculatorUtil.java

    r4118 r4371  
    4747import net.sf.basedb.core.InvalidDataException;
    4848import net.sf.basedb.core.InvalidUseOfNullException;
     49import net.sf.basedb.core.data.FeatureData;
    4950import net.sf.basedb.core.data.RawData;
    5051import net.sf.basedb.core.data.ReporterData;
     
    305306
    306307    // A cache holding already seen position --> reporter mappings
    307     Map<Integer, ReporterData> positionCache = new HashMap<Integer, ReporterData>();
     308    Map<Integer, Integer> positionCache = new HashMap<Integer, Integer>();
     309    // A cache holding already seen feature->position mappings
     310    Map<Integer, Integer> featureCache = new HashMap<Integer, Integer>();
    308311   
    309312    // The max position number in the raw bioassays -- only calculated if needed (see below)
     
    350353      if (rba.getArrayDesign() != null)
    351354      {
    352         rawQuery.join(Hql.leftJoin(null, "feature", Item.REPORTER.getAlias(), null, true));
     355        rawQuery.join(Hql.leftJoin(null, "feature", Item.FEATURE.getAlias(), null, true));
     356        // The joins below are needed to avoid extra SELECT statements for each spot
     357        // that is loaded
     358        rawQuery.join(Hql.leftJoin(Item.FEATURE.getAlias(), "reporter", "ftrep", null, true));
     359        rawQuery.join(Hql.leftJoin(Item.FEATURE.getAlias(), "arrayDesignBlock", "ftrbl", null, true));
    353360      }
    354361     
     
    362369        int position = rd.getPosition();
    363370        ReporterData reporter = rd.getReporter();
     371        FeatureData feature = rd.getFeature();
    364372        //data += System.nanoTime();
    365373       
     
    371379        if (intensities != null)
    372380        {
    373           // Insert mapping position --> reporter
    374           if (positionCache.containsKey(position))
     381          // If we have a feature check the feature cache if a position has
     382          // already been assigned to it
     383          Integer cachedFeaturePosition = feature == null ?
     384            null : featureCache.get(feature.getId());
     385          if (cachedFeaturePosition != null)
    375386          {
    376             //chit -= System.nanoTime();
    377             // A mapping already exists, check if same reporter
    378             ReporterData cached = positionCache.get(position);
    379             int reporterId = reporter == null ? 0 : reporter.getId();
    380             int cachedId = cached == null ? 0 : cached.getId();
    381             if (reporterId != cachedId)
    382             {
    383               // Same position but different reporter, must assign different position
    384               if (maxPosition == 0)
    385               {
    386                 // We must find the maximum position among all raw bioassays unless we havn't done that already
    387                 try
    388                 {
    389                   for (RawBioAssay rbaMax : rawBioAssays)
    390                   {
    391                     DynamicRawDataQuery query = rbaMax.getDynamicRawData();
    392                     query.select(Selects.expression(Aggregations.max(Dynamic.rawData("position")), "maxPosition"));
    393                     DynamicResultIterator result = query.iterate(dc);
    394                     int thisMaxPosition = result.next().getInt(1);
    395                     if (thisMaxPosition > maxPosition) maxPosition = thisMaxPosition;
    396                     result.close();
    397                   }
    398                 }
    399                 catch (SQLException ex)
    400                 {
    401                   throw new BaseException(ex);
    402                 }
    403               }
    404               maxPosition++;
    405               position = maxPosition;
    406               posBatcher.insert(position, reporter);
    407               positionCache.put(position, reporter);
    408             }
    409             //chit += System.nanoTime();
     387            position = cachedFeaturePosition;
    410388          }
    411389          else
    412390          {
    413             // New position, insert reporter mapping
    414             //brep -= System.nanoTime();
    415             posBatcher.insert(position, reporter);
    416             //brep += System.nanoTime();
    417             //cnew -= System.nanoTime();
    418             positionCache.put(position, reporter);
    419             //cnew += System.nanoTime();
     391            // We have no feature or the feautre has no position;
     392            // check if the position has same reporter
     393            if (positionCache.containsKey(position))
     394            {
     395              Integer cachedReporterId = positionCache.get(position);
     396              Integer reporterId = reporter == null ? null : reporter.getId();
     397              if (reporterId == null && cachedReporterId != null ||
     398                reporterId != null && !reporterId.equals(cachedReporterId))
     399              {
     400                // Reporters don't match, we need a new position
     401                if (maxPosition == 0)
     402                {
     403                  // We must find the maximum position among all raw bioassays unless we havn't done that already
     404                  try
     405                  {
     406                    for (RawBioAssay rbaMax : rawBioAssays)
     407                    {
     408                      DynamicRawDataQuery query = rbaMax.getDynamicRawData();
     409                      query.select(Selects.expression(Aggregations.max(Dynamic.rawData("position")), "maxPosition"));
     410                      DynamicResultIterator result = query.iterate(dc);
     411                      int thisMaxPosition = result.next().getInt(1);
     412                      if (thisMaxPosition > maxPosition) maxPosition = thisMaxPosition;
     413                      result.close();
     414                    }
     415                  }
     416                  catch (SQLException ex)
     417                  {
     418                    throw new BaseException(ex);
     419                  }
     420                }
     421                maxPosition++;
     422                position = maxPosition;
     423                posBatcher.insert(position, reporter);
     424                positionCache.put(position, reporterId);
     425                if (feature != null) featureCache.put(feature.getId(), position);
     426              }
     427            }
     428            else
     429            {
     430              // This position is not used, map it to the current reporter
     431              posBatcher.insert(position, reporter);
     432              positionCache.put(position, reporter == null ? null : reporter.getId());
     433              if (feature != null) featureCache.put(feature.getId(), position);
     434            }
    420435          }
     436         
    421437          //braw -= System.nanoTime();
    422438          // Insert mapping to raw data spot
  • trunk/src/core/net/sf/basedb/util/formatter/MultiFormatter.java

    r3675 r4371  
    4646  private final boolean checkSuperclass;
    4747  private final Map<Class<?>, Formatter<?>> formatters;
     48  private final boolean decideOnFirst;
     49  private Formatter formatter;
    4850 
    4951  /**
     
    5658  public MultiFormatter(Formatter<Object> defaultFormatter, boolean checkSuperclass)
    5759  {
     60    this(defaultFormatter, checkSuperclass, false);
     61  }
     62 
     63  /**
     64    Create a new multi formatter.
     65    @param defaultFormatter The formatter to use if the object's class
     66      isn't found among the registered formatters
     67    @param checkSuperclass If the superclass of the object should be
     68      checked in case there is no exact match
     69    @param decideOnFirst If TRUE, the first non-null value decides which parent
     70      formatter to use. All subsequent calls to {@link #format(Object)} uses
     71      the same formatetter. This is useful when you know that the formatter will
     72      only use the same class of objects, but not which class.
     73    @since 2.7.2
     74  */
     75  public MultiFormatter(Formatter<Object> defaultFormatter, boolean checkSuperclass,
     76    boolean decideOnFirst)
     77  {
    5878    this.defaultFormatter = defaultFormatter;
    5979    this.formatters = new HashMap<Class<?>, Formatter<?>>();
    6080    this.checkSuperclass = checkSuperclass;
     81    this.decideOnFirst = decideOnFirst;
    6182  }
    6283 
     
    7091    if (value == null) return "";
    7192    Class c = value.getClass();
    72     Formatter f = formatters.get(c);
    73     if (f == null && checkSuperclass)
     93    Formatter f = formatter;
     94    if (f == null)
    7495    {
    75       c = c.getSuperclass();
    76       while (f == null && c != null)
     96      f = formatters.get(c);
     97      if (f == null && checkSuperclass)
    7798      {
    78         f = formatters.get(c);
    7999        c = c.getSuperclass();
     100        while (f == null && c != null)
     101        {
     102          f = formatters.get(c);
     103          c = c.getSuperclass();
     104        }
    80105      }
     106      if (f == null) f = defaultFormatter;
     107      if (decideOnFirst) formatter = f;
    81108    }
    82     if (f == null) f = defaultFormatter;
    83109    return f.format(value);
    84110  }
  • trunk/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java

    r4356 r4371  
    128128import java.util.TreeMap;
    129129import java.util.regex.Pattern;
     130import java.util.regex.Matcher;
    130131
    131132/**
     
    843844      Boolean mergeReporters = (Boolean) configuration.getValue(geneAveragesParameter.getName());
    844845     
     846      TreeMap<String, JobParameter> base1parametertype = getJobParameterObjectsFromXML(String.valueOf(configuration.getValue(jobParametersParameter.getName())), true);
    845847      ListMap<String, String> parameters = new ListMap<String, String>();
    846848      for (PluginParameter<?> pp : getJobParametersFromXML(String.valueOf(configuration.getValue(jobParametersParameter.getName())), true))
     
    848850        String name = pp.getName();
    849851        Object value = job.getValue(name);
    850         parameters.put(name, value == null ? "" : value.toString());
     852        String valueString = (value == null) ? "" : value.toString();
     853        JobParameter jp=base1parametertype.get(name);
     854        // replacing line breaks for Base1 TEXT and STRING types
     855        if (jp.getType() == Base1JobParameterType.STRING ||
     856            jp.getType() == Base1JobParameterType.TEXT)
     857        {
     858          Pattern p=Pattern.compile("\r");
     859          Matcher m=p.matcher(valueString);
     860          valueString = m.replaceAll("\\\\r");
     861          m.usePattern(Pattern.compile("\n"));
     862          m.reset(valueString);
     863          valueString = m.replaceAll("\\\\n");
     864        }
     865        parameters.put(name, valueString);
    851866      }
    852867     
     
    10101025    return headers;
    10111026  }
    1012  
    1013  
     1027
     1028
    10141029  @SuppressWarnings({ "unchecked", "serial" })
    1015   private List<PluginParameter<?>> getJobParametersFromXML(String xml, boolean hideRemoved)
     1030  private TreeMap<String, JobParameter>
     1031    getJobParameterObjectsFromXML(String xml, boolean hideRemoved)
    10161032  {
    10171033    try
     
    10311047        }
    10321048      });
    1033      
    1034       TreeMap<Integer, PluginParameter<?>> positionParameter = new TreeMap<Integer, PluginParameter<?>>();
     1049
     1050      TreeMap<String, JobParameter> pars= new TreeMap<String, JobParameter>();
    10351051      while (it.hasNext())
    10361052      {
     
    10391055        if (!jp.isRemoved())
    10401056        {
     1057          if (pars.containsKey(jp.getName()))
     1058          {
     1059            throw new BaseException("Duplicate parameter at position "+jp.getPosition());
     1060          }
     1061          pars.put(jp.getName(), jp);
     1062        }
     1063      }
     1064      return pars;
     1065    }
     1066    catch (JDOMException e1)
     1067    {
     1068      throw new BaseException(e1.getCause());
     1069    }
     1070    catch (IOException e1)
     1071    {
     1072      throw new BaseException(e1);
     1073    }
     1074  }
     1075
     1076
     1077  @SuppressWarnings({ "unchecked", "serial" })
     1078  private List<PluginParameter<?>> getJobParametersFromXML(String xml, boolean hideRemoved)
     1079  {
     1080    try
     1081    {
     1082      String doctype = "<!DOCTYPE jobparameters SYSTEM \"base1-plugin-configuration-file.dtd\">";
     1083      Document doc = XMLUtil.getValidatedXml(doctype+xml, dtdFile);
     1084      Iterator<Element> it = doc.getDescendants(new Filter()
     1085      {
     1086        public boolean matches(Object o)
     1087        {
     1088          if (o instanceof Element)
     1089          {
     1090            Element e = (Element) o;
     1091            return e.getName().equals("parameter");
     1092          }
     1093          return false;
     1094        }
     1095      });
     1096     
     1097      TreeMap<Integer, PluginParameter<?>> positionParameter = new TreeMap<Integer, PluginParameter<?>>();
     1098      while (it.hasNext())
     1099      {
     1100        Element e = it.next();
     1101        JobParameter jp = new JobParameter(e);
     1102        if (!jp.isRemoved())
     1103        {
    10411104          if (positionParameter.containsKey(jp.getPosition()))
    10421105          {
     
    10571120    }
    10581121  }
    1059  
    1060  
     1122
     1123
    10611124  /**
    10621125    Creates a boolean from a string.
  • trunk/src/plugins/core/net/sf/basedb/plugins/LowessNormalization.java

    r4358 r4371  
    138138  (
    139139    "delta",
    140     "Minimum log(intensity) step",
     140    "Minimum log10(intensity) step",
    141141    "",
    142     new FloatParameterType(0F, null, 0.1F, true)
     142    new FloatParameterType(0F, null, 0.043F, true)
    143143  );
    144144 
     
    510510              checkInterrupted();
    511511              SpotData spot = toNormalize.get(j);
    512               double factor = Math.exp(smoothCurve.get(j) * 0.5);
     512              double factor = Math.pow(2,smoothCurve.get(j) * 0.5);
    513513              batcher.insert(bioassayColumn, spot.position, (float)(spot.ch1/factor), (float)(spot.ch2*factor));
    514514            }
     
    611611        // while distance from windowStart to i is greater then distance from i to windowEnd: move window
    612612        while ((windowStart + windowSize < dataSize) &&
    613             (Ai - data.get(windowStart).A > data.get(windowStart + windowSize).A - Ai))
     613            (Ai - data.get(windowStart).A > data.get(windowStart + windowSize-1).A - Ai))
    614614        {
    615615          windowStart++;
     
    657657      {
    658658        double w = Math.abs((smoothCurve[j] - data.get(j).M) * invYWRange);
    659         wFit.set(j, w < 1 ? Math.pow(Math.pow(1 - w, 2), 2) : 0);
     659        wFit.set(j, w < 1 ? Math.pow(1D - w*w, 2) : 0);
    660660      }
    661661    }
     
    675675      double v1 = temp.get((temp.size() / 2) - 1);
    676676      double v2 = temp.get((temp.size() / 2));
    677       return 0.5 * v1 * v2;
    678     }
    679     else
    680     {
    681       return temp.get((temp.size() - 1) / 2);
    682     }
     677      return 0.5 * (v1 + v2);
     678    }
     679    return temp.get(temp.size() / 2);
    683680  }
    684681
  • trunk/src/plugins/core/net/sf/basedb/plugins/MedianRatioNormalization.java

    r4358 r4371  
    238238    if (command.equals(Request.COMMAND_EXECUTE))
    239239    {
    240       if (progress != null) progress.display(0, "Preparing to normalize...");
    241 
    242240      DbControl dc = null;
    243241      try
     
    251249        float highExclude = (Float) job.getValue(highExcludeParameter.getName());
    252250        Job thisJob = getCurrentJob(dc);
    253 
    254         // Create Transformation
    255         Transformation t = source.newTransformation(getCurrentJob(dc));
    256         t.setName(about.getName());
    257         dc.saveItem(t);
    258 
    259         // Create the normalized bioassay set
    260         BioAssaySet child = t.newProduct(null, "new", true);
    261         dc.saveItem(child);
    262 
    263         // Batcher for inserting normalized data
    264         SpotBatcher batcher = child.getSpotBatcher();
    265 
    266         int nofChannels=source.getRawDataType().getChannels();
    267         switch (nofChannels)
     251       
     252        BioAssaySet child = null;
     253        int rawChannels = source.getRawDataType().getChannels();
     254        switch (rawChannels)
    268255        {
    269             case 1:
    270               String method = (String) job.getValue(methodParameter.getName());
    271               normalize1ch(dc, source, batcher, minIntensity, lowExclude,
    272                            highExclude, method.equals("Scale"), progress);
     256          case 1:
     257            String method = (String) job.getValue(methodParameter.getName());
     258            child = normalize1ch(dc, source, thisJob, minIntensity, lowExclude,
     259                    highExclude, method.equals("Scale"), progress);
     260            break;
     261          case 2:
     262            int blockGroupSize =
     263              (Integer) job.getValue(blockGroupParameter.getName());
     264            child = normalize(dc, source, thisJob, minIntensity, lowExclude,
     265                highExclude, blockGroupSize, progress);
    273266              break;
    274             case 2:
    275               int blockGroupSize =
    276                 (Integer) job.getValue(blockGroupParameter.getName());
    277               normalize2ch(dc, source, batcher, minIntensity, lowExclude,
    278                            highExclude, blockGroupSize, progress);
    279               break;
    280             default:
    281               throw new InvalidDataException(nofChannels +
    282                                              "-channel arrays not supported");
    283         }
    284 
    285         batcher.close();
     267          default:
     268              throw new InvalidDataException(rawChannels +
     269                "-channel arrays not supported");
     270        }
     271       
    286272        child.setName(childName);
    287273        child.setDescription(childDescription);
    288274        dc.commit();
    289 
    290275        int normalizedSpots = child.getNumSpots();
    291276        response.setDone(normalizedSpots + " spots normalized, " + (source.getNumSpots() - normalizedSpots) + " spots removed");
     
    421406    @since 2.7
    422407  */
    423   private void
    424   normalize1ch(DbControl dc, BioAssaySet source, SpotBatcher batcher,
     408  private BioAssaySet
     409  normalize1ch(DbControl dc, BioAssaySet source, Job job,
    425410               float minIntensity, float lowExclude, float highExclude,
    426411               boolean scale, ProgressReporter progress)
    427412  {
     413    // Create Transformation
     414    Transformation t = source.newTransformation(job);
     415    t.setName(about.getName());
     416    dc.saveItem(t);
     417
     418    // Create the normalized bioassay set
     419    BioAssaySet child = t.newProduct(null, "new", true);
     420    dc.saveItem(child);
     421
     422    // Batcher for inserting normalized data
     423    SpotBatcher batcher = child.getSpotBatcher();
     424   
    428425    // Expressions used to get data
    429426    Expression ch1 = Dynamic.column(VirtualColumn.channel(1));
     
    510507      throw new BaseException(e);
    511508    }
     509    return child;
    512510  }
    513511
    514512  /**
    515     Normalise the source bioassay set using MEDIAN-RATIO normalization.
     513    Normalise the source bioassay set using MEDIAN-RATIO normalization. NOTE!
     514    This normalization method only works with 2-channel data.
     515   
    516516    @param dc The DbControl to use for database access
    517517    @param source The source bioassay set that is going to be normalized
     518    @param job The job that is doing the normalization, or null
    518519    @param minIntensity All spots which have a lower intensity value in either channel
    519520      will be filtered out
     
    525526    @param progress Progress reporter for the caller to keep track of the plugin's progress. Null is allowed.
    526527    @return The normalized bioassayset
    527     @since 2.5
    528   */
    529   private void
    530   normalize2ch(DbControl dc, BioAssaySet source, SpotBatcher batcher,
    531                float minIntensity, float lowExclude, float highExclude,
    532                int blockGroupSize, ProgressReporter progress)
    533   {
     528    @since 2.5; This method was removed in 2.7.0 by accident, added in 2.7.2 again
     529  */
     530  public BioAssaySet normalize(DbControl dc, BioAssaySet source, Job job,
     531      float minIntensity, float lowExclude, float highExclude,
     532      int blockGroupSize, ProgressReporter progress)
     533  {
     534    if (progress != null) progress.display(0, "Preparing to normalize...");
     535 
     536    // Create Transformation
     537    Transformation t = source.newTransformation(job);
     538    t.setName(about.getName());
     539    dc.saveItem(t);
     540   
     541    // Create the normalized bioassay set
     542    BioAssaySet child = t.newProduct(null, "new", true);
     543    dc.saveItem(child);
     544   
     545    // Batcher for inserting normalized data
     546    SpotBatcher batcher = child.getSpotBatcher();
     547   
    534548    // Expressions used to get data
    535549    Expression block = Dynamic.rawData("block");
     
    567581    query.restrict(bioAssayRestriction);
    568582    query.order(Orders.asc(block));
    569 
     583 
    570584    // Normalize one bioassay at a time
    571585    List<BioAssay> assays = source.getBioAssays().list(dc);
     
    575589      {
    576590        checkInterrupted();
    577 
     591 
    578592        // Prepare list for holding data
    579593        int assaySpots = assay.getNumSpots();
     
    657671          fromBlock = toBlock + 1;
    658672        }
    659         batcher.flush();
    660       }
     673      }
     674      batcher.flush();
    661675      batcher.close();
    662676    }
     
    665679      throw new BaseException(e);
    666680    }
     681    return child;
    667682  }
    668683 
  • trunk/www/views/experiments/explorer/view/view.jsp

    r4302 r4371  
    616616          property="<%=tc.getProperty()%>"
    617617          datatype="<%=tc.getDatatype().getStringValue()%>"
    618           title="<%=tc.getTitle()%>"
     618          title="<%=HTML.encodeTags(tc.getTitle())%>"
    619619          sortable="<%=tc.getSortable()%>"
    620620          filterable="<%=tc.getFilterable()%>"
  • trunk/www/views/experiments/spotdata/list_spotdata.jsp

    r4306 r4371  
    258258          property="<%=tc.getProperty()%>"
    259259          datatype="<%=tc.getDatatype().getStringValue()%>"
    260           title="<%=tc.getTitle()%>"
     260          title="<%=HTML.encodeTags(tc.getTitle())%>"
    261261          sortable="<%=tc.getSortable()%>"
    262262          filterable="<%=tc.getFilterable()%>"
Note: See TracChangeset for help on using the changeset viewer.