Changeset 4131


Ignore:
Timestamp:
Feb 8, 2008, 9:55:48 AM (15 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #868: Support for chips with multiple arrays

Location:
trunk
Files:
1 added
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/appendix/incompatible.xml

    r4127 r4131  
    105105      since this is a new option. In most cases, it should be handled in the same way
    106106      as if the job is <constant>EXECUTING</constant>.
     107    </para>
     108   
     109    <bridgehead>Hybridization to Labeled extracts link</bridgehead>
     110    <para>
     111      This link can now hold information about which sub-array a labeled
     112      extract belongs to on a multi-array hybridization. Code that is
     113      unaware of the concept of sub-arrays may find hybridizations
     114      where the number of labeled extracts doesn't match the number
     115      channels in the platform used, and that more than one labeled
     116      extract has the same label. This was previously considered as
     117      an error condition by the experiment validator. With the
     118      new scheme the validation has to be done on a sub-array basis instead
     119      of on the complete hybridization.
     120    </para>
     121   
     122    <para>
     123      A similar issue arises when inheriting annotations to a raw bioassay
     124      which stems from a specific sub-array on a mutli-array hybridization.
     125      This raw bioassay should only inherit annotations from the labeled
     126      extracts that are part of the same sub-array. For API compatibility
     127      reasons the <methodname>Hybridization.getAnnotatableParents()</methodname>
     128      will still return <emphasis>all</emphasis> labeled extracts. Code
     129      that is calling this method in order to find the parents to
     130      a raw bioassay should instead call the new method,
     131      <methodname>Hybridizations.getAnnotatableParents(int)</methodname>,
     132      where the <code>int</code> is the sub-array index value for
     133      the raw bioassay.
    107134    </para>
    108135   
  • trunk/doc/src/docbook/userdoc/array_lims.xml

    r3950 r4131  
    5454      For users buying their arrays from commercial sources, the plate management component
    5555      can be ignored and they can go immediately to
    56       <xref linkend="array_lims.arraydesign" />
    57       .
     56      <xref linkend="array_lims.arraydesign" />.
    5857    </para>
    5958
     
    120119                files that can be selected on the <guilabel>Data files</guilabel>
    121120                tab.
     121              </para>
     122            </listitem>
     123          </varlistentry>
     124          <varlistentry>
     125            <term>
     126              <guilabel>Arrays/slide</guilabel>
     127            </term>
     128            <listitem>
     129              <para>
     130                The number of sub-arrays that can be placed on a
     131                single slide. The default value is 1, but some
     132                platforms, for example Illumina, has slides
     133                with 6 or 8 arrays.
    122134              </para>
    123135            </listitem>
  • trunk/doc/src/docbook/userdoc/biomaterials.xml

    r3950 r4131  
    914914      <sect3 id="biomaterials.hybridizations.hybridization">
    915915        <title>Hybridization</title>
    916         <variablelist>
    917           <varlistentry>
    918             <term>
    919               <guilabel>Name</guilabel>
    920             </term>
    921             <listitem>
    922               <para>
    923                 <replaceable>New hybridization</replaceable>
    924                 is BASE2 default name but it is strongly advise to provide a
    925                 meaningful and unique name (required).
    926               </para>
    927             </listitem>
    928           </varlistentry>
    929 
    930           <varlistentry>
    931             <term>
    932               <guilabel>Created</guilabel>
    933             </term>
    934             <listitem>
    935               <para>
    936                 A date should be provided. The information can be important when
    937                 running quality controls on data and account for potential
    938                 confounding factor (e.g. to account for a day effect)
    939               </para>
    940             </listitem>
    941           </varlistentry>
    942 
    943           <varlistentry>
    944             <term>
    945               <guilabel>Registered</guilabel>
    946             </term>
    947             <listitem>
    948               <para>
    949                 This field is automatically populated with a date at which the
    950                 hybridization was entered in BASE2 system.
    951               </para>
    952             </listitem>
    953           </varlistentry>
    954 
    955           <varlistentry>
    956             <term>
    957               <guilabel>Protocol</guilabel>
    958             </term>
    959             <listitem>
    960               <para>
    961                 The hybridization protocol that was used to do the hybridization.
    962               </para>
    963             </listitem>
    964           </varlistentry>
    965 
    966           <varlistentry>
    967             <term>
    968               <guilabel>Hardware</guilabel>
    969             </term>
    970             <listitem>
    971               <para>
    972                 The hybridization-station that was used during the hybridization.
    973               </para>
    974             </listitem>
    975           </varlistentry>
    976 
    977           <varlistentry>
    978             <term>
    979               <guilabel>Array slide</guilabel>
    980             </term>
    981             <listitem>
    982               <para>The array slide that was used in the hybridization.</para>
    983               <note>
    984                 <para>
    985                   Ideally, The Array Slides should have been created but for those
    986                   users with permission to do, Array Slides could be generated at
    987                   that point.
    988                 </para>
    989               </note>
    990             </listitem>
    991           </varlistentry>
    992 
    993           <varlistentry>
    994             <term>
    995               <guilabel>Description</guilabel>
    996             </term>
    997             <listitem>
    998               <para>
    999                 A free text field to report any information that can not be captured
    1000                 otherwise
    1001               </para>
    1002             </listitem>
    1003           </varlistentry>
    1004         </variablelist>
     916 
    1005917        <figure id="write_docbook_doc.figures.hybridization-tab-1">
    1006918          <title>Hybridization tab</title>
     
    1013925            </mediaobject>
    1014926          </screenshot>
    1015         </figure>
    1016       </sect3>
     927        </figure>
     928       
     929        <helptext external_id="hybridization.edit" title="Edit hybridization">
     930        <variablelist>
     931          <varlistentry>
     932            <term>
     933              <guilabel>Name</guilabel>
     934            </term>
     935            <listitem>
     936              <para>
     937                <replaceable>New hybridization</replaceable>
     938                is BASE2 default name but it is strongly advise to provide a
     939                meaningful and unique name (required).
     940              </para>
     941            </listitem>
     942          </varlistentry>
     943          <varlistentry>
     944            <term>
     945              <guilabel>Arrays</guilabel>
     946            </term>
     947            <listitem>
     948              <para>
     949                The number of sub-arrays on the slide that was used in
     950                this hybridization. The default value is 1, but some
     951                platforms, for example Illumina, has slides
     952                with 6 or 8 arrays.
     953              </para>
     954            </listitem>
     955          </varlistentry>
     956
     957          <varlistentry>
     958            <term>
     959              <guilabel>Created</guilabel>
     960            </term>
     961            <listitem>
     962              <para>
     963                A date should be provided. The information can be important when
     964                running quality controls on data and account for potential
     965                confounding factor (e.g. to account for a day effect)
     966              </para>
     967            </listitem>
     968          </varlistentry>
     969
     970          <varlistentry>
     971            <term>
     972              <guilabel>Registered</guilabel>
     973            </term>
     974            <listitem>
     975              <para>
     976                This field is automatically populated with a date at which the
     977                hybridization was entered in BASE2 system.
     978              </para>
     979            </listitem>
     980          </varlistentry>
     981
     982          <varlistentry>
     983            <term>
     984              <guilabel>Protocol</guilabel>
     985            </term>
     986            <listitem>
     987              <para>
     988                The hybridization protocol that was used to do the hybridization.
     989              </para>
     990            </listitem>
     991          </varlistentry>
     992
     993          <varlistentry>
     994            <term>
     995              <guilabel>Hardware</guilabel>
     996            </term>
     997            <listitem>
     998              <para>
     999                The hybridization-station that was used during the hybridization.
     1000              </para>
     1001            </listitem>
     1002          </varlistentry>
     1003
     1004          <varlistentry>
     1005            <term>
     1006              <guilabel>Array slide</guilabel>
     1007            </term>
     1008            <listitem>
     1009              <para>The array slide that was used in the hybridization.</para>
     1010              <note>
     1011                <para>
     1012                  Ideally, The Array Slides should have been created but for those
     1013                  users with permission to do, Array Slides could be generated at
     1014                  that point.
     1015                </para>
     1016              </note>
     1017            </listitem>
     1018          </varlistentry>
     1019
     1020          <varlistentry>
     1021            <term>
     1022              <guilabel>Description</guilabel>
     1023            </term>
     1024            <listitem>
     1025              <para>
     1026                A free text field to report any information that can not be captured
     1027                otherwise
     1028              </para>
     1029            </listitem>
     1030          </varlistentry>
     1031        </variablelist>
     1032        <seeother>
     1033          <other external_id="hybridization.labeledextracts">Labeled extracts</other>
     1034        </seeother>
     1035        </helptext>
     1036       
     1037      </sect3>
     1038     
    10171039      <sect3 id="biomaterials.hybridizations.properties.labeledextracts">
    10181040        <title>Labeled extracts</title>
     1041       
     1042        <helptext external_id="hybridization.labeledextracts" title="Labeled extracts">
    10191043        <para>
    10201044          This important tab allows users to select the labeled extracts applied to an
     
    10221046        </para>
    10231047        <para>
    1024           Use the buttons to the right for adding and removing the items in the list.
    1025           Select one or several labeled extracts in the list and write the used mass in
    1026           the field below.
    1027         </para>
     1048          Use the <guibutton>Add labeled extracts</guibutton> button to add
     1049          items and the <guibutton>Remove</guibutton> button to remove items.
     1050          Select one or several labeled extracts in the list and write the used
     1051          mass and sub-array index in the fields below.
     1052        </para>
     1053       
     1054        <seeother>
     1055          <other external_id="hybridization.edit">Edit hybridization</other>
     1056        </seeother>
     1057        </helptext>
     1058       
    10281059      </sect3>
    10291060      <sect3 id="biomaterials.hybridizations.properties.annotations_param">
  • trunk/doc/src/docbook/userdoc/rawbioassays.xml

    r4093 r4131  
    9696          <para>
    9797            The name of the raw bioassay.
     98          </para>
     99        </listitem>
     100      </varlistentry>
     101      <varlistentry>
     102        <term>
     103          <guilabel>Array index</guilabel>
     104        </term>
     105        <listitem>
     106          <para>
     107            The index of the sub-array on the hybridization this
     108            raw bioassay's data is linked with. The default value
     109            is 1. With some platforms, for example Illumina, which has
     110            slides with 6 or 8 arrays the value should be changed to
     111            reflect the correct sub-array. This information is important
     112            to link the raw bioassay with the correct biomaterial
     113            entries.
    98114          </para>
    99115        </listitem>
  • trunk/src/core/common-queries.xml

    r4127 r4131  
    30523052  </query>
    30533053
     3054  <query id="SET_NUMARRAYS_ON_ARRAYDESIGNS" type="HQL">
     3055    <sql>
     3056      UPDATE ArrayDesignData ad
     3057      SET ad.numArrays = :numArrays
     3058      WHERE ad.numArrays IS NULL
     3059    </sql>
     3060    <description>
     3061      A HQL query that set the numArrays property
     3062      on all array designs with a null value.
     3063    </description>
     3064  </query>
     3065 
     3066  <query id="SET_NUMARRAYS_ON_HYBRIDIZATIONS" type="HQL">
     3067    <sql>
     3068      UPDATE HybridizationData hyb
     3069      SET hyb.numArrays = :numArrays
     3070      WHERE hyb.numArrays IS NULL
     3071    </sql>
     3072    <description>
     3073      A HQL query that set the numArrays property
     3074      on all hybridizations with a null value.
     3075    </description>
     3076  </query>
     3077 
     3078  <query id="SET_ARRAYNUM_ON_RAWBIOASSAYS" type="HQL">
     3079    <sql>
     3080      UPDATE RawBioAssayData rba
     3081      SET rba.arrayNum = :arrayNum
     3082      WHERE rba.arrayNum IS NULL
     3083    </sql>
     3084    <description>
     3085      A HQL query that set the arrayNum property
     3086      on all raw bioassays with a null value.
     3087    </description>
     3088  </query>
     3089
    30543090</predefined-queries>
  • trunk/src/core/net/sf/basedb/core/ArrayDesign.java

    r4080 r4131  
    107107    ad.setName("New array design");
    108108    ad.setPlatform(platform);
     109    ad.setNumArrays(1);
    109110    ad.getData().setFeatureIdentificationMethod(FeatureIdentificationMethod.NONE.getValue());
    110111    return ad;
     
    127128    ad.setName("New array design");
    128129    ad.setVariant(variant);
     130    ad.setNumArrays(1);
    129131    ad.getData().setFeatureIdentificationMethod(FeatureIdentificationMethod.NONE.getValue());
    130132    return ad;
     
    414416
    415417  /**
     418    Get the number of arrays on a single slide. The default
     419    value is 1.
     420    @since 2.6
     421  */
     422  public int getNumArrays()
     423  {
     424    return getData().getNumArrays();
     425  }
     426 
     427  /**
     428    Set the number of arrays on a single slide.
     429    @param numArrays A value > 0
     430    @throws NumberOutOfRangeException If the value is <=0
     431    @since 2.6
     432   */
     433  public void setNumArrays(int numArrays)
     434  {
     435    checkPermission(Permission.WRITE);
     436    if (numArrays <= 0) throw new NumberOutOfRangeException("numArrays", numArrays, 0, false);
     437    getData().setNumArrays(numArrays);
     438  }
     439 
     440  /**
    416441    Check if this array design has information about features, either
    417442    in the database or in files.
  • trunk/src/core/net/sf/basedb/core/BioMaterialEvent.java

    r4026 r4131  
    453453    }
    454454  }
    455    
     455 
     456  /**
     457    Get the source group of the biomaterial
     458    @param bioMaterial The source biomaterial
     459    @return The source group index or 0 if the biomaterial is not a source of this event
     460    @since 2.6
     461    @see #setSourceGroup(MeasuredBioMaterial, int)
     462  */
     463  public int getSourceGroup(MeasuredBioMaterial bioMaterial)
     464  {
     465    UsedQuantity used = getData().getSources().get(bioMaterial.getData());
     466    return used != null ? used.getSourceGroup() : 0;
     467  }
     468 
    456469  /**
    457470    Add a source biomaterial to this event or update
     
    476489    checkAllowedSource(bioMaterial);
    477490    MeasuredBioMaterialData data = (MeasuredBioMaterialData)bioMaterial.getData();
    478     UsedQuantity used = getData().getSources().put(data, new UsedQuantity(usedQuantity));
    479     if (used != null && used.getUsedQuantity() != null)
    480     {
    481       MeasuredBioMaterial.updateRemainingQuantity(getDbControl(), data, -used.getUsedQuantity());
    482     }
    483     if (usedQuantity != null) MeasuredBioMaterial.updateRemainingQuantity(getDbControl(), data, usedQuantity);
    484   }
    485  
    486 
     491    UsedQuantity used = getData().getSources().get(data);
     492    if (used != null)
     493    {
     494      // There is already an entry for this biomaterial
     495      if (used.getUsedQuantity() != null)
     496      {
     497        // Return the old value to the biomaterial
     498        MeasuredBioMaterial.updateRemainingQuantity(getDbControl(), data, -used.getUsedQuantity());
     499      }
     500      // Set the new value
     501      used.setUsedQuantity(usedQuantity);
     502    }
     503    else
     504    {
     505      // This is a new entry
     506      used = new UsedQuantity(usedQuantity, 1);
     507      getData().getSources().put(data, used);
     508    }
     509    if (usedQuantity != null)
     510    {
     511      // Take away the new used quantity from the biomaterial
     512      MeasuredBioMaterial.updateRemainingQuantity(getDbControl(), data, usedQuantity);
     513    }
     514  }
     515 
     516  /**
     517    Set the source group for a biomaterial that was used as a source in this event.
     518    The source group value is used to group sources that are related. The only
     519    example and use case is when using multi-array hybridizations
     520    where it is essential to know which array a labeled extract goes on. The source
     521    group is then simply the number of the array on the hybridization and should be
     522    a value between 1 and {@link Hybridization#getNumArrays()}.
     523    <p>
     524    A single labeled extract can only be used in a single group. Experiments using a n-channel
     525    platform and a common reference must first split the reference labeled extract
     526    into individual labeled extracts. This can be done with the 'pooling' functionality.
     527    <p>
     528    If the source biomaterial has not been added with {@link #addSource(MeasuredBioMaterial, Float)}
     529    this method will automatically add it with usedQuantity = null.
     530 
     531    @param bioMaterial The source biomaterial
     532    @param sourceGroup The source group
     533    @throws PermissionDeniedException If the logged in user doesn't have
     534      write permission for this event of use permission for the source
     535    @throws InvalidDataException If this is not a creation event or
     536      if the produced biomaterial is not pooled or if the source
     537      biomaterial is of another type
     538    @since 2.6
     539  */
     540  public void setSourceGroup(MeasuredBioMaterial bioMaterial, int sourceGroup)
     541    throws PermissionDeniedException, InvalidDataException, BaseException
     542  {
     543    checkPermission(Permission.WRITE);
     544    if (bioMaterial == null) throw new InvalidUseOfNullException("bioMaterial");
     545    MeasuredBioMaterialData data = (MeasuredBioMaterialData)bioMaterial.getData();
     546
     547    UsedQuantity used = getData().getSources().get(data);
     548    if (used == null)
     549    {
     550      addSource(bioMaterial, null);
     551      used = getData().getSources().get(data);
     552    }
     553    if (used != null)
     554    {
     555      used.setSourceGroup(sourceGroup);
     556    }
     557  }
     558 
    487559  /**
    488560    Remove a biomaterial used as a source. Sources can only be specified if
     
    572644    {
    573645      MeasuredBioMaterialData data = (MeasuredBioMaterialData)bioMaterial.getData();
    574       getData().getSources().put(data, new UsedQuantity(usedQuantity));
     646      getData().getSources().put(data, new UsedQuantity(usedQuantity, 1));
    575647      if (usedQuantity != null) MeasuredBioMaterial.updateRemainingQuantity(getDbControl(), data, usedQuantity);
    576648    }
     
    597669  /**
    598670    Get a query that return all biomaterials used as sources
    599     for this event.
     671    for this event. To filter or sort on the used quantity or source group columns
     672    use 'srcevt' as alias. For example to only return sources in source group 2
     673    and to order the result by used quantity:
     674    <pre class="code">
     675query = event.getSources();
     676query.restrict(Expressions.gteq(
     677  Hql.property("srcevt", "sourceGroup"), Expressions.integer(2))
     678);
     679query.order(Orders.asc(Hql.property("srcevt", "usedQuantity")));
     680</pre>
     681    <p>
     682    NOTE! The filtering and ordering on the "srcevt" columns is only
     683    available in BASE 2.6 and later.
     684   
    600685    @return An {@link ItemQuery} object
    601686  */
     
    648733    }
    649734   
    650     query.joinPermanent(Hql.innerJoin("sourceEvents", TYPE.getAlias()));
     735    query.joinPermanent(Hql.innerJoin("sourceEvents", "srcevt"));
     736    query.joinPermanent(Hql.innerJoin("srcevt", "event", TYPE.getAlias()));
    651737    query.restrictPermanent(
    652738      Restrictions.eq(
  • trunk/src/core/net/sf/basedb/core/Hybridization.java

    r4020 r4131  
    2626
    2727import net.sf.basedb.core.data.HybridizationData;
     28import net.sf.basedb.core.query.Expressions;
    2829import net.sf.basedb.core.query.Restrictions;
    2930import net.sf.basedb.core.query.Hql;
     
    6364    Hybridization h = dc.newItem(Hybridization.class);
    6465    h.setName("New hybridization");
     66    h.setNumArrays(1);
    6567    return h;
    6668  }
     
    117119  */
    118120  /**
    119     Get the labeled extracts and array slide.
     121    Get the labeled extracts and array slide. Note that this method will
     122    include all labeled extracts, even on multi-array hybridizations.
     123    @see #getAnnotatableParents(int)
    120124  */
    121125  public Set<Annotatable> getAnnotatableParents()
    122126    throws BaseException
    123127  {
    124     Set<Annotatable> annotatable = new HashSet<Annotatable>();
    125     try
    126     {
    127       ItemQuery<? extends MeasuredBioMaterial> sources = getCreationEvent().getSources();
    128       sources.include(Include.MINE, Include.SHARED, Include.OTHERS, Include.IN_PROJECT);
    129       annotatable.addAll(sources.list(getDbControl()));
    130       if (getData().getArraySlide() != null) annotatable.add(getArraySlide());
    131     }
    132     catch (PermissionDeniedException ex)
    133     {}
    134     return annotatable;
     128    return getAnnotatableParents(0);
    135129  }
    136130  /**
     
    202196  // -------------------------------------------
    203197
     198  /**
     199    Get the labeled extracts, possible on a specific array,
     200    and the array slide.
     201    @param arrayNum If > 0 only include the labeled extracts which has been
     202      linked with {@link BioMaterialEvent#setSourceGroup(MeasuredBioMaterial, int)}.
     203      If <= 0 include all labeled extracts.
     204  */
     205  @SuppressWarnings("unchecked")
     206  public Set<Annotatable> getAnnotatableParents(int arrayNum)
     207    throws BaseException
     208  {
     209    Set<Annotatable> annotatable = new HashSet<Annotatable>();
     210    try
     211    {
     212      BioMaterialEvent event = getCreationEvent();
     213      ItemQuery<LabeledExtract> query = (ItemQuery<LabeledExtract>)event.getSources();
     214      query.include(Include.MINE, Include.SHARED, Include.OTHERS, Include.IN_PROJECT);
     215      if (arrayNum > 0)
     216      {
     217        query.restrict(
     218          Restrictions.eq(
     219            Hql.property("srcevt", "sourceGroup"),
     220            Expressions.integer(arrayNum)
     221          )
     222        );
     223      }
     224      annotatable.addAll(query.list(getDbControl()));
     225      if (getData().getArraySlide() != null) annotatable.add(getArraySlide());
     226    }
     227    catch (PermissionDeniedException ex)
     228    {}
     229    return annotatable;
     230  }
     231 
    204232  /**
    205233    Get the event that represents the creation of this hybridization.
     
    259287 
    260288  /**
     289    Get the number of arrays that on the slide.
     290    The default value is 1.
     291    @since 2.6
     292  */
     293  public int getNumArrays()
     294  {
     295    return getData().getNumArrays();
     296  }
     297  /**
     298    Set the number of arrays on a single slide. The value should be
     299    between 1 and the number of arrays specified by the connected array
     300    design. The latter requiremed is not checked.
     301    @param numArrays A value > 0
     302    @throws NumberOutOfRangeException If the value is <=0
     303    @since 2.6
     304  */
     305  public void setNumArrays(int numArrays)
     306  {
     307    checkPermission(Permission.WRITE);
     308    if (numArrays <= 0) throw new NumberOutOfRangeException("numArrays", numArrays, 0, false);
     309    getData().setNumArrays(numArrays);
     310  }
     311 
     312  /**
    261313    Create a new {@link Scan} from this hybridization.
    262314   
  • trunk/src/core/net/sf/basedb/core/Install.java

    r4113 r4131  
    107107    method.
    108108  */
    109   public static final int NEW_SCHEMA_VERSION = Integer.valueOf(51).intValue();
     109  public static final int NEW_SCHEMA_VERSION = Integer.valueOf(52).intValue();
    110110 
    111111  public static synchronized void createTables(boolean update, final ProgressReporter progress)
  • trunk/src/core/net/sf/basedb/core/RawBioAssay.java

    r4128 r4131  
    146146    rba.setPlatform(platform, rawDataType);
    147147    rba.setName("New raw bioassay");
     148    rba.setArrayNum(1);
    148149    return rba;
    149150  }
     
    170171    rba.setVariant(variant, rawDataType);
    171172    rba.setName("New raw bioassay");
     173    rba.setArrayNum(1);
    172174    return rba;
    173175  }
     
    601603    getData().setVariant(variant);
    602604    getData().setRawDataType(rawDataType.getId());
     605  }
     606 
     607  /**
     608    Get the hybridization array number this raw bioassay is linked to.
     609    The default value is 1.
     610    @since 2.6
     611  */
     612  public int getArrayNum()
     613  {
     614    return getData().getArrayNum();
     615  }
     616  /**
     617    Set the hybridization array number this raw bioassay is linked to. The value should be
     618    between 1 and the number of arrays specified by the hybridization,
     619    {@link Hybridization#getNumArrays()}.
     620    @param arrayNum A value > 0
     621    @throws NumberOutOfRangeException If the value is <=0
     622    @since 2.6
     623  */
     624  public void setArrayNum(int arrayNum)
     625  {
     626    checkPermission(Permission.WRITE);
     627    if (arrayNum <= 0) throw new NumberOutOfRangeException("arrayNum", arrayNum, 0, false);
     628    getData().setArrayNum(arrayNum);
    603629  }
    604630 
  • trunk/src/core/net/sf/basedb/core/Update.java

    r4113 r4131  
    593593  </tr>
    594594 
     595  <tr>
     596    <td>52</td>
     597    <td>
     598      <ul>
     599      <li>Added {@link net.sf.basedb.core.data.ArrayDesignData#getNumArrays()}. The update
     600        sets the value to 1 for all existing array designs.
     601      <li>Added {@link net.sf.basedb.core.data.HybridizationData#getNumArrays()}. The update
     602        sets the value to 1 for all existing hybridizations.
     603      </ul>
     604    </td>
     605  </tr>
     606 
    595607  </table>
    596608
     
    842854        if (progress != null) progress.display((int)(50*progress_factor), "--Updating schema version: " + schemaVersion + " -> 51...");
    843855        schemaVersion = updateToSchemaVersion51(session);
     856      }
     857     
     858      if (schemaVersion < 52)
     859      {
     860        if (progress != null) progress.display((int)(51*progress_factor), "--Updating schema version: " + schemaVersion + " -> 52...");
     861        schemaVersion = setSchemaVersionInTransaction(session, 52);
    844862      }
    845863     
     
    25152533        }
    25162534       
     2535        if (schemaVersion < 52)
     2536        {
     2537          // Set numArrays = 1 on all array designs
     2538          org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session,
     2539            "SET_NUMARRAYS_ON_ARRAYDESIGNS");
     2540          /*
     2541            UPDATE ArrayDesignData ad
     2542            SET ad.numArrays = :numArrays
     2543            WHERE ad.numArrays IS NULL
     2544          */
     2545          query.setInteger("numArrays", 1);
     2546          HibernateUtil.executeUpdate(query);
     2547
     2548          // Set numArrays = 1 on all hybridizations
     2549          query = HibernateUtil.getPredefinedQuery(session,
     2550            "SET_NUMARRAYS_ON_HYBRIDIZATIONS");
     2551          /*
     2552            UPDATE HybridizationData hyb
     2553            SET hyb.numArrays = :numArrays
     2554            WHERE hyb.numArrays IS NULL
     2555          */
     2556          query.setInteger("numArrays", 1);
     2557          HibernateUtil.executeUpdate(query);
     2558         
     2559          // Set arrayNum = 1 on all raw bioassays
     2560          query = HibernateUtil.getPredefinedQuery(session,
     2561            "SET_ARRAYNUM_ON_RAWBIOASSAYS");
     2562          /*
     2563            UPDATE RawBioAssayData rba
     2564            SET rba.arrayNum = :arrayNum
     2565            WHERE rba.arrayNum IS NULL
     2566          */
     2567          query.setInteger("arrayNum", 1);
     2568          HibernateUtil.executeUpdate(query);
     2569        }
     2570       
    25172571        //  Commit the changes
    25182572        HibernateUtil.commit(tx);
  • trunk/src/core/net/sf/basedb/core/data/ArrayDesignData.java

    r4083 r4131  
    9292  }
    9393 
     94  private int numArrays;
     95  /**
     96    The number of arrays on a single slide.
     97    @hibernate.property column="`num_arrays`" type="int" not-null="true"
     98    @since 2.6
     99  */
     100  public int getNumArrays()
     101  {
     102    return numArrays;
     103  }
     104  public void setNumArrays(int numArrays)
     105  {
     106    this.numArrays = numArrays;
     107  }
     108 
    94109  private boolean affyChip;
    95110  /**
  • trunk/src/core/net/sf/basedb/core/data/HybridizationData.java

    r3948 r4131  
    7575    this.creationEvent = creationEvent;
    7676  }
     77 
     78  private int numArrays;
     79  /**
     80    The number of arrays that was hybridized. Shold be <= ArrayDesign.numArrays
     81    @hibernate.property column="`num_arrays`" type="int" not-null="true"
     82    @since 2.6
     83  */
     84  public int getNumArrays()
     85  {
     86    return numArrays;
     87  }
     88  public void setNumArrays(int numArrays)
     89  {
     90    this.numArrays = numArrays;
     91  }
    7792
    7893  private Set<ScanData> scans;
  • trunk/src/core/net/sf/basedb/core/data/MeasuredBioMaterialData.java

    r3948 r4131  
    135135  }
    136136 
    137   private Set<BioMaterialEventData> sourceEvents;
     137  private Set<BioMaterialSourceEventData> sourceEvents;
    138138  /**
    139139    This is the inverse end.
     
    141141    @hibernate.set table="`BioMaterialEventSources`" lazy="true" inverse="true"
    142142    @hibernate.collection-key column="`biomaterial_id`"
    143     @hibernate.collection-many-to-many column="`event_id`" class="net.sf.basedb.core.data.BioMaterialEventData"
     143    @hibernate.collection-composite-element class="net.sf.basedb.core.data.BioMaterialSourceEventData"
     144    hibernate.collection-many-to-many column="`event_id`" class="net.sf.basedb.core.data.BioMaterialEventData"
    144145  */
    145   Set<BioMaterialEventData> getSourceEvents()
     146  Set<BioMaterialSourceEventData> getSourceEvents()
    146147  {
    147148    return sourceEvents;
    148149  }
    149   void setSourceEvents(Set<BioMaterialEventData> sourceEvents)
     150  void setSourceEvents(Set<BioMaterialSourceEventData> sourceEvents)
    150151  {
    151152    this.sourceEvents = sourceEvents;
  • trunk/src/core/net/sf/basedb/core/data/RawBioAssayData.java

    r3948 r4131  
    111111  }
    112112 
     113  private int arrayNum;
     114  /**
     115    The array number this raw bioassay is linked to on a multi-array
     116    hybridization.
     117    @hibernate.property column="`array_num`" type="int" not-null="true"
     118    @since 2.6
     119  */
     120  public int getArrayNum()
     121  {
     122    return arrayNum;
     123  }
     124  public void setArrayNum(int arrayNum)
     125  {
     126    this.arrayNum = arrayNum;
     127  }
     128 
    113129  private ScanData scan;
    114130  /**
  • trunk/src/core/net/sf/basedb/core/data/UsedQuantity.java

    r4084 r4131  
    3131  where the element is null, so we have to use a composite element instead. This class
    3232  maps the <code>used_quantity</code> column in the <code>BioMaterialEventSources<code> table.
     33  <p>
     34  NOTE! In 2.6 we changed the 'dummy' property to {@link #getSourceGroup()}
     35  to be able to solve the problem with multi-array hybridizations. The name
     36  of this class is now a bit misleading but we see no real reason to rename
     37  it since it is part of the internal API only.
     38  <p>
     39  NOTE! The inverse relation is mapped in {@link MeasuredBioMaterialData#getSourceEvents()}
     40  and uses the {@link BioMaterialSourceEventData} class to hold the same columns
     41  as this class.
    3342 
    3443  @author Nicklas
     
    6069    @param usedQuantity The used quantity
    6170  */
    62   public UsedQuantity(Float usedQuantity)
     71  public UsedQuantity(Float usedQuantity, int sourceGroup)
    6372  {
    6473    this.usedQuantity = usedQuantity;
     74    this.sourceGroup = sourceGroup;
    6575  }
    6676
     
    7383    return usedQuantity;
    7484  }
    75   void setUsedQuantity(Float usedQuantity)
     85  public void setUsedQuantity(Float usedQuantity)
    7686  {
    7787    this.usedQuantity = usedQuantity;
    7888  }
    7989 
     90  private int sourceGroup;
    8091  /**
    81     Dummy non-null value to force Hibernate to save the link.
     92    This column was previously used as a 'dummy' value for making
     93    sure that links were not deleted when the used quantity was
     94    null. From 2.6 this column is used to group sources together.
     95    This is needed to support multi-array hybridizations where we
     96    need to know the array each labeled extract goes into.
    8297    @hibernate.property column="`dummy`" type="int" not-null="true"
     98    @since 2.6
    8399  */
    84   int getDummy()
     100  public int getSourceGroup()
    85101  {
    86     return 1;
     102    return sourceGroup;
    87103  }
    88   void setDummy(int dummy)
    89   {}
    90 
    91   /**
    92     Check if this object is equal to another <code>UsedQuantity</code>
    93     object. They are considered to be the same if the contains the same
    94     non-null value.
    95   */
    96   public boolean equals(Object o)
     104  public void setSourceGroup(int sourceGroup)
    97105  {
    98     if ((o == null) || (getClass() != o.getClass())) return false;
    99     UsedQuantity uq = (UsedQuantity)o;
    100     return this.usedQuantity == null ? false : this.usedQuantity.equals(uq.usedQuantity);
     106    this.sourceGroup = sourceGroup;
    101107  }
    102108
    103   /**
    104     Calculate the hash code for the object.
    105   */
    106   public int hashCode()
    107   {
    108     return usedQuantity == null ? 0 : usedQuantity.hashCode();
    109   }
    110109  /**
    111110    Convert the value to a string.
  • trunk/www/common/annotations/inherit.jsp

    r3679 r4131  
    4040  import="net.sf.basedb.core.AnnotationSet"
    4141  import="net.sf.basedb.core.Annotation"
     42  import="net.sf.basedb.core.RawBioAssay"
     43  import="net.sf.basedb.core.Hybridization"
    4244  import="net.sf.basedb.core.ItemQuery"
    4345  import="net.sf.basedb.core.Include"
     
    6365<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
    6466<%!
    65 private void loadParents(Set<AnnotationSet> parentAnnotations, Set<Annotatable> parentItems, Annotatable item)
     67private void loadParents(Set<AnnotationSet> parentAnnotations, Set<Annotatable> parentItems, Annotatable current, Annotatable root)
    6668{
    67   Set<Annotatable> parents = item.getAnnotatableParents();
     69  Set<Annotatable> parents = null;
     70  if (root instanceof RawBioAssay && current instanceof Hybridization)
     71  {
     72    Hybridization hyb = (Hybridization)current;
     73    RawBioAssay rba = (RawBioAssay)root;
     74    parents = hyb.getAnnotatableParents(rba.getArrayNum());
     75  }
     76  else
     77  {
     78    parents = current.getAnnotatableParents();
     79  }
    6880  if (parents == null) return;
    6981  for (Annotatable parent : parents)
     
    7587        parentAnnotations.add(parent.getAnnotationSet());
    7688      }
    77       loadParents(parentAnnotations, parentItems, parent);
     89      loadParents(parentAnnotations, parentItems, parent, root);
    7890    }
    7991  }
     
    174186  {
    175187    // Get all annotated parents and their annotation sets
    176     loadParents(parentAnnotations, parentItems, item);
     188    loadParents(parentAnnotations, parentItems, item, item);
    177189  }
    178190  if (standalone)
     
    206218              parentAnnotations.add(parentItem.getAnnotationSet());
    207219            }
    208             loadParents(parentAnnotations, parentItems, parentItem);
     220            loadParents(parentAnnotations, parentItems, parentItem, item);
    209221          }
    210222        }
     
    245257  }
    246258  %>
    247   <base:page type="popup" title="Inherit annotations">
     259<base:page type="popup" title="Inherit annotations">
    248260  <base:head  scripts="annotations.js,parameters.js,newjoust.js,linkitems.js" styles="parameters.css,newjoust.css">
    249261  <script language="JavaScript">
  • trunk/www/lims/arraydesigns/edit_design.jsp

    r4029 r4131  
    156156        return false;
    157157      }
     158      else if (!Numbers.isInteger(frm.numArrays.value))
     159      {
     160        alert("'" + frm.numArrays.value + "' is not a valid number");
     161        frm.numArrays.focus();
     162        return false;
     163      }
     164      else if (parseInt(frm.numArrays.value) <= 0)
     165      {
     166        alert("Number of arrays must be > 0");
     167        frm.numArrays.focus();
     168        return false;
     169      }
    158170      return true;
    159171    }
     
    301313        </td>
    302314      </tr>
     315      <tr>
     316        <td class="prompt">Arrays / slide</td>
     317        <td><input <%=requiredClazz%> type="text" name="numArrays"
     318          value="<%=design == null ? Values.getString(cc.getPropertyValue("numArrays"), "1") : design.getNumArrays()%>"
     319          size="12" maxlength="10" onkeypress="return Numbers.integerOnly(event)"></td>
     320      </tr>
    303321      <tr valign=top>
    304322        <td class="prompt">Description</td>
  • trunk/www/lims/arraydesigns/index.jsp

    r3909 r4131  
    176176    design.setName(Values.getStringOrNull(request.getParameter("name")));
    177177    design.setDescription(Values.getStringOrNull(request.getParameter("description")));
     178    design.setNumArrays(Values.getInt(request.getParameter("numArrays"), 1));
    178179
    179180    // Data files tab
  • trunk/www/lims/arraydesigns/list_designs.jsp

    r4093 r4131  
    327327        enumeration="<%=fiMethods%>"
    328328      /> 
     329      <tbl:columndef
     330        id="numArrays"
     331        property="numArrays"
     332        datatype="int"
     333        title="Arrays/slide"
     334        sortable="true"
     335        filterable="true"
     336        exportable="true"
     337      />
    329338      <tbl:columndef
    330339        id="batches"
     
    569578                <tbl:cell column="numFileFeatures"><%=item.getNumFileFeatures()%></tbl:cell>
    570579                <tbl:cell column="featureIdentificationMethod"><%=item.getFeatureIdentificationMethod()%></tbl:cell>
     580                <tbl:cell column="numArrays"><%=item.getNumArrays()%></tbl:cell>
    571581                <tbl:cell column="batches">
    572582                  <%
  • trunk/www/lims/arraydesigns/view_design.jsp

    r4093 r4131  
    299299        <td class="prompt">Variant</td>
    300300        <td><base:propertyvalue item="<%=design%>" property="variant" /></td>
     301      </tr>
     302      <tr>
     303        <td class="prompt">Arrays per slide</td>
     304        <td><%=design.getNumArrays()%></td>
    301305      </tr>
    302306      <tr>
  • trunk/www/views/hybridizations/edit_hybridization.jsp

    r3888 r4131  
    197197        return false;
    198198      }
     199      else if (!Numbers.isInteger(frm.numArrays.value))
     200      {
     201        alert("'" + frm.numArrays.value + "' is not a valid number");
     202        frm.numArrays.focus();
     203        return false;
     204      }
     205      else if (parseInt(frm.numArrays.value) <= 0)
     206      {
     207        alert("Number of arrays must be > 0");
     208        frm.numArrays.focus();
     209        return false;
     210      }
    199211      return true;
    200212    }
     
    369381    {
    370382      var item = Link.getItem('L', labeledExtractId);
    371       if (!item) item = new Item('L', labeledExtractId, name+' [-]', '', '');
     383      if (!item) item = new Item('L', labeledExtractId, '1: '+name+' [-]', '', '');
    372384      Link.addItem(document.forms['hybridization'].labeled_extracts, item);
    373385      parentsChanged = true;
     386      labeledExtractsOnChange();
    374387    }
    375388    function labeledExtractsOnChange()
     
    379392      if (item && item.id)
    380393      {
    381         frm.used_quantity.value = item.value;
     394        var i = item.value.indexOf(':');
     395        frm.used_quantity.value = i > 0 ? item.value.substring(0, i) : item.value;
     396        frm.array_index.value = i > 0 ? item.value.substring(i+1) : '1';
    382397        frm.used_quantity.focus();
    383398      }
     
    385400      {
    386401        frm.used_quantity.value = '';
     402        frm.array_index.value = '1';
    387403      }
    388404    }
     
    391407      var frm = document.forms['hybridization'];
    392408      var usedQuantity = frm.used_quantity.value;
     409      var arrayIndex = frm.array_index.value;
     410      var numArrays = parseInt(frm.numArrays.value);
     411      if (arrayIndex != '' && (arrayIndex > numArrays || arrayIndex <= 0))
     412      {
     413        alert('Array index must be between 1 and ' + numArrays);
     414        return;
     415      }
     416      if (arrayIndex == '') arrayIndex = 1;
    393417      var displayQuantity = usedQuantity == '' ? '-' : usedQuantity+' µg';
    394418      for (var i = 0; i < frm.labeled_extracts.length; i++) // >
     
    397421        if (option.selected && option.item.id)
    398422        {
    399           option.item.value = usedQuantity;
     423          option.item.value = usedQuantity + ':' + arrayIndex;
    400424          var text = option.text.replace(/\[.*\]/, '['+displayQuantity+']');
     425          text = text.replace(/\d*\:/, arrayIndex + ':');
    401426          option.text = text;
    402427        }
    403428      }
     429    }
     430    function arrayIndexOnBlur()
     431    {
     432      usedQuantityOnBlur();
    404433    }
    405434
     
    429458            LabeledExtract e = LabeledExtract.getById(dc, id);
    430459            %>
    431             Link.addItem(labeledExtracts, new Item('L', <%=e.getId()%>, '<%=HTML.javaScriptEncode(e.getName())%> [-]', '', ''));
     460            Link.addItem(labeledExtracts, new Item('L', <%=e.getId()%>, '1: <%=HTML.javaScriptEncode(e.getName())%> [-]', '', ''));
    432461            <%
    433462          }
     
    440469        {
    441470          String usedQuantity = Values.formatNumber(creationEvent.getUsedQuantity(le), -1);
     471          int arrayIndex = creationEvent.getSourceGroup(le);
    442472          %>
    443           Link.addNewItem(labeledExtracts, new Item('L', <%=le.getId()%>, '<%=HTML.javaScriptEncode(le.getName())%> [<%=usedQuantity%> µg]', '<%=usedQuantity%>'));
     473          Link.addNewItem(labeledExtracts, new Item('L', <%=le.getId()%>, '<%=arrayIndex + ": " + HTML.javaScriptEncode(le.getName())%> [<%=usedQuantity%> µg]', '<%=usedQuantity%>:<%=arrayIndex%>'));
    444474          <%
    445475        }
     
    464494          value="<%=name%>"
    465495          size="40" maxlength="<%=Hybridization.MAX_NAME_LENGTH%>"></td>
     496      </tr>
     497      <tr>
     498        <td class="prompt">Arrays</td>
     499        <td><input <%=requiredClazz%> type="text" name="numArrays"
     500          value="<%=hyb == null ? Values.getString(cc.getPropertyValue("numArrays"), "1") : hyb.getNumArrays()%>"
     501          size="12" maxlength="10" onkeypress="return Numbers.integerOnly(event)"></td>
    466502      </tr>
    467503      <tr>
     
    553589   
    554590    <t:tab id="labeledExtracts" title="Labeled extracts" helpid="hybridization.labeledextracts">
     591      <input type="hidden" name="modifiedLabeledExtracts" value="">
     592      <input type="hidden" name="removedLabeledExtracts" value="">
    555593   
    556594      <table class="form" cellspacing=0>
     
    564602              onchange="labeledExtractsOnChange()">
    565603            </select>&nbsp;<br>
    566             Used
    567             <input <%=clazz%> type="text" name="used_quantity" value=""
    568               size="12" maxlength="10" onkeypress="return Numbers.numberOnly(event)"
    569               onkeyup="usedQuantityOnBlur()"
    570             > (µg)
    571             <input type="hidden" name="modifiedLabeledExtracts" value="">
    572             <input type="hidden" name="removedLabeledExtracts" value="">
    573          
    574604          </td>
    575605          <td>
     
    591621        </td>
    592622      </tr>
     623     
     624      <tr>
     625        <td style="text-align: right; padding-right: 5px;">- used quantity</td>
     626        <td>
     627            <input <%=clazz%> type="text" name="used_quantity" value=""
     628              size="12" maxlength="10" onkeypress="return Numbers.numberOnly(event)"
     629              onkeyup="usedQuantityOnBlur()"
     630            > (µg)
     631        </td>
     632      </tr>
     633
     634      <tr>
     635        <td style="text-align: right; padding-right: 5px;">- array index</td>
     636        <td>
     637            <input <%=clazz%> type="text" name="array_index" value=""
     638              size="12" maxlength="10" onkeypress="return Numbers.numberOnly(event)"
     639              onkeyup="arrayIndexOnBlur()"
     640            >
     641        </td>
     642      </tr>
     643
    593644      </table>
    594645    </t:tab>
  • trunk/www/views/hybridizations/index.jsp

    r3679 r4131  
    155155    hyb.setName(Values.getStringOrNull(request.getParameter("name")));
    156156    hyb.setDescription(Values.getStringOrNull(request.getParameter("description")));
     157    hyb.setNumArrays(Values.getInt(request.getParameter("numArrays"), 1));
     158   
    157159    int arraySlideId = Values.getInt(request.getParameter("arrayslide_id"), -1);
    158160    if (arraySlideId >= 0) // < 0 = denied or unchanged
     
    188190      {
    189191        LabeledExtract le = LabeledExtract.getById(dc, leId);
    190         creationEvent.addSource(le, Values.getFloat(request.getParameter("L"+leId), null));
     192        String[] extra = request.getParameter("L"+leId).split(":");
     193        Float usedQuantity = Values.getFloat(extra[0], null);
     194        int arrayIndex = Values.getInt(extra[1], 1);
     195        creationEvent.addSource(le, usedQuantity);
     196        creationEvent.setSourceGroup(le, arrayIndex);
    191197      }
    192198    }
  • trunk/www/views/hybridizations/list_hybridizations.jsp

    r4003 r4131  
    253253        exportable="true"
    254254        show="always"
     255      />
     256      <tbl:columndef
     257        id="numArrays"
     258        property="numArrays"
     259        datatype="int"
     260        title="Arrays/slide"
     261        sortable="true"
     262        filterable="true"
     263        exportable="true"
    255264      />
    256265      <tbl:columndef
     
    533542                  onclick="itemOnClick(<%=writePermission ? "event" : null%>, <%=itemId%>)"
    534543                  title="<%=tooltip%>"><%=name%></div></tbl:cell>
     544                <tbl:cell column="numArrays"><%=item.getNumArrays()%></tbl:cell>
    535545                <tbl:cell column="labeledExtracts">
    536546                  <%
     
    539549                  {
    540550                    String separator = "";
     551                    boolean isMultiArrayHyb = item.getNumArrays() > 1;
    541552                    for (LabeledExtract le : labeledExtractQuery.list(dc))
    542553                    {
     
    552563                      }
    553564                      out.write(separator);
     565                      if (isMultiArrayHyb)
     566                      {
     567                        out.write(creationEvent.getSourceGroup(le) + ": ");
     568                      }
    554569                      if (mode.hasPropertyLink())
    555570                      {
  • trunk/www/views/hybridizations/view_hybridization.jsp

    r4003 r4131  
    266266      </tr>
    267267      <tr>
     268        <td class="prompt">Arrays</td>
     269        <td><%=hyb.getNumArrays()%></td>
     270      </tr>
     271      <tr>
    268272        <td class="prompt">Array slide</td>
    269273        <td><base:propertyvalue item="<%=hyb%>" property="arraySlide" /></td>
     
    317321          columns="all"
    318322          >
     323        <tbl:columndef
     324          id="arrayNum"
     325          title="Array"
     326          show="<%=hyb.getNumArrays() > 1 ? "always" : "never"%>"
     327        />
    319328        <tbl:columndef
    320329          id="name"
     
    342351            %>
    343352            <tbl:row>
     353              <tbl:cell column="arrayNum"><%=creationEvent.getSourceGroup(item)%></tbl:cell>
    344354              <tbl:cell column="name"><base:icon
    345355                  image="deleted.gif"
  • trunk/www/views/rawbioassays/edit_rawbioassay.jsp

    r4093 r4131  
    303303        return false;
    304304      }
     305      else if (!Numbers.isInteger(frm.arrayNum.value))
     306      {
     307        alert("'" + frm.arrayNum.value + "' is not a valid number");
     308        frm.arrayNum.focus();
     309        return false;
     310      }
     311      else if (parseInt(frm.arrayNum.value) <= 0)
     312      {
     313        alert("Array index must be > 0");
     314        frm.arrayNum.focus();
     315        return false;
     316      }
    305317      return true;
    306318    }
     
    617629          value="<%=HTML.encodeTags(name)%>"
    618630          size="40" maxlength="<%=RawBioAssay.MAX_NAME_LENGTH%>"></td>
     631      </tr>
     632      <tr>
     633        <td class="prompt">Array index</td>
     634        <td><input <%=requiredClazz%> type="text" name="arrayNum"
     635          value="<%=rawBioAssay == null ? Values.getString(cc.getPropertyValue("arrayNum"), "1") : rawBioAssay.getArrayNum()%>"
     636          size="12" maxlength="10" onkeypress="return Numbers.integerOnly(event)"></td>
    619637      </tr>
    620638      <tr>
  • trunk/www/views/rawbioassays/index.jsp

    r4093 r4131  
    265265    rba.setName(Values.getStringOrNull(request.getParameter("name")));
    266266    rba.setDescription(Values.getStringOrNull(request.getParameter("description")));
     267    rba.setArrayNum(Values.getInt(request.getParameter("arrayNum"), 1));
    267268    int protocolId = Values.getInt(request.getParameter("protocol_id"), -1);
    268269    if (protocolId >= 0)  // < 0 = denied or unchanged
  • trunk/www/views/rawbioassays/list_rawbioassays.jsp

    r4003 r4131  
    307307      />
    308308      <tbl:columndef
     309        id="arrayNum"
     310        property="arrayNum"
     311        datatype="int"
     312        title="Array index"
     313        sortable="true"
     314        filterable="true"
     315        exportable="true"
     316      />
     317      <tbl:columndef
    309318        id="hasData"
    310319        property="hasData"
     
    623632                    enableEditLink="<%=mode.hasEditLink()%>"
    624633                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
    625                   /></tbl:cell>               <tbl:cell column="rawDataType"><%=HTML.encodeTags(rdt.getName())%></tbl:cell>
     634                  /></tbl:cell>               
     635                <tbl:cell column="rawDataType"><%=HTML.encodeTags(rdt.getName())%></tbl:cell>
     636                <tbl:cell column="arrayNum"><%=item.getArrayNum()%></tbl:cell>
    626637                <tbl:cell column="hasData"><%=item.hasData()%></tbl:cell>
    627638                <tbl:cell column="scan"
  • trunk/www/views/rawbioassays/view_rawbioassay.jsp

    r4003 r4131  
    297297        <td class="prompt">Raw data type</td>
    298298        <td><%=HTML.encodeTags(rawDataType.getName())%></td>
     299      </tr>
     300      <tr>
     301        <td class="prompt">Array index</td>
     302        <td><%=rawBioAssay.getArrayNum()%></td>
    299303      </tr>
    300304      <tr>
  • trunk/www/views/scans/view_scan.jsp

    r4003 r4131  
    325325          title="Type"
    326326        />
     327        <tbl:columndef
     328          id="arrayNum"
     329          title="Array index"
     330        />
    327331        <tbl:columndef
    328332          id="software"
     
    356360                /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell>
    357361              <tbl:cell column="type"><%=HTML.encodeTags(item.getRawDataType().getName())%></tbl:cell>
     362              <tbl:cell column="arrayNum"><%=item.getArrayNum()%></tbl:cell>
    358363              <tbl:cell column="software"><base:propertyvalue item="<%=item%>" property="software" /></tbl:cell>
    359364              <tbl:cell column="data"><%=item.hasData() ? "yes (" + item.getSpots() + " spots)" : "no"%></tbl:cell>
Note: See TracChangeset for help on using the changeset viewer.