|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.IntensityCalculatorUtil
public class IntensityCalculatorUtil
This is a utility class for plugins that calculate intensities from raw spot data.
Nested Class Summary | |
---|---|
private static class |
IntensityCalculatorUtil.JepIntensityCalculatorImpl
An implementation of the IntensityCalculator interface using
JEP expressions. |
Constructor Summary | |
---|---|
IntensityCalculatorUtil()
|
Method Summary | |
---|---|
static boolean |
checkSameArrayDesign(Collection<RawBioAssay> rawBioAssays,
boolean throwException)
|
static Expression[] |
createJepExpressions(DbControl dc,
RawDataType rawDataType,
String[] formulas)
|
static IntensityCalculator |
createJepIntensityCalculator(DbControl dc,
RawDataType rawDataType,
String... jepFormulas)
Create an intensity calculator from mathematical expressions in strings. |
static BioAssaySet |
createRootBioAssaySet(DbControl dc,
Experiment experiment,
Collection<RawBioAssay> rawBioAssays,
Job job,
Expression[] intensities,
ProgressReporter progress)
Create a root bioassayset for a given experiment and set of raw bioassays. |
static BioAssaySet |
createRootBioAssaySet(DbControl dc,
Experiment experiment,
Collection<RawBioAssay> rawBioAssays,
Job job,
IntensityCalculator iCalc,
ProgressReporter progress)
Create a root bioassayset for a given experiment and set of raw bioassays. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntensityCalculatorUtil()
Method Detail |
---|
public static boolean checkSameArrayDesign(Collection<RawBioAssay> rawBioAssays, boolean throwException)
public static BioAssaySet createRootBioAssaySet(DbControl dc, Experiment experiment, Collection<RawBioAssay> rawBioAssays, Job job, Expression[] intensities, ProgressReporter progress) throws InvalidDataException, BaseException
Expression
objects to a DynamicRawDataQuery
.
This method is very fast since most of the work is done on the
database only.
This method can only be used if all raw bioassays are connected
to the same ArrayDesign
(which must have features), since it
doesn't supports remapping of the position numbers.
dc
- The DbControl
object to use for database acecssexperiment
- The experiment where the new bioassayset should be placedrawBioAssays
- The raw bioassays to create bioassays for, or null
to use all raw bioassaysjob
- The job that the transformation should be linked to, or
null if this method isn't called by a jobintensities
- An array containing the expressions for
calculating the intensities, one for each channelprogress
- Optional progress reporter if the caller is interested in the progress
BioAssaySet
object.
InvalidDataException
- If any of the required parameters is null
or if the raw bioassays arn't using the same array design or
if the number of intensity expressions doesn't match the number of channels
BaseException
- If anything else goes wrong in the process.public static BioAssaySet createRootBioAssaySet(DbControl dc, Experiment experiment, Collection<RawBioAssay> rawBioAssays, Job job, IntensityCalculator iCalc, ProgressReporter progress) throws InvalidDataException, BaseException
IntensityCalculator
object. This method is not as fast as the other createRootBioAssay
method since all raw data must be loaded into memory and the inserted into
the database one row at a time.
On the other hand, this method supports remapping of the position numbers so it is not necessary for all raw bioassays to use the same array design.
dc
- The DbControl
object to use for database acecssexperiment
- The experiment where the new bioassayset should be placedrawBioAssays
- The raw bioassays to create bioassays for, or null
to use all raw bioassaysjob
- The job that the transformation should be linked to, or
null if this method isn't called by a jobiCalc
- An object implementing the IntensityCalculator
interfaceprogress
- A progress reporter object, or null if the caller isn't
interested in the progress
BioAssaySet
object
InvalidDataException
- If any of the required parameters is null.
BaseException
- If there is another error.public static IntensityCalculator createJepIntensityCalculator(DbControl dc, RawDataType rawDataType, String... jepFormulas) throws InvalidDataException, BaseException
+, -, / , *, ln
.
Use the name of a raw() function to include the value of that property, or the
mean() function to include the mean of a property (over the whole data set). Examples
of valid expressions are (assuming that the properties has been defined for the
raw data type in question; see RawDataType.getProperties()
):
raw('ch1FgMean') - raw('ch1BgMean') raw('ch1FgMedian') - mean('ch1BgMedian')
dc
- The DbControl used for database accessrawDataType
- The raw data type to create the intensity calculator for. Null is not allowed.jepFormulas
- The mathematical expressions in a form supported by JEP,
one expression is required for each channel. Null is not allowed
InvalidDataException
- If any of the required arguments is null or
if the formulas length does not match the number of channels.
BaseException
- If there is another error.RawDataType.getIntensityFormulas()
,
IntensityFormula
,
Jep
public static Expression[] createJepExpressions(DbControl dc, RawDataType rawDataType, String[] formulas)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |