O2Plib.db.CSD
Class CSDcal

java.lang.Object
  extended by O2Plib.db.CSD.CSDglb
      extended by O2Plib.db.CSD.CSDcal

public class CSDcal
extends CSDglb

Class CSDcal contains sample calibration data for the Composite Samplex Database (CSD). Note: individual DbSample objects have dbSample.calib sub-objects that can hold a grayscale to calibration-units calibration. This class has other types (spatial) calibrations as well. Be aware of the differences. This class is used in CSD data-mining.


 This file is derived from Open2Dprot, MAExplorer and GELLAB-II code.

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Open2Dprot Mozilla and Legal files are available on http://Open2Dprot.sourceforge.net/.

Version:
$Date: 2005/12/09 15:04:26 $ $Revision: 1.10 $
Author:
P. Lemkin, NCI-Frederick, Frederick, MD, 21702

Field Summary
 boolean areaCalibFlag
          use Area calibration in OD/mm**2 if set
 CalibrateOD calib
          (Optional) list of sample's grayscale to calibrated units calibrations.
static int CALIB_MHZ_RT
          (MHZ,RT) calibration type
static int CALIB_MW_PIE
          (MW,pIE) calibration type
static int CALIB_PIECEWISE_LINEAR
          Piecewise-linear curve fitting type
static int CALIB_SMOOTH
          Smooth curve fitting type
 java.lang.String calibName
          name of calibration
 int calibType
          domain type of calibration: CALIB_MW_PIE or CALIB_MHZ_RT
 int curveFittingType
          smoothing type of calibration: CALIB_PIECEWISE_LINEAR or CALIB_SMOOTH
 float exposureCorrectionFactor
          (Optional) exposure correction or decay factor such as might be used to correct for delays in scanning after a pulse label.
 int maxCalibrations
          Number of calibrations
 int nXRspots
          # of pIe or RT X calib spots
 int nYRspots
          # of MW or mhz Y calib spots
 float pixelResolutionMicrons
          Resolution of scan data.
 int pixXsize
          max # columns in CSD virtual database
 int pixYsize
          max # rows in CSD virtual database
 int[] rspot_Xcalib
          [0:maxCalibrations-1] for [0:nXRspots-1] Rspot# for xCoord[] point
 int[] rspot_Ycalib
          [0:maxCalibrations-1] for [0:nYRspots-1] Rspot# for yCoord[] point
 boolean useCalibFlag
          if calibration was performed for rSampleName.
static java.lang.String VERSION
          Version for this module
 float[] xCalib
          [0:maxCalibrations-1] corresponding calibration value
 float[] xCoord
          [0:maxCalibrations-1] X coordinate for pIe
 java.lang.String xName
          name of X-axis isoelectric point : "pIe" or Retention time "RT"
 java.lang.String xUnits
          Scale UNITS of X-axis : "pH" or "seconds"
 float[] yCalib
          [0:maxCalibrations-1] corresponding calibration value
 float[] yCoord
          [0:maxCalibrations-1] Y coordinate for MW
 java.lang.String yName
          name of Y-axis Molecular Mass: "mw" or Mass size "mhz"
 java.lang.String yUnits
          Scale UNITS of Y-axis : "Dalton"
 
Fields inherited from class O2Plib.db.CSD.CSDglb
allSetSamples, AP, batchDir, BF_IS_LMS_SPOT, BF_ISVALIDSPOT, cacheDir, cdbIsOpenFlag, condListDB, CONSOLE_FLAG, CP, CSD_DBTYPE_CACHE, CSD_DBTYPE_RDBMS, CSD_DBTYPE_TAB_DELIM, CSD_DBTYPE_UNKNOWN, CSD_DBTYPE_XML, csdAcc, csdCache, csdCacheFile, csdDatabaseFile, csdFormatMode, csdIO, csdLMS, csdName, csdRdbmsFile, csdSizes, csdTabDelimFile, csdTotals, CSDversion, csdXMLfile, dataFiltersListDB, dateCreation, dateLastSession, dbRsample, dbSample, dbSamplesListDB, dbSPFlistsDB, dBugLMsetNbr, dBugPspotNbr, dBugRspotNbr, dBugSampleNbr, EP, epSetSamples, exprListsDB, GS, LM, MAX_NODE_SAFTY_FACTOR, mrl, nbrTimesInitialized, nCondListDB, nDataFiltersDB, needToSaveCSDdataFlag, NEVER, nExprListsDB, nOclDB, nodeSaftyFactor, normListDB, nRmapsDB, nRspotListsDB, nSamplesDB, nSPFfilesUsedDB, nSPFlistsDB, oclListDB, oclNameDB, PP, ppxDir, projDir, rdbmsDir, rMapsListDB, RSAMPLE, rspotListsDB, SAMPLE, sampleNamesDB, sampleNamesUsedDB, SP, tmpDir, US, useInternalDTDflag, wrkAnotation, wrkCalib, wrkERspot, wrkExpr, wrkSetSamples, xmlDir, xSetSamples, ySetSamples
 
Constructor Summary
CSDcal()
          CSDcal() - Constructor for new CSDcal.
 
Method Summary
 boolean createCalibrationMaps(int curveFittingType)
          createCalibrationMaps() - calibrate X and Y calibration sets using either piecewise-linear or smooth curve fitting [TODO]
 float getCalibratedXvalue(float x)
          getCalibratedXvalue() - map X coordinate to calibrated value [TODO]
 float getCalibratedYvalue(float y)
          getCalibratedYvalue() - map X coordinate to calibrated value [TODO]
static java.lang.String getTabDelimitedFields()
          getTabDelimitedFields() - get a string representation of the tab-delimited data fields
 boolean initCal(java.lang.String calibName, int calibType)
          initCal() - initialize calibration [TODO] add data...
 void set_exposure_correction(float eFactor)
          set_exposure_correction() - set the exposure correction factors (eFactor) for all samples in the database.
 boolean setCalData(float[] xCalib, float[] xCoord, float[] yCalib, float[] yCoord)
          setCalData() - set the calibration data lists
 boolean setCalDataNames(java.lang.String xName, java.lang.String xUnits, java.lang.String yName, java.lang.String yUnits)
          setCalDataNames() - set the calibration data names
 java.lang.String toString()
          toString() - get a pretty-print string representation of this instance
 java.lang.String toStringFull()
          toStringFull() - get a pretty-print string representation of this instance including the expanded calibration data
 java.lang.String toTabDelimitedData()
          toTabDelimitedData() - get a string representation of this instance as tab-delimited data values
 java.lang.String toXML()
          toXML() - get a string representation of this instance as XML
 
Methods inherited from class O2Plib.db.CSD.CSDglb
initGlb
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
Version for this module

See Also:
Constant Field Values

CALIB_MW_PIE

public static final int CALIB_MW_PIE
(MW,pIE) calibration type

See Also:
Constant Field Values

CALIB_MHZ_RT

public static final int CALIB_MHZ_RT
(MHZ,RT) calibration type

See Also:
Constant Field Values

CALIB_PIECEWISE_LINEAR

public static final int CALIB_PIECEWISE_LINEAR
Piecewise-linear curve fitting type

See Also:
Constant Field Values

CALIB_SMOOTH

public static final int CALIB_SMOOTH
Smooth curve fitting type

See Also:
Constant Field Values

calibName

public java.lang.String calibName
name of calibration


calibType

public int calibType
domain type of calibration: CALIB_MW_PIE or CALIB_MHZ_RT


curveFittingType

public int curveFittingType
smoothing type of calibration: CALIB_PIECEWISE_LINEAR or CALIB_SMOOTH


areaCalibFlag

public boolean areaCalibFlag
use Area calibration in OD/mm**2 if set


useCalibFlag

public boolean useCalibFlag
if calibration was performed for rSampleName.


pixelResolutionMicrons

public float pixelResolutionMicrons
Resolution of scan data. 0 means uncalibrated - [redo] to list since sample dependent


pixXsize

public int pixXsize
max # columns in CSD virtual database


pixYsize

public int pixYsize
max # rows in CSD virtual database


yName

public java.lang.String yName
name of Y-axis Molecular Mass: "mw" or Mass size "mhz"


yUnits

public java.lang.String yUnits
Scale UNITS of Y-axis : "Dalton"


xName

public java.lang.String xName
name of X-axis isoelectric point : "pIe" or Retention time "RT"


xUnits

public java.lang.String xUnits
Scale UNITS of X-axis : "pH" or "seconds"


nXRspots

public int nXRspots
# of pIe or RT X calib spots


nYRspots

public int nYRspots
# of MW or mhz Y calib spots


maxCalibrations

public int maxCalibrations
Number of calibrations


xCalib

public float[] xCalib
[0:maxCalibrations-1] corresponding calibration value


yCalib

public float[] yCalib
[0:maxCalibrations-1] corresponding calibration value


xCoord

public float[] xCoord
[0:maxCalibrations-1] X coordinate for pIe


yCoord

public float[] yCoord
[0:maxCalibrations-1] Y coordinate for MW


rspot_Xcalib

public int[] rspot_Xcalib
[0:maxCalibrations-1] for [0:nXRspots-1] Rspot# for xCoord[] point


rspot_Ycalib

public int[] rspot_Ycalib
[0:maxCalibrations-1] for [0:nYRspots-1] Rspot# for yCoord[] point


calib

public CalibrateOD calib
(Optional) list of sample's grayscale to calibrated units calibrations. Units could be OD or other calibration units.


exposureCorrectionFactor

public float exposureCorrectionFactor
(Optional) exposure correction or decay factor such as might be used to correct for delays in scanning after a pulse label. Default is 1.0.

Constructor Detail

CSDcal

public CSDcal()
CSDcal() - Constructor for new CSDcal.

Method Detail

initCal

public boolean initCal(java.lang.String calibName,
                       int calibType)
initCal() - initialize calibration [TODO] add data...

Parameters:
calibName - is name of this calibration
calibType - is type of this calibration CALIB_MW_PIE or CALIB_MHZ_RT
Returns:
true if succeed

setCalDataNames

public boolean setCalDataNames(java.lang.String xName,
                               java.lang.String xUnits,
                               java.lang.String yName,
                               java.lang.String yUnits)
setCalDataNames() - set the calibration data names

Parameters:
xName - is name of this X axis
xUnits - is units of this X axis
yName - is name of this Y axis
yUnits - is units of this Y axis
Returns:
true if succeed

setCalData

public boolean setCalData(float[] xCalib,
                          float[] xCoord,
                          float[] yCalib,
                          float[] yCoord)
setCalData() - set the calibration data lists

Parameters:
xCalib - is calibration data of this X axis
xCoord - is coordinates of the X axis
yCalib - is calibration data of this Y axis
yCoord - is coordinates of the Y axis
Returns:
true if succeed

createCalibrationMaps

public boolean createCalibrationMaps(int curveFittingType)
createCalibrationMaps() - calibrate X and Y calibration sets using either piecewise-linear or smooth curve fitting [TODO]

Parameters:
curveFittingType - is CALIB_PIECEWISE_LINEAR or CALIB_SMOOTH
Returns:
true if succeed

getCalibratedXvalue

public float getCalibratedXvalue(float x)
getCalibratedXvalue() - map X coordinate to calibrated value [TODO]

Parameters:
x -
Returns:
calibrated value

getCalibratedYvalue

public float getCalibratedYvalue(float y)
getCalibratedYvalue() - map X coordinate to calibrated value [TODO]

Parameters:
y -
Returns:
calibrated value

set_exposure_correction

public void set_exposure_correction(float eFactor)
set_exposure_correction() - set the exposure correction factors (eFactor) for all samples in the database. The eFactor is the isotope exposure or decay correction factor. after a pulse label.

Parameters:
eFactor - exposure correction or decay factor such as might be used to correct for delays in scanning after a pulse label.

toString

public java.lang.String toString()
toString() - get a pretty-print string representation of this instance

Overrides:
toString in class java.lang.Object
Returns:
string representation of this instance

toStringFull

public java.lang.String toStringFull()
toStringFull() - get a pretty-print string representation of this instance including the expanded calibration data

Returns:
string representation of this instance

getTabDelimitedFields

public static java.lang.String getTabDelimitedFields()
getTabDelimitedFields() - get a string representation of the tab-delimited data fields

Returns:
string representation of this instance

toTabDelimitedData

public java.lang.String toTabDelimitedData()
toTabDelimitedData() - get a string representation of this instance as tab-delimited data values

Returns:
string representation of this instance, no "\n"

toXML

public java.lang.String toXML()
toXML() - get a string representation of this instance as XML

Returns:
string representation of this instance