Changeset 4844
- Timestamp:
- Mar 25, 2009, 1:23:49 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/src/docbook/appendix/incompatible.xml
r4696 r4844 43 43 </para> 44 44 </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> 45 90 46 91 <sect1 id="appendix.incompatible.2.10"> -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/ExtractImporter.java
r4736 r4844 42 42 import net.sf.basedb.core.plugin.AboutImpl; 43 43 import net.sf.basedb.core.plugin.GuiContext; 44 import net.sf.basedb.util.Coordinate; 44 45 import net.sf.basedb.util.Values; 45 46 import net.sf.basedb.util.parser.FlatFileParser; … … 223 224 if (plate != null) 224 225 { 225 Integer row = bioWellRowMapper.getInt(data);226 Integer column = bioWellColMapper.getInt(data);226 String row = bioWellRowMapper.getValue(data); 227 String column = bioWellColMapper.getValue(data); 227 228 if (column != null && row != null) 228 229 { 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); 230 234 } 231 235 } -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/LabeledExtractImporter.java
r4736 r4844 43 43 import net.sf.basedb.core.plugin.AboutImpl; 44 44 import net.sf.basedb.core.plugin.GuiContext; 45 import net.sf.basedb.util.Coordinate; 45 46 import net.sf.basedb.util.Values; 46 47 import net.sf.basedb.util.parser.FlatFileParser; … … 261 262 if (plate != null) 262 263 { 263 Integer row = bioWellRowMapper.getInt(data);264 Integer column = bioWellColMapper.getInt(data);264 String row = bioWellRowMapper.getValue(data); 265 String column = bioWellColMapper.getValue(data); 265 266 if (column != null && row != null) 266 267 { 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); 268 272 } 269 273 } -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/SampleImporter.java
r4736 r4844 42 42 import net.sf.basedb.core.plugin.AboutImpl; 43 43 import net.sf.basedb.core.plugin.GuiContext; 44 import net.sf.basedb.util.Coordinate; 44 45 import net.sf.basedb.util.Values; 45 46 import net.sf.basedb.util.parser.FlatFileParser; … … 145 146 "bioWellRowColumnMapping", 146 147 "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. "+ 148 154 "Example: \\Biowell row\\", 149 155 optionalColumnMapping … … 157 163 "bioWellColColumnMapping", 158 164 "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. "+ 160 170 "Example: \\Biowell column\\", 161 171 optionalColumnMapping … … 319 329 if (plate != null) 320 330 { 321 Integer row = bioWellRowMapper.getInt(data);322 Integer column = bioWellColMapper.getInt(data);331 String row = bioWellRowMapper.getValue(data); 332 String column = bioWellColMapper.getValue(data); 323 333 if (column != null && row != null) 324 334 { 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); 326 339 } 327 340 }
Note: See TracChangeset
for help on using the changeset viewer.