Changeset 4844


Ignore:
Timestamp:
Mar 25, 2009, 1:23:49 PM (13 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1269: Biomaterial batch importers should use alphanumeric coordinate system for wells

Location:
trunk
Files:
4 edited

Legend:

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

    r4696 r4844  
    4343    </para>
    4444  </note>
     45 
     46  <sect1 id="appendix.incompatible.2.11">
     47    <title>BASE 2.11 release</title>
     48   
     49    <bridgehead>
     50      Biomaterial batch importers uses a different coordinate system
     51      to target biowells
     52    </bridgehead>
     53    <para>
     54      The batch importers previously used the same coordinate system
     55      for locating biowells on a plate that BASE uses internally. A
     56      0-based numerical coordinate pair. This has now been changed to use
     57      the more logical alphanumeric 1-based coordinate system typically found on plates.
     58      As an example files should now specify A1, B2, C3 instead of [0,0],
     59      [1,1] or [2,2]. Files that use the "old" coordinate system must
     60      be updated to the new coordinate system, or the imported data will
     61      end up in incorrect wells or in no well at all. The change affects three
     62      batch importers:
     63    </para>
     64    <itemizedlist>
     65      <listitem>
     66      <para><classname docapi="net.sf.basedb.plugins.batchimport">SampleImporter</classname></para>
     67      </listitem>
     68      <listitem>
     69      <para><classname docapi="net.sf.basedb.plugins.batchimport">ExtractImporter</classname></para>
     70      </listitem>
     71      <listitem>
     72      <para><classname docapi="net.sf.basedb.plugins.batchimport">LabeledExtractImporter</classname></para>
     73      </listitem>
     74    </itemizedlist>
     75   
     76    <note>
     77      It is still possible to use purely numerical coordinates, but they must
     78      be 1-based and not 0-based as before!
     79    </note>
     80   
     81    <warning>
     82      The new coordinate system only affects the batch importers. The BASE
     83      web client will still display the internal 0-based coordinate values.
     84      BASE users should be aware of this, particularly if they use the table
     85      exporter to generate template files intended for import at a later
     86      time. In this case the coordinates in the template file needs to be
     87      edited before importing.
     88    </warning>
     89  </sect1>
    4590 
    4691  <sect1 id="appendix.incompatible.2.10">
  • trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/ExtractImporter.java

    r4736 r4844  
    4242import net.sf.basedb.core.plugin.AboutImpl;
    4343import net.sf.basedb.core.plugin.GuiContext;
     44import net.sf.basedb.util.Coordinate;
    4445import net.sf.basedb.util.Values;
    4546import net.sf.basedb.util.parser.FlatFileParser;
     
    223224      if (plate != null)
    224225      {
    225         Integer row = bioWellRowMapper.getInt(data);
    226         Integer column = bioWellColMapper.getInt(data);       
     226        String row = bioWellRowMapper.getValue(data);
     227        String column = bioWellColMapper.getValue(data);       
    227228        if (column != null && row != null)
    228229        {
    229           well = plate.getBioWell(row, column);;
     230          // Convert alphanumeric (1-based) to 0-based numerical coordinate
     231          int r = Coordinate.alphaToNumeric(row) - 1;
     232          int c = Coordinate.alphaToNumeric(column) - 1;
     233          well = plate.getBioWell(r, c);
    230234        }
    231235      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/LabeledExtractImporter.java

    r4736 r4844  
    4343import net.sf.basedb.core.plugin.AboutImpl;
    4444import net.sf.basedb.core.plugin.GuiContext;
     45import net.sf.basedb.util.Coordinate;
    4546import net.sf.basedb.util.Values;
    4647import net.sf.basedb.util.parser.FlatFileParser;
     
    261262      if (plate != null)
    262263      {
    263         Integer row = bioWellRowMapper.getInt(data);
    264         Integer column = bioWellColMapper.getInt(data);       
     264        String row = bioWellRowMapper.getValue(data);
     265        String column = bioWellColMapper.getValue(data);       
    265266        if (column != null && row != null)
    266267        {
    267           well = plate.getBioWell(row, column);;
     268          // Convert alphanumeric (1-based) to 0-based numerical coordinate
     269          int r = Coordinate.alphaToNumeric(row) - 1;
     270          int c = Coordinate.alphaToNumeric(column) - 1;
     271          well = plate.getBioWell(r, c);
    268272        }
    269273      }
  • trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/SampleImporter.java

    r4736 r4844  
    4242import net.sf.basedb.core.plugin.AboutImpl;
    4343import net.sf.basedb.core.plugin.GuiContext;
     44import net.sf.basedb.util.Coordinate;
    4445import net.sf.basedb.util.Values;
    4546import net.sf.basedb.util.parser.FlatFileParser;
     
    145146        "bioWellRowColumnMapping",
    146147        "Biowell row",
    147         "Mapping that picks the row of the biowell in the data columns. "+
     148        "Mapping that picks the row of the biowell in the data columns. " +
     149        "The row coordinate is usually given as alphabetical letters, " +
     150        "A, B, C, etc, but it can also be given as a numerical value " +
     151        "where A=1, B=2 and so on. Note that BASE internally uses a " +
     152        "0-based coordinate system. The coordinate values given in the " +
     153        "file are converted to this system before data is saved. "+
    148154        "Example: \\Biowell row\\",
    149155        optionalColumnMapping
     
    157163        "bioWellColColumnMapping",
    158164        "Biowell column",
    159         "Mapping that picks the column of the biowell in the data columns. "+
     165        "Mapping that picks the column of the biowell in the data columns. " +
     166        "The column coordinate is usually given as a number, but alphabetical " +
     167        "letters are also supported, A=1, B=2 and so on. Note that BASE internally uses a " +
     168        "0-based coordinate system. The coordinate values given in the " +
     169        "file are converted to this system before data is saved. "+
    160170        "Example: \\Biowell column\\",
    161171        optionalColumnMapping
     
    319329      if (plate != null)
    320330      {
    321         Integer row = bioWellRowMapper.getInt(data);
    322         Integer column = bioWellColMapper.getInt(data);       
     331        String row = bioWellRowMapper.getValue(data);
     332        String column = bioWellColMapper.getValue(data);       
    323333        if (column != null && row != null)
    324334        {
    325           well = plate.getBioWell(row, column);;
     335          // Convert alphanumeric (1-based) to 0-based numerical coordinate
     336          int r = Coordinate.alphaToNumeric(row) - 1;
     337          int c = Coordinate.alphaToNumeric(column) - 1;
     338          well = plate.getBioWell(r, c);
    326339        }
    327340      }
Note: See TracChangeset for help on using the changeset viewer.