Changeset 4080
- Timestamp:
- Jan 15, 2008, 2:58:53 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/src/docbook/appendix/incompatible.xml
r3944 r4080 45 45 </para> 46 46 </note> 47 48 <sect1 id="appendix.incompatible.2.6"> 49 <title>BASE 2.6 release</title> 50 51 <bridgehead>Feature identification methods</bridgehead> 52 <para> 53 Array design features can now be identified by three different methods: 54 COORDINATES, POSITION and EXTERNAL_ID. The coordinates method was the 55 only one supported earlier. 56 </para> 57 58 <itemizedlist> 59 <listitem> 60 <para> 61 Client and plug-in code that depends on features having unique COORDINATES 62 may no longer work if used with an array design using a different identification method. 63 Code that is, directly or indirectly, using a 64 <classname docapi="net.sf.basedb.core">FeatureBatcher</classname> or 65 <classname docapi="net.sf.basedb.core">RawDataBatcher</classname> are 66 probably affected by this. For example, includes raw data importers which 67 doesn't know how to set the position or the feature ID when those identification 68 methods are used. 69 </para> 70 </listitem> 71 72 <listitem> 73 <para> 74 The POSITION identification method will require a unqiue position number. 75 This value used to be an auto-generated sequence starting at 1. The other 76 identification methods will still do that, but when using the POSITION identification 77 method the only requirement is that the position value is a unique positive integer. 78 Client or plug-in code that depends on the position beeing a number between 79 1 and the number of features may fail if used with an array design using 80 the POSITION identification method. 81 </para> 82 </listitem> 83 </itemizedlist> 84 85 </sect1> 47 86 48 87 <sect1 id="appendix.incompatible.2.5"> -
trunk/doc/src/docbook/developerdoc/api_overview.xml
r4078 r4080 1958 1958 from plates. In the first case the features on an array design 1959 1959 are described by a reporter map. A reporter map is a file 1960 that maps a coordinate on an array design to a reporter. 1960 that maps a coordinate (block, meta-grid, row, column), 1961 position or an external ID on an array design to a 1962 reporter. Which method to use is given by the 1963 <property>ArrayDesign.featureIdentificationMethod</property> property. 1961 1964 The coordinate system on an array design is divided into blocks. 1962 1965 Each block can be identified either by a <property>blockNumber</property> … … 1965 1968 contains several <classname docapi="net.sf.basedb.core.data">FeatureData</classname> items, each 1966 1969 one identified by a row and column coordinate. Platforms that doesn't 1967 divide the array design into block should create a single super-block1968 that holds all features.1970 divide the array design into blocks or doesn't use the coordinate system at all 1971 must still create a single super-block that holds all features. 1969 1972 </para> 1970 1973 -
trunk/src/clients/migrate/net/sf/basedb/clients/migrate/ArrayBlockTransfer.java
r3683 r4080 33 33 import net.sf.basedb.core.DbControl; 34 34 import net.sf.basedb.core.FeatureBatcher; 35 import net.sf.basedb.core.FeatureIdentificationMethod; 35 36 import net.sf.basedb.core.ItemNotFoundException; 36 37 import net.sf.basedb.core.Plate; … … 113 114 ArrayDesign arrayDesign = ArrayDesign.getById(dc, base2Id); 114 115 PreparedStatement ps = prepareStatementFromFile("selectArrayBlocksByArrayType"); 115 FeatureBatcher featureBatcher = arrayDesign.getFeatureBatcher( );116 FeatureBatcher featureBatcher = arrayDesign.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES); 116 117 log.debug("Setting batch size to: " + getBatchSize()); 117 118 featureBatcher.setBatchSize(getBatchSize()); -
trunk/src/core/common-queries.xml
r4006 r4080 3014 3014 </description> 3015 3015 </query> 3016 3017 <query id="SET_FEATUREIDENTIFICATIONMETHOD_ON_ARRAYDESIGNS" type="HQL"> 3018 <sql> 3019 UPDATE ArrayDesignData ad 3020 SET ad.featureIdentificationMethod = :method 3021 WHERE ad.featureIdentificationMethod IS NULL 3022 </sql> 3023 <description> 3024 A HQL query that set the featureIdentificationMethod property 3025 on all array designs with a null value. 3026 </description> 3027 </query> 3016 3028 3017 3029 </predefined-queries> -
trunk/src/core/net/sf/basedb/core/ArrayDesign.java
r4011 r4080 107 107 ad.setName("New array design"); 108 108 ad.setPlatform(platform); 109 ad.getData().setFeatureIdentificationMethod(FeatureIdentificationMethod.NONE.getValue()); 109 110 return ad; 110 111 } … … 126 127 ad.setName("New array design"); 127 128 ad.setVariant(variant); 129 ad.getData().setFeatureIdentificationMethod(FeatureIdentificationMethod.NONE.getValue()); 128 130 return ad; 129 131 } … … 422 424 423 425 /** 426 Get the method used to identify features on this array design. 427 @return A <code>FeatureIdentificationMethod</code> 428 @since 2.6 429 */ 430 public FeatureIdentificationMethod getFeatureIdentificationMethod() 431 { 432 return FeatureIdentificationMethod.fromValue(getData().getFeatureIdentificationMethod()); 433 } 434 435 /** 424 436 Get a query that returns the plates that are used by this arraydesign. 425 437 @return An {@link ItemQuery} object … … 638 650 639 651 /** 652 Get a feature batcher that uses the COORDINATES feature identification 653 method. 654 @deprecated Use {@link #getFeatureBatcher(FeatureIdentificationMethod)} instead 655 */ 656 public FeatureBatcher getFeatureBatcher() 657 throws PermissionDeniedException, BaseException 658 { 659 return getFeatureBatcher(FeatureIdentificationMethod.COORDINATES); 660 } 661 662 /** 640 663 Get a feature batcher which can be used to add regular features to the 641 664 array design. … … 644 667 file-only platform. The must store feature information in files 645 668 instead. See {@link Platform} and {@link DataFileType}. 669 @param fiMethod The method to use for identifying features 646 670 @return The feature batcher of the array design. 647 671 @throws PermissionDeniedException If raw data has already been added 648 672 or the logged in user doesn't have write permission 649 673 @throws BaseException If there is another error 650 */ 651 public FeatureBatcher getFeatureBatcher() 674 @since 2.6 675 */ 676 public FeatureBatcher getFeatureBatcher(FeatureIdentificationMethod fiMethod) 652 677 throws PermissionDeniedException, BaseException 653 678 { … … 661 686 throw new PermissionDeniedException("Features has already been added to "+this.getName()); 662 687 } 688 if (fiMethod == FeatureIdentificationMethod.NONE) 689 { 690 throw new InvalidDataException("Feature identification method NONE is not supported: " + this.getName()); 691 } 692 getData().setFeatureIdentificationMethod(fiMethod.getValue()); 663 693 if (featureBatcher == null) 664 694 { -
trunk/src/core/net/sf/basedb/core/FeatureBatcher.java
r4034 r4080 34 34 import java.sql.PreparedStatement; 35 35 import java.sql.SQLException; 36 import java.util.HashSet; 37 import java.util.Set; 38 import java.util.TreeSet; 36 39 37 40 /** 38 41 Batcher class for Features or AffyFeatures. A single instance can be used 39 42 for features belonging to a single {@link ArrayDesign}. 43 <p> 44 Create new {@link FeatureData} objects with either 45 {@link #newFeature(ArrayDesignBlock, ReporterData)} or 46 {@link #newFeature(ArrayDesignBlock, Well)}. Use the latter method if the array 47 desing is connected to plates. 48 <p> 49 Depending on the {@link FeatureIdentificationMethod} used by the array design, 50 you must set different properties on the <code>FeatureData</code> object. 51 52 <ul> 53 <li>NONE: Not supported 54 <li>COORDINATES: {@link FeatureData#setRow(int)} and {@link FeatureData#setColumn(int)} 55 <li>POSITION: {@link FeatureData#setPosition(int)} 56 <li>EXTERNAL_ID: {@link FeatureData#setExternalId(String)} 57 </ul> 58 59 For all methods, each feature that is inserted must have a unqiue value. For example, 60 there can't be two features with the same external ID if the EXTERNAL_ID method is 61 used. Values for the methods that are not used can still be set and saved to the 62 database, but the uniqueness is not checked. The position number will be auto-generated 63 (and overwritten) if the identification method is not POSITION. 40 64 41 65 @base.modified $Date$ … … 76 100 private final ArrayDesignData arrayDesignData; 77 101 102 private final FeatureIdentificationMethod fiMethod; 103 104 /** 105 Holds identification of already inserted features. 106 */ 107 private Set<Object> featureIds; 108 78 109 /** 79 110 Keeps track of the position number. … … 81 112 private int currentPosition = 0; 82 113 114 @SuppressWarnings("unchecked") 83 115 FeatureBatcher(DbControl dc, ArrayDesign arrayDesign) 84 116 throws BaseException … … 87 119 this.arrayDesign = arrayDesign; 88 120 this.arrayDesignData = arrayDesign.getData(); 121 this.fiMethod = arrayDesign.getFeatureIdentificationMethod(); 122 this.featureIds = fiMethod.caseInsensitive() && HibernateUtil.getDbEngine().caseInsensitiveComparison() ? 123 new TreeSet(String.CASE_INSENSITIVE_ORDER) : new HashSet(); 89 124 setDbControl(dc); 90 125 } … … 105 140 <li>The data object is not null 106 141 <li>An array design block has been specfied 142 <li>The postion number is > 0 143 <li>The external id is not null or too long 144 <li>The feature identification is unique 107 145 <li>The data object belongs to the correct array design 108 146 <li>The reporter match the well's reporter if a well has been specified 109 <li>110 147 </ul> 111 148 */ … … 116 153 if (data == null) throw new InvalidUseOfNullException("data"); 117 154 155 // Array design block must be set 118 156 ArrayDesignBlockData adb = (ArrayDesignBlockData)getPropertyValue(data, "arrayDesignBlock"); 119 157 if (adb == null) throw new InvalidUseOfNullException("arrayDesignBlock"); 120 158 159 // Position must be > 0 160 if (data.getPosition() <= 0) 161 { 162 throw new NumberOutOfRangeException("position", data.getPosition(), 1, false); 163 } 164 165 // External ID must not be too long 166 data.setExternalId(StringUtil.setNullableString(data.getExternalId(), 167 "externalId", FeatureData.MAX_EXTERNAL_ID_LENGTH)); 168 169 // Feature identifier must be unique 170 Object featureId = fiMethod.getIdentifier(data); 171 if (featureIds.contains(featureId)) 172 { 173 throw new InvalidDataException("Another feature with the same identifier already exists: " + 174 fiMethod.toString() + "=" + featureId); 175 } 176 featureIds.add(featureId); 177 121 178 // verify that the data object belongs to the correct raw bioassay 122 179 if (!arrayDesignData.equals(adb.getArrayDesign())) … … 144 201 throws BaseException 145 202 { 146 setPropertyValue(data, "position", ++currentPosition); 203 if (fiMethod != FeatureIdentificationMethod.POSITION) 204 { 205 data.setPosition(++currentPosition); 206 } 147 207 super.insert(data); 148 208 } -
trunk/src/core/net/sf/basedb/core/Install.java
r4075 r4080 107 107 method. 108 108 */ 109 public static final int NEW_SCHEMA_VERSION = Integer.valueOf(4 8).intValue();109 public static final int NEW_SCHEMA_VERSION = Integer.valueOf(49).intValue(); 110 110 111 111 public static synchronized void createTables(boolean update, final ProgressReporter progress) -
trunk/src/core/net/sf/basedb/core/RawDataBatcher.java
r4020 r4080 146 146 private org.hibernate.Query findReporter; 147 147 148 /* 148 /** 149 The method to use for identifying features. 150 */ 151 private FeatureIdentificationMethod fiMethod; 152 153 /** 149 154 Holds info about the features of an array design. Using the 150 coordinateswe can look up position number and reporter on155 feature identifier we can look up position number and reporter on 151 156 each location and verify this against the raw data. 152 */ 153 private final Map<FeatureCoordinate, FeatureData> preloaded; 157 @see FeatureIdentificationMethod 158 */ 159 private final Map<Object, FeatureData> preloaded; 154 160 155 161 /** … … 171 177 throw new BaseException("Raw data for raw data type '" + rawDataType + "' is not stored in the database."); 172 178 } 173 174 if (arrayDesign != null && arrayDesign.getHasFeatures()) 179 180 this.fiMethod = arrayDesign != null && arrayDesign.getHasFeatures() ? 181 FeatureIdentificationMethod.fromValue(arrayDesign.getFeatureIdentificationMethod()) : 182 FeatureIdentificationMethod.NONE; 183 184 if (fiMethod != FeatureIdentificationMethod.NONE) 175 185 { 176 186 org.hibernate.Query query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(), "COUNT_FEATURES_FOR_ARRAYDESIGN"); … … 182 192 query.setInteger("arrayDesign", arrayDesign.getId()); 183 193 int numFeatures = HibernateUtil.loadData(Long.class, query).intValue(); 184 preloaded = new HashMap< FeatureCoordinate, FeatureData>(numFeatures);194 preloaded = new HashMap<Object, FeatureData>(numFeatures); 185 195 query = HibernateUtil.getPredefinedQuery(dc.getStatelessSession(), "PRELOAD_FEATURES"); 186 196 /* … … 196 206 while (si.hasNext()) 197 207 { 198 FeatureData f = si.next();199 FeatureCoordinate fc = Feature.getFeatureCoordinate(f);200 preloaded.put(f c, f);208 FeatureData feature = si.next(); 209 Object featureId = fiMethod.getIdentifier(feature); 210 preloaded.put(featureId, feature); 201 211 } 202 212 si.close(); … … 223 233 <li>The data object is not null 224 234 <li>The data object belongs to the correct raw bioassay 235 <li>The position value is > 0 225 236 <li>All of the extra properties using the 226 237 {@link ExtendedProperty#validateValue(Object)} method … … 231 242 { 232 243 if (data == null) throw new InvalidUseOfNullException("data"); 244 245 // Position must be > 0 246 if (data.getPosition() <= 0) 247 { 248 throw new NumberOutOfRangeException("position", data.getPosition(), 1, false); 249 } 233 250 234 251 // verify that the data object belongs to the correct raw bioassay … … 252 269 throws BaseException 253 270 { 254 doInsert(data, null, false);271 doInsert(data, null, null, false); 255 272 } 256 273 … … 337 354 /** 338 355 Insert a raw data spot and verify the external id of the 339 reporter. The external id is only verified if the raw bioassa uy356 reporter. The external id is only verified if the raw bioassay 340 357 is connected to an array design with features. The external id 341 358 is verified to match the external id of the reporter attached to … … 348 365 be found at the feature of this spot 349 366 @throws BaseException If the insertion failed. 367 @deprecated 350 368 */ 351 369 public void insert(RawData data, String externalReporterId) 352 370 throws BaseException 353 371 { 354 doInsert(data, externalReporterId, true); 355 } 356 372 doInsert(data, externalReporterId, null, true); 373 } 374 375 public void insert(RawData data, String externalReporterId, String externalFeatureId) 376 { 377 doInsert(data, externalReporterId, externalFeatureId, true); 378 } 379 357 380 /** 358 381 Do the actual insert. 359 382 */ 360 void doInsert(RawData data, String externalReporterId, boolean validateReporterId)383 void doInsert(RawData data, String externalReporterId, String externalFeatureId, boolean validateReporterId) 361 384 throws BaseException 362 385 { … … 364 387 if (preloaded == null) 365 388 { 366 setPropertyValue(data, "position",++currentPosition);389 if (data.getPosition() == 0) data.setPosition(++currentPosition); 367 390 // If no reporter has been set on the RawData object we try to find the external id 368 391 if (externalReporterId != null && data.getReporter() == null) … … 384 407 else 385 408 { 386 FeatureCoordinate fc = new FeatureCoordinate(data.getBlock(), data.getMetaGridX(), 387 data.getMetaGridY(), data.getRow(), data.getColumn()); 388 FeatureData f = preloaded.get(fc); 409 Object featureId = fiMethod.getIdentifier(data, externalFeatureId); 410 FeatureData f = preloaded.get(featureId); 389 411 if (f == null) 390 412 { 391 throw new ItemNotFoundException("Feature[row="+data.getRow()+", column="+data.getColumn()+ 392 ", block="+data.getBlock()+", metaGridX="+data.getMetaGridX()+", metaGridY="+data.getMetaGridY()+ 393 "]"); 413 throw new ItemNotFoundException("Feature["+ fiMethod.toString() + "=" + featureId + "]"); 394 414 } 395 415 ReporterData r = f.getReporter(); … … 404 424 } 405 425 } 406 setPropertyValue(data, "position",f.getPosition());426 data.setPosition(f.getPosition()); 407 427 setPropertyValue(data, "feature", f); 408 428 data.setReporter(r); -
trunk/src/core/net/sf/basedb/core/Update.java
r4075 r4080 553 553 </td> 554 554 </tr> 555 556 <tr> 557 <td>49</td> 558 <td> 559 <ul> 560 <li>Added {@link net.sf.basedb.core.data.FeatureData#getExternalId()} 561 <li>Added {@link net.sf.basedb.core.data.ArrayDesignData#getFeatureIdentificationMethod()} 562 </ul> 563 The update sets the identification method to COORDINATES for all existing 564 array designs, and deletes the unique index on row, column, block on 565 the Features table. 566 </td> 567 </tr> 568 555 569 </table> 556 570 … … 779 793 } 780 794 781 if (schemaVersion < 46) 782 { 783 if (progress != null) progress.display((int)(45*progress_factor), "--Updating schema version: " + schemaVersion + " -> 46..."); 784 schemaVersion = setSchemaVersionInTransaction(session, 46); 785 } 786 787 if (schemaVersion < 47) 788 { 789 if (progress != null) progress.display((int)(46*progress_factor), "--Updating schema version: " + schemaVersion + " -> 47..."); 790 schemaVersion = setSchemaVersionInTransaction(session, 47); 791 } 792 795 // Schemaversion 46-48 only updates the version number 793 796 if (schemaVersion < 48) 794 797 { … … 797 800 } 798 801 802 if (schemaVersion < 49) 803 { 804 if (progress != null) progress.display((int)(48*progress_factor), "--Updating schema version: " + schemaVersion + " -> 49..."); 805 schemaVersion = updateToSchemaVersion49(session); 806 } 807 808 799 809 sc.logout(); 800 810 if (progress != null) progress.display(100, "Database updated successfully."); … … 1977 1987 return schemaVersion; 1978 1988 } 1989 1990 /** 1991 Find the unique index on Feature (row, column and block) and remove it. 1992 1993 @return The new schema version (=49) 1994 */ 1995 private static int updateToSchemaVersion49(org.hibernate.Session session) 1996 throws BaseException 1997 { 1998 final int schemaVersion = 49; 1999 org.hibernate.Transaction tx = null; 2000 try 2001 { 2002 Connection connection = HibernateUtil.getConnection(session); 2003 DatabaseMetaData metaData = null; 2004 TableInfo info = null; 2005 try 2006 { 2007 metaData = connection.getMetaData(); 2008 Table table = new Table("Features"); 2009 info = new TableInfo(table, metaData); 2010 } 2011 catch (SQLException ex) 2012 { 2013 throw new BaseException(ex); 2014 } 2015 2016 tx = HibernateUtil.newTransaction(session); 2017 DbEngine dbEngine = HibernateUtil.getDbEngine(); 2018 String indexName = info.findIndexName("uniquecoordinate", 2019 new HashSet<String>(Arrays.asList(new String[] {"arraydesignblock_id", "row", "column"}))); 2020 if (indexName != null) 2021 { 2022 String sql = dbEngine.getDropIndexSql(null, null, "Features", indexName, true); 2023 try 2024 { 2025 Statement st = connection.createStatement(); 2026 log.info("Dropping index: " + sql); 2027 st.executeUpdate(sql); 2028 st.close(); 2029 } 2030 catch (SQLException ex) 2031 { 2032 throw new BaseException(ex); 2033 } 2034 } 2035 2036 // Update the schema version number 2037 setSchemaVersion(session, schemaVersion); 2038 2039 // Commit the changes 2040 HibernateUtil.commit(tx); 2041 log.info("updateToSchemaVersion49: OK"); 2042 } 2043 catch (BaseException ex) 2044 { 2045 if (tx != null) HibernateUtil.rollback(tx); 2046 log.error("updateToSchemaVersion49: FAILED", ex); 2047 throw ex; 2048 } 2049 return schemaVersion; 2050 } 1979 2051 1980 2052 /** … … 2348 2420 */ 2349 2421 HibernateUtil.executeUpdate(query); 2350 } 2422 } 2423 2424 if (schemaVersion < 49) 2425 { 2426 // Set featureIdentificationMethod to COORDINATE for all array designs 2427 org.hibernate.Query query = HibernateUtil.getPredefinedQuery(session, 2428 "SET_FEATUREIDENTIFICATIONMETHOD_ON_ARRAYDESIGNS"); 2429 /* 2430 UPDATE ArrayDesignData ad 2431 SET ad.featureIdentificationMethod = :method 2432 WHERE ad.featureIdentificationMethod IS NULL 2433 */ 2434 query.setInteger("method", FeatureIdentificationMethod.COORDINATES.getValue()); 2435 HibernateUtil.executeUpdate(query); 2436 } 2351 2437 2352 2438 // Commit the changes -
trunk/src/core/net/sf/basedb/core/data/ArrayDesignData.java
r3948 r4080 156 156 } 157 157 158 private int featureIdentificationMethod; 159 /** 160 The method to use for identiying features. 161 1 = COORDINATES, 2 = POSITION, 3 = EXTERNAL_ID 162 @hibernate.property column="`identification_method`" type="int" not-null="true" 163 @since 2.6 164 */ 165 public int getFeatureIdentificationMethod() 166 { 167 return featureIdentificationMethod; 168 } 169 public void setFeatureIdentificationMethod(int featureIdentificationMethod) 170 { 171 this.featureIdentificationMethod = featureIdentificationMethod; 172 } 173 174 158 175 private Set<ArrayDesignBlockData> arrayDesignBlocks; 159 176 /** -
trunk/src/core/net/sf/basedb/core/data/FeatureData.java
r3948 r4080 67 67 Get the column coordinate of the feature. 68 68 @hibernate.property type="int" update="false" 69 @hibernate.column name="`column`" not-null="true" unique-key="uniquecoordinate"69 @hibernate.column name="`column`" not-null="true" 70 70 */ 71 71 public int getColumn() … … 83 83 Get the row coordinate of the feature. 84 84 @hibernate.property type="int" update="false" 85 @hibernate.column name="`row`" not-null="true" unique-key="uniquecoordinate"85 @hibernate.column name="`row`" not-null="true" 86 86 */ 87 87 public int getRow() … … 104 104 return position; 105 105 } 106 void setPosition(int position) 106 /** 107 This method was private until 2.6. The value will be overwritten with an 108 autogenerated value unless the feature identification method is POSITION. 109 The value must be a positive integer. 110 @since 2.6 111 */ 112 public void setPosition(int position) 107 113 { 108 114 this.position = position; 109 115 } 110 116 117 /** 118 The maximum length of the external ID that can be stored in the database. 119 @see #setExternalId(String) 120 */ 121 public static final int MAX_EXTERNAL_ID_LENGTH = 255; 122 private String externalId; 123 /** 124 Get the external id for this <code>FeatureData</code> item. If given, 125 it must be unique per array design. 126 @return The features external ID. 127 @hibernate.property column="`external_id`" type="string" length="255" not-null="false" update="false" 128 @since 2.6 129 */ 130 public String getExternalId() 131 { 132 return externalId; 133 } 134 public void setExternalId(String externalId) 135 { 136 this.externalId = externalId; 137 } 138 111 139 private ArrayDesignBlockData arrayDesignBlock; 112 140 /** … … 115 143 116 144 @hibernate.many-to-one outer-join="false" update="false" 117 @hibernate.column name="`arraydesignblock_id`" not-null="true" unique-key="uniquecoordinate"145 @hibernate.column name="`arraydesignblock_id`" not-null="true" 118 146 */ 119 147 ArrayDesignBlockData getArrayDesignBlock() -
trunk/src/core/net/sf/basedb/core/data/RawData.java
r3948 r4080 116 116 return position; 117 117 } 118 void setPosition(int position) 118 /** 119 This method was private before 2.6. If the raw bioassay is connected to 120 an array design which uses the POSITION feature identifier method 121 a value must be set. If the raw bioassay is connected to an array design 122 which uses another feature identifier method this value will be overwritten 123 with the position value from the feature. If the raw bioassay is not connected 124 to an array design a position will be automatically generated if no value 125 has been set, ie. if the value is 0. 126 The value must be a positive integer. 127 @param position The position number of the spot 128 @since 2.6 129 */ 130 public void setPosition(int position) 119 131 { 120 132 this.position = position; -
trunk/src/plugins/core/net/sf/basedb/plugins/IlluminaRawDataImporter.java
r3820 r4080 43 43 import net.sf.basedb.core.DbControl; 44 44 import net.sf.basedb.core.Experiment; 45 import net.sf.basedb.core.FeatureIdentificationMethod; 45 46 import net.sf.basedb.core.File; 46 47 import net.sf.basedb.core.Include; … … 92 93 to an experiment. 93 94 <p> 94 Since the data files doesn't have any coordinate information, the plug-in create 95 fake coordinates like this: block=1, column=1, row=linenumber in file. 96 The linenmbers start with 1 at the first data line, ie. header lines are not counted. 95 Since the data files doesn't have any coordinate information the importer will 96 use one of the following methods. 97 98 <ul> 99 <li> 100 If no array design has been selected or if the array design is using the 101 {@link FeatureIdentificationMethod#COORDINATES} method for identifying features: 102 The plug-in create fake coordinates like this: block=1, column=1, row=linenumber in file. 103 The linenmbers start with 1 at the first data line, ie. header lines are not counted. 104 105 <li> 106 If the array design uses the {@link FeatureIdentificationMethod#POSITION} 107 method for identiyfing features: The plug-in sets the position=line number in file. 108 The linenmbers start with 1 at the first data line, ie. header lines are not counted. 109 110 <li> 111 If the array design uses the {@link FeatureIdentificationMethod#EXTERNAL_ID} 112 method for identifying features. The plug-in assumes that the feature ID is the 113 same as the reporter ID. 114 </ul> 115 116 <p> 117 NOTE! Since the methods are not conflicting with each other, there will not 118 be an actual check which method to use by this plug-in. We will simple set all 119 values as specified above and let the BASE core handle the identification. 97 120 98 121 @author nicklas … … 417 440 { 418 441 String externalId = reporterMapper.getValue(data); 442 int lineNo = data.dataLineNo(); 419 443 for (BatchAndMapHolder holder : holders) 420 444 { 421 445 RawData raw = holder.batcher.newRawData(); 446 raw.setPosition(lineNo); 422 447 raw.setBlock(1); 423 448 raw.setColumn(1); 424 raw.setRow( data.dataLineNo());449 raw.setRow(lineNo); 425 450 for (Map.Entry<RawDataProperty, Mapper> entry : holder.mappers.entrySet()) 426 451 { … … 429 454 raw.setExtended(ep.getName(), ep.parseString(m.getValue(data), numberFormat, nullIfException)); 430 455 } 431 holder.batcher.insert(raw, externalId );456 holder.batcher.insert(raw, externalId, externalId); 432 457 } 433 458 numInserted++; -
trunk/src/plugins/core/net/sf/basedb/plugins/PrintMapFlatFileImporter.java
r3820 r4080 33 33 import net.sf.basedb.core.DbControl; 34 34 import net.sf.basedb.core.FeatureBatcher; 35 import net.sf.basedb.core.FeatureIdentificationMethod; 35 36 import net.sf.basedb.core.File; 36 37 import net.sf.basedb.core.FileParameterType; … … 326 327 } 327 328 328 batcher = arrayDesign.getFeatureBatcher( );329 batcher = arrayDesign.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES); 329 330 numFeatures = 0; 330 331 numBlocks = 0; -
trunk/src/plugins/core/net/sf/basedb/plugins/RawDataFlatFileImporter.java
r3979 r4080 50 50 import net.sf.basedb.core.RequestInformation; 51 51 import net.sf.basedb.core.StringParameterType; 52 import net.sf.basedb.core.data.FeatureData; 52 53 import net.sf.basedb.core.data.RawData; 53 54 import net.sf.basedb.core.data.ReporterData; … … 115 116 private static final StringParameterType requiredColumnMapping = new StringParameterType(255, null, true); 116 117 118 private static final PluginParameter<String> positionColumnMapping = new PluginParameter<String>( 119 "positionColumnMapping", 120 "Position", 121 "Mapping that picks the spot's position from the data columns. This column is only " + 122 "used when the raw data is connected to an array design which uses the POSITION method " + 123 "for identifying features. If the raw data is not connected to an array design " + 124 "position values will automatically be generated if no mapping has been specified. In all" + 125 "cases, position value must be unique." + 126 "Mapping example: \\Position\\", 127 optionalColumnMapping 128 ); 129 130 117 131 private static final PluginParameter<String> blockColumnMapping = new PluginParameter<String>( 118 132 "blockColumnMapping", 119 133 "Block", 120 "Mapping that picks the spot's block from the data columns. " + 134 "Mapping that picks the spot's block number from the data columns. This column is only " + 135 "used when the raw data is connected to an array design which uses the COORDINATES method " + 136 "for identifying features. In all other cases, the value is stored as is." + 121 137 "For example: \\Block\\", 122 138 optionalColumnMapping … … 126 142 "columnColumnMapping", 127 143 "Column", 128 "Mapping that picks the spot's column in the block from the data columns. " + 144 "Mapping that picks the spot's column coordinate from the data columns. This column is only " + 145 "used when the raw data is connected to an array design which uses the COORDINATES method " + 146 "for identifying features. In all other cases, the value is stored as is." + 129 147 "For example: \\Column\\", 130 148 optionalColumnMapping … … 134 152 "rowColumnMapping", 135 153 "Row", 136 "Mapping that picks the spot's row in the block from the data columns. " + 154 "Mapping that picks the spot's row coordinate from the data columns. This column is only " + 155 "used when the raw data is connected to an array design which uses the COORDINATES method " + 156 "for identifying features. In all other cases, the value is stored as is." + 137 157 "For example: \\Row\\", 138 158 optionalColumnMapping … … 142 162 "metaGridXColumnMapping", 143 163 "MetaGridX", 144 "Mapping that picks the spot's meta-Grid X-axis from the data columns. " + 164 "Mapping that picks the spot's meta-Grid X-axis from the data columns. This column is only " + 165 "used when the raw data is connected to an array design which uses the COORDINATES method " + 166 "for identifying features. In all other cases, the value is stored as is." + 145 167 "For example: \\Meta grid X\\", 146 168 optionalColumnMapping … … 150 172 "metaGridYColumnMapping", 151 173 "MetaGridY", 152 "Mapping that picks the spot's meta-Grid Y-axis from the data columns. " + 174 "Mapping that picks the spot's meta-Grid Y-axis from the data columns. This column is only " + 175 "used when the raw data is connected to an array design which uses the COORDINATES method " + 176 "for identifying features. In all other cases, the value is stored as is." + 153 177 "For example: \\Meta grid Y\\", 154 178 optionalColumnMapping … … 178 202 requiredColumnMapping 179 203 ); 204 205 private static final PluginParameter<String> featureIdColumnMapping = new PluginParameter<String>( 206 "featureIdColumnMapping", 207 "Feature ID", 208 "Mapping that picks the spot's feature ID from the data columns. " + 209 "This column is only used when the raw data is connected to an array design " + 210 "which uses the EXTERNAL_ID method for identifying features. The value is not saved " + 211 "to the database." + 212 "For example: \\Feature ID\\", 213 optionalColumnMapping 214 ); 215 180 216 181 217 protected static final PluginParameter<String> missingReporterErrorParameter = new PluginParameter<String>( … … 226 262 private FileSetMember rawDataMember; 227 263 264 private Mapper featureIdMapper; 228 265 private Mapper reporterMapper; 266 private Mapper positionMapper; 229 267 private Mapper blockMapper; 230 268 private Mapper columnMapper; … … 529 567 reporterMapper = getMapper(ffp, (String)configuration.getValue("reporterIdColumnMapping"), 530 568 cropStrings ? ReporterData.MAX_EXTERNAL_ID_LENGTH : null, nullMapper); 531 569 570 featureIdMapper = getMapper(ffp, (String)configuration.getValue("featureIdColumnMapping"), 571 cropStrings ? FeatureData.MAX_EXTERNAL_ID_LENGTH : null, nullMapper); 572 573 positionMapper = getMapper(ffp, (String)configuration.getValue("positionColumnMapping"), null, nullMapper); 532 574 blockMapper = getMapper(ffp, (String)configuration.getValue("blockColumnMapping"), null, nullMapper); 533 575 columnMapper = getMapper(ffp, (String)configuration.getValue("columnColumnMapping"), null, nullMapper); … … 584 626 585 627 String externalId = reporterMapper.getValue(data); 628 String featureId = featureIdMapper.getValue(data); 629 Integer position = positionMapper.getInt(data); 630 if (position != null) raw.setPosition(position); 586 631 raw.setBlock(blockMapper.getInt(data)); 587 632 raw.setColumn(columnMapper.getInt(data)); … … 599 644 } 600 645 601 batcher.insert(raw, externalId );646 batcher.insert(raw, externalId, featureId); 602 647 numInserted++; 603 648 } … … 633 678 { 634 679 allColumnMappings = new ArrayList<PluginParameter<String>>(); 680 allColumnMappings.add(positionColumnMapping); 635 681 allColumnMappings.add(blockColumnMapping); 636 682 allColumnMappings.add(columnColumnMapping); … … 641 687 allColumnMappings.add(yColumnMapping); 642 688 allColumnMappings.add(reporterIdColumnMapping); 689 allColumnMappings.add(featureIdColumnMapping); 643 690 for(RawDataProperty rdp : rdt.getProperties()) 644 691 { -
trunk/src/plugins/core/net/sf/basedb/plugins/ReporterMapFlatFileImporter.java
r4076 r4080 33 33 import net.sf.basedb.core.DbControl; 34 34 import net.sf.basedb.core.FeatureBatcher; 35 import net.sf.basedb.core.FeatureIdentificationMethod; 35 36 import net.sf.basedb.core.File; 36 37 import net.sf.basedb.core.FileParameterType; … … 38 39 import net.sf.basedb.core.FileStoreUtil; 39 40 import net.sf.basedb.core.FileType; 41 import net.sf.basedb.core.InvalidDataException; 40 42 import net.sf.basedb.core.InvalidUseOfNullException; 41 43 import net.sf.basedb.core.ItemContext; … … 94 96 "Reporter map importer", 95 97 "This plugin is used to import features to an ArrayDesign from a simple flat file.", 96 "2. 0",98 "2.6", 97 99 "2006, Base 2 development team", 98 100 null, … … 109 111 private static final StringParameterType optionalColumnMapping = new StringParameterType(255, null, false); 110 112 111 113 private static final PluginParameter<String> featureIdentificationParameter = 114 new PluginParameter<String>( 115 "featureIdentification", 116 "Identify features by", 117 "Choose which method to use for identifying features: \n" + 118 "COORDINATES: Use block, meta-grid, row and column coordinates\n" + 119 "POSITION: Use a position number only\n" + 120 "EXTERNAL_ID: Use the feature ID value (string)\n" + 121 "In all cases, the identifier value must be unique.", 122 new StringParameterType(255, "COORDINATES", true, 1, 0, 0, 123 Arrays.asList(new String[] {"COORDINATES", "POSITION", "EXTERNAL_ID"})) 124 ); 125 112 126 private static final PluginParameter<String> reporterIdColumnMapping = new PluginParameter<String>( 113 127 "reporterIdColumnMapping", … … 117 131 requiredColumnMapping 118 132 ); 119 133 134 private static final PluginParameter<String> featureIdColumnMapping = new PluginParameter<String>( 135 "featureIdColumnMapping", 136 "Feature ID", 137 "Mapping that picks the feature's ID from the data columns. This column is " + 138 "only used when the array design uses the EXTERNAL_ID method for " + 139 "identifying features. In the other cases, the value is just stored as it is." + 140 "For example: \\Feature ID\\", 141 optionalColumnMapping 142 ); 143 144 private static final PluginParameter<String> positionColumnMapping = new PluginParameter<String>( 145 "positionColumnMapping", 146 "Position", 147 "Mapping that picks the feature's position from the data columns. This column is only " + 148 "used when the array design uses the POSITION method " + 149 "for identifying features. The other identification methods will always " + 150 "overwrite the position with an autogenerated value." + 151 "Mapping example: \\Position\\", 152 optionalColumnMapping 153 ); 154 155 120 156 private static final PluginParameter<String> blockColumnMapping = new PluginParameter<String>( 121 157 "blockColumnMapping", 122 158 "Block", 123 "Mapping that picks the feature's block number from the data columns. "+ 124 "You must specify either this mapping or mappings for the meta coordinates. " + 159 "Mapping that picks the feature's block number from the data columns. This column is only " + 160 "used when the array design uses the COORDINATES method " + 161 "for identifying features. In the other cases, the value is just stored as it is. " + 162 "You must specify either this mapping or mappings for the meta coordinates when using " + 163 "the COORDINATES method. " + 125 164 "Example: \\Block\\", 126 165 optionalColumnMapping … … 130 169 "metaGridXColumnMapping", 131 170 "Meta grid X", 132 "Mapping that picks the feature's meta grid X coordinate from the data columns. "+ 133 "Required if you don't specify a block mapping. Example: \\Meta grid X\\", 171 "Mapping that picks the feature's meta grid X coordinate from the data columns. This column is only " + 172 "used when the array design uses the COORDINATES method " + 173 "for identifying features. In the other cases, the value is just stored as it is. " + 174 "You must specify either this mapping or mappings for the block number when using " + 175 "the COORDINATES method. Example: \\Meta grid X\\", 134 176 optionalColumnMapping 135 177 ); … … 138 180 "metaGridYColumnMapping", 139 181 "Meta grid Y", 140 "Mapping that picks the feature's meta grid Y coordinate from the data columns. " + 141 "Required if you don't specify a block mapping. Example: \\Meta grid Y\\", 182 "Mapping that picks the feature's meta grid Y coordinate from the data columns. This column is only " + 183 "used when the array design uses the COORDINATES method " + 184 "for identifying features. In the other cases, the value is just stored as it is. " + 185 "You must specify either this mapping or mappings for the block number when using " + 186 "the COORDINATES method. Example: \\Meta grid Y\\", 142 187 optionalColumnMapping 143 188 ); … … 147 192 "Column", 148 193 "Mapping that picks the feature's column position in a block from the data columns. " + 149 "For example: \\Column\\", 150 requiredColumnMapping 194 "This column is only used when the array design uses the COORDINATES method " + 195 "for identifying features. In the other cases, the value is just stored as it is. " + 196 "This value is required when using the COORDINATES method. Example: \\Column\\", 197 optionalColumnMapping 151 198 ); 152 199 … … 155 202 "Row", 156 203 "Mapping that picks the feature's row position in a block from the data columns. " + 157 "For example: \\Row\\", 158 requiredColumnMapping 204 "This column is only used when the array design uses the COORDINATES method " + 205 "for identifying features. In the other cases, the value is just stored as it is. " + 206 "This value is required when using the COORDINATES method. Example: \\Row\\", 207 optionalColumnMapping 159 208 ); 160 209 … … 190 239 private boolean errorIfNotFound; 191 240 private Mapper reporterMapper; 241 private Mapper featureIdMapper; 242 private Mapper positionMapper; 192 243 private Mapper blockMapper; 193 244 private Mapper columnMapper; … … 328 379 } 329 380 330 // Check that either block or meta coordinates have been mapped 331 String blockMapping = (String)request.getParameterValue("blockColumnMapping"); 332 String metaGridXMapping = (String)request.getParameterValue("metaGridXColumnMapping"); 333 String metaGridYMapping = (String)request.getParameterValue("metaGridYColumnMapping"); 334 if (blockMapping == null && (metaGridXMapping == null || metaGridYMapping == null)) 381 // Check that enough mappings have been set for the 382 // specific feature identification method 383 String fiParameter = (String)request.getParameterValue("featureIdentification"); 384 FeatureIdentificationMethod fiMethod = fiParameter == null ? 385 FeatureIdentificationMethod.COORDINATES : 386 FeatureIdentificationMethod.valueOf(fiParameter); 387 388 List<Throwable> mapErrors = new ArrayList<Throwable>(); 389 if (fiMethod == FeatureIdentificationMethod.COORDINATES) 335 390 { 336 response.setError("You must at least map either block or meta coordinates to columns.", null); 391 String blockMapping = (String)request.getParameterValue("blockColumnMapping"); 392 String metaGridXMapping = (String)request.getParameterValue("metaGridXColumnMapping"); 393 String metaGridYMapping = (String)request.getParameterValue("metaGridYColumnMapping"); 394 String columnMapping = (String)request.getParameterValue("columnColumnMapping"); 395 String rowMapping = (String)request.getParameterValue("rowColumnMapping"); 396 397 if (blockMapping == null && (metaGridXMapping == null || metaGridYMapping == null)) 398 { 399 mapErrors.add(new InvalidDataException("You must at least map either block or meta coordinates to columns.")); 400 } 401 if (columnMapping == null) mapErrors.add(new InvalidUseOfNullException("Column")); 402 if (rowMapping == null) mapErrors.add(new InvalidUseOfNullException("Row")); 403 } 404 else if (fiMethod == FeatureIdentificationMethod.POSITION) 405 { 406 String positionMapping = (String)request.getParameterValue("positionColumnMapping"); 407 if (positionMapping == null) mapErrors.add(new InvalidUseOfNullException("Position")); 408 } 409 else if (fiMethod == FeatureIdentificationMethod.EXTERNAL_ID) 410 { 411 String positionMapping = (String)request.getParameterValue("featureIdColumnMapping"); 412 if (positionMapping == null) mapErrors.add(new InvalidUseOfNullException("Feature ID")); 413 } 414 else 415 { 416 response.setError("Unknown feature identification method: " + fiMethod, null); 337 417 return; 418 } 419 if (mapErrors.size() > 0) 420 { 421 response.setError("Missing column mapping for feature identification method: " 422 + fiMethod, mapErrors); 338 423 } 339 424 … … 350 435 351 436 // Column mappings 437 storeValue(configuration, request, featureIdentificationParameter); 352 438 storeValue(configuration, request, complexMappings); 353 439 boolean allowComplex = "allow".equals(request.getParameterValue(complexMappings.getName())); … … 379 465 storeValue(job, request, invalidUseOfNullErrorParameter); 380 466 storeValue(job, request, numberFormatErrorParameter); 467 storeValue(job, request, stringTooLongErrorParameter); 381 468 382 469 response.setDone("Job configuration complete", Job.ExecutionTime.SHORT); … … 408 495 File reporterMapFile = (File)job.getValue("file"); 409 496 arrayDesign = ArrayDesign.getById(dc, arrayDesign.getId()); 497 if (arrayDesign.getNumDbFeatures() > 0) 498 { 499 throw new PermissionDeniedException("The array design already has features. "+arrayDesign.getName()+"["+arrayDesign.getId()+"]"); 500 } 501 String fiParameter = (String)configuration.getValue("featureIdentification"); 502 FeatureIdentificationMethod fiMethod = fiParameter == null ? 503 FeatureIdentificationMethod.COORDINATES : 504 FeatureIdentificationMethod.valueOf(fiParameter); 410 505 reporterMapMember = FileStoreUtil.setGenericDataFile(dc, arrayDesign, 411 506 FileType.REPORTER_MAP, DataFileType.GENERIC_REPORTER_MAP, reporterMapFile); 412 if (arrayDesign.getNumDbFeatures() > 0) 413 { 414 throw new PermissionDeniedException("The array design already has features. "+arrayDesign.getName()+"["+arrayDesign.getId()+"]"); 415 } 416 batcher = arrayDesign.getFeatureBatcher(); 507 batcher = arrayDesign.getFeatureBatcher(fiMethod); 417 508 reporterBatcher = ReporterBatcher.getNew(dc); 418 509 this.ffp = ffp; … … 439 530 protected void beginData() 440 531 { 532 boolean cropStrings = ("crop".equals(job.getValue("stringTooLongError"))); 441 533 Mapper nullMapper = new ConstantMapper((String)null); 442 reporterMapper = getMapper(ffp, (String)configuration.getValue("reporterIdColumnMapping"), null, nullMapper); 534 reporterMapper = getMapper(ffp, (String)configuration.getValue("reporterIdColumnMapping"), 535 cropStrings ? ReporterData.MAX_EXTERNAL_ID_LENGTH : null, nullMapper); 536 featureIdMapper = getMapper(ffp, (String)configuration.getValue("featureIdColumnMapping"), 537 cropStrings ? FeatureData.MAX_EXTERNAL_ID_LENGTH : null, nullMapper); 538 positionMapper = getMapper(ffp, (String)configuration.getValue("positionColumnMapping"), null, nullMapper); 443 539 blockMapper = getMapper(ffp, (String)configuration.getValue("blockColumnMapping"), null, nullMapper); 444 540 columnMapper = getMapper(ffp, (String)configuration.getValue("columnColumnMapping"), null, nullMapper); … … 453 549 { 454 550 String externalId = reporterMapper.getValue(data); 551 String featureId = featureIdMapper.getValue(data); 455 552 ReporterData reporter = externalId == null ? 456 553 null : reporterBatcher.getByExternalId(externalId, errorIfNotFound); … … 474 571 475 572 FeatureData feature = batcher.newFeature(adb, reporter); 573 Integer position = positionMapper.getInt(data); 476 574 Integer row = rowMapper.getInt(data); 477 575 Integer column = columnMapper.getInt(data); 478 if (row == null) throw new InvalidUseOfNullException("row"); 479 if (column == null) throw new InvalidUseOfNullException("column"); 480 feature.setRow(row); 481 feature.setColumn(column); 576 feature.setPosition(position == null ? 0 : position); 577 if (row != null) 578 { 579 feature.setRow(row); 580 if (row > adb.getBlockSizeY()) adb.setBlockSizeY(row); 581 } 582 if (column != null) 583 { 584 feature.setColumn(column); 585 if (column > adb.getBlockSizeX()) adb.setBlockSizeX(feature.getColumn()); 586 } 482 587 483 588 batcher.insert(feature); 484 589 numFeatures++; 485 if (feature.getRow() > adb.getBlockSizeY())486 {487 adb.setBlockSizeY(feature.getRow());488 }489 if (feature.getColumn() > adb.getBlockSizeX())490 {491 adb.setBlockSizeX(feature.getColumn());492 }493 590 } 494 591 … … 535 632 allColumnMappings = new ArrayList<PluginParameter<String>>(); 536 633 allColumnMappings.add(reporterIdColumnMapping); 634 allColumnMappings.add(featureIdColumnMapping); 635 allColumnMappings.add(positionColumnMapping); 537 636 allColumnMappings.add(blockColumnMapping); 538 637 allColumnMappings.add(metaGridXColumnMapping); … … 593 692 parameters.add(invalidUseOfNullErrorParameter); 594 693 parameters.add(numberFormatErrorParameter); 694 parameters.add(stringTooLongErrorParameter); 595 695 596 696 configureJob = new RequestInformation … … 626 726 // Column mappings 627 727 parameters.add(mappingSection); 728 parameters.add(featureIdentificationParameter); 628 729 parameters.add(complexMappings); 629 730 parameters.addAll(getAllColumnMappings()); -
trunk/src/test/TestArrayDesign.java
r3820 r4080 31 31 import net.sf.basedb.core.Feature; 32 32 import net.sf.basedb.core.FeatureBatcher; 33 import net.sf.basedb.core.FeatureIdentificationMethod; 33 34 import net.sf.basedb.core.File; 34 35 import net.sf.basedb.core.FileSetMember; … … 328 329 } 329 330 330 FeatureBatcher batcher = ad.getFeatureBatcher( );331 FeatureBatcher batcher = ad.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES); 331 332 int block = 1; 332 333 int row = 1; … … 395 396 wells.addAll(plate.getWells().list(dc)); 396 397 } 397 FeatureBatcher batcher = ad.getFeatureBatcher( );398 FeatureBatcher batcher = ad.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES); 398 399 int block = 1; 399 400 int row = 1; … … 549 550 dc = TestUtil.getDbControl(); 550 551 ArrayDesign ad = ArrayDesign.getById(dc, arrayDesignId); 551 FeatureBatcher featureBatcher = ad.getFeatureBatcher( );552 FeatureBatcher featureBatcher = ad.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES); 552 553 ReporterBatcher reporterBatcher = ReporterBatcher.getNew(dc); 553 554 -
trunk/src/test/net/sf/basedb/test/merge/MergeTest.java
r3820 r4080 42 42 import net.sf.basedb.core.Experiment; 43 43 import net.sf.basedb.core.FeatureBatcher; 44 import net.sf.basedb.core.FeatureIdentificationMethod; 44 45 import net.sf.basedb.core.Formula; 45 46 import net.sf.basedb.core.ItemParameterType; … … 200 201 TestUtil.write("--Creating features for array design: " + design.getName() + "\n"); 201 202 dc.reattachItem(design); 202 FeatureBatcher batcher = design.getFeatureBatcher( );203 FeatureBatcher batcher = design.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES); 203 204 ReporterBatcher reporterBatcher = ReporterBatcher.getNew(dc); 204 205 for (int block = 1; block <= 10; block++) … … 252 253 rawData.setExtended("ch1FgMean", ch1 + noise); 253 254 rawData.setExtended("ch2FgMean", ch1 * ratio - noise); 254 batcher.insert(rawData, externalId );255 batcher.insert(rawData, externalId, null); 255 256 } 256 257 }
Note: See TracChangeset
for help on using the changeset viewer.