Changeset 1144
- Timestamp:
- Jul 29, 2009, 9:21:24 AM (14 years ago)
- Location:
- plugins/base2/net.sf.basedb.normalizers/trunk/src/net/sf/basedb/plugins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/base2/net.sf.basedb.normalizers/trunk/src/net/sf/basedb/plugins/AbstractNormalizationPlugin.java
r1143 r1144 71 71 "averageMethod", 72 72 "Average calculation method", 73 "Select which method to use when calculating the averages.\n" + 74 "Geometric mean is default for none-logged values and arithmetic " + 73 "Select which method to use when calculating averages.\n" + 74 geometricOption + 75 " is default for none-logged values and " + arithmeticOption + 75 76 "is default for logged values.", 76 77 null -
plugins/base2/net.sf.basedb.normalizers/trunk/src/net/sf/basedb/plugins/AverageNormalization.java
r1143 r1144 69 69 /** 70 70 This plug-in scales the expression values for an assay with a 71 factor, ''S'', equal to the ratio of either i) the geometricmean71 factor, ''S'', equal to the ratio of either i) the mean 72 72 of the expression values of all spots in the bioassay set divided 73 73 by the assay average, or ii) a user defined value divided by the 74 assay average. 74 assay average. Which average method to use is selected in the job 75 configuration process. 75 76 76 77 The new expression values will become ''S'' times the original 77 78 expression value. 78 79 79 Background subtraction and proper filtration have to be done before80 running this plug-in.80 Background subtraction and proper filtration should be done on the 81 bioassay set before running this plug-in. 81 82 82 83 @author Martin … … 106 107 ( 107 108 "useGlobalAvgInt", 108 "Use global geometricmean intensity",109 "Select if the global geometric mean intensity or an user defined value should be used as a reference value\n" +110 noOption + " = User defined value(default)\n" +111 yesOption + " = Global geometric mean intensity",109 "Use global mean intensity", 110 "Select if the global mean intensity should be used as a reference value.\n" + 111 noOption + " = User defined reference value is used(default).\n" + 112 yesOption + " = Global mean intensity is used.", 112 113 new StringParameterType(null, noOption, true, 1, 0, 0, Arrays.asList(new String[] {noOption, yesOption})) 113 114 ); … … 121 122 "Reference value", 122 123 "Reference value to use when calculating the scaling factor. Default value is 100\n" + 123 "This parameter cannot be null if 'Use global geometricmean intensity' is " + noOption + ".",124 "This parameter cannot be null if 'Use global mean intensity' is " + noOption + ".", 124 125 new FloatParameterType(null, null, 100f, false) 125 126 ); … … 304 305 if (useGlobalAvgInt) 305 306 { 306 refValue = getGlobal GeometricMeanIntensity(dc, source, minIntensity, (String)job.getValue("averageMethod"));307 refValue = getGlobalMeanIntensity(dc, source, minIntensity, (String)job.getValue("averageMethod")); 307 308 } 308 309 else … … 515 516 if (progress != null) 516 517 progress.display((int)((100L * normalizedSpots) / numSpots), 517 normalizedSpots + " spots normalized");518 normalizedSpots + " spots processed"); 518 519 } 519 520 batcher.flush(); … … 530 531 either 1-channel or 2-channel data. 531 532 */ 532 private float getGlobal GeometricMeanIntensity(DbControl dc, BioAssaySet source, float minIntensity, String averageMethod)533 private float getGlobalMeanIntensity(DbControl dc, BioAssaySet source, float minIntensity, String averageMethod) 533 534 throws SQLException, BaseException 534 535 { … … 546 547 break; 547 548 case 2: 548 ratio = Expressions. ln(Expressions.divide(ch1, ch2));549 ratio = Expressions.divide(ch1, ch2); 549 550 break; 550 551 default: 551 552 throw new BaseException(noOfChannels + " channel-data is not supported by this plugin"); 552 } 553 553 } 554 554 555 555 if (arithmeticOption.equals(averageMethod)) mean = Aggregations.mean(ratio); … … 565 565 else throw new BaseException("The global average intensity could not be calculated"); 566 566 567 return (float) Math.exp(meanValue);567 return (float)meanValue; 568 568 } 569 569 } -
plugins/base2/net.sf.basedb.normalizers/trunk/src/net/sf/basedb/plugins/QuantileNormalization.java
r1143 r1144 319 319 private BioAssaySet normalize(DbControl dc, BioAssaySet source, 320 320 Job job, ProgressReporter progress) 321 { 322 String averageMethod = (String)(job.getParameterValue("averageMethod")); 323 321 { 324 322 int noOfChannels = source.getRawDataType().getChannels(); 325 323 long normalizedSpots = 0;
Note: See TracChangeset
for help on using the changeset viewer.