O2Plib.db
Class DbPspot

java.lang.Object
  extended by O2Plib.db.DbBaseSpot
      extended by O2Plib.db.DbPspot

public class DbPspot
extends DbBaseSpot

Class DbPspot contains the Composite Sample Database (CSD) spot. This extends DbBaseSpot with fields to encode a single spot pair - i.e., data from both spots in the pair between an Rsample an a Sample. It is used in building the CSD and in data mining.

This includes some fields from the GELLAB-II cgelp2/glbcgl.h gSpot_t typedef.


 This file is derived from Open2Dprot, MAExplorer and GELLAB-II code
 with structures generated by CmpSpots present in the XML SPF data file.

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/09/12 21:11:01 $ $Revision: 1.14 $
Author:
P. Lemkin, NCI-Frederick, Frederick, MD, 21702

Field Summary
 int ccOfGroup
          cc of group Rsample spot belongs to if any
 boolean lmFlag
          set true if spot is a landmark spot
 int rArea
          spot Rsample area in pixels
 float rDensity
          Rsample spot density not corrected for background
 float rDprime
          Rsample Spot density in D' (density corrected for background by subtracting mnBackground*area .
 int rDxLM
          X distance Rsample spot (x,y) relative to Rsample LM(x,y)
 int rDyLM
          Y distance Rsample spot (x,y) relative to Rsample LM(x,y)
 float rMaxDens
          max Rsample pixel density seen in spot
 int rMerx1
          Rsample Spot minimum enclosing rectangle Left in pixel coords
 int rMerx2
          Rsample Spot minimum enclosing rectangle Right in pixel coords
 int rMery1
          Rsample Spot minimum enclosing rectangle Top in pixel coords
 int rMery2
          Rsample Spot minimum enclosing rectangle Bottom in pixel coords
 float rMinDens
          min Rsample pixel density seen in spot
 float rMnBkgdDens
          Mean Background pixel density for the G1 spot.
 int rNbrCsamples
          # of samples in Rsample Cspot Csample' estimate if not 0.
 int rPerimeter
          Rsample spot perimeter (pixels) for spot
 float rSDarea
          Rsample Csample' S.D.
 float rSDdPrime
          Rsample Csample' S.D.
 float rSDxCentroid
          Rsample Csample' S.D.
 float rSDyCentroid
          Rsample Csample' S.D.
 int rSpotNbr
          spot Rsample spot number
 int rSpotOfGroup
          NOTE: not used - Rspot group to which this spot belongs.
 float rSx
          Std Dev of Rsample density weighted X centroid
 float rSy
          Std Dev of Rsample density weighted Y centroid
 float rVolume
          Rsample Spot volume (density corrected for background by subtracting mnBackground*area .
 int sArea
          spot Sample area in pixels
 float sDensity
          Sample spot density not corrected for background
 float sDprime
          Sample Spot density in D' (density corrected for background by subtracting mnBackground*area .
 int sDxLM
          X distance Sample spot (x,y) relative to Sample LM(x,y)
 int sDyLM
          Y distance Sample spot (x,y) relative to Sample LM(x,y)
 float sMaxDens
          max Sample pixel density seen in spot
 int sMerx1
          Sample Spot minimum enclosing rectangle Left in pixel coords
 int sMerx2
          Sample Spot minimum enclosing rectangle Right in pixel coords
 int sMery1
          Sample Spot minimum enclosing rectangle Top in pixel coords
 int sMery2
          Sample Spot minimum enclosing rectangle Bottom in pixel coords
 float sMinDens
          min Sample pixel density seen in spot
 float sMnBkgdDens
          Mean Background pixel density for the G2 spot.
 int sNbrCsamples
          # of samples in Sample Cspot Csample' estimate if not 0.
 int sPerimeter
          Sample spot perimeter (pixels) for spot
 float sSDarea
          Sample Csample' S.D.
 float sSDdPrime
          Sample Csample' S.D.
 float sSDxCentroid
          Sample Csample' S.D.
 float sSDyCentroid
          Sample Csample' S.D.
 int sSpotNbr
          spot Sample spot number
 float sSx
          Std Dev of Sample density weighted X centroid
 float sSy
          Std Dev of Sample density weighted Y centroid
 float sVolume
          Sample Spot volume (density corrected for background by subtracting mnBackground*area .
static java.lang.String VERSION
          Version for this module
 float xRmom
          X Abs Rsample(x,y) spot centroid
 float xSmom
          X Abs Sample(x,y) spot centroid
 float yRmom
          Y Abs Rsample(x,y) spot centroid
 float ySmom
          Y Abs Sample(x,y) spot centroid
 
Fields inherited from class O2Plib.db.DbBaseSpot
AP, APCOLOR, bestPairedSpot, BF_DISPLAY_SPOT, BF_FAILED_SXSYR1RANGE, BF_FAILED_SXSYR2RANGE, BF_FAILED_T1AREA, BF_FAILED_T1DENSITY, BF_FAILED_T1DENSRANGE, BF_FAILED_T2AREA, BF_FAILED_T2DENSITY, BF_FAILED_T2DENSRANGE, BF_ISVALIDSPOT, bitFeatures, code, CP, CPCOLOR, dbRsample, dbSample, dL, dP, EP, EPCOLOR, GS, idxRsample, idxSample, LM, LMCOLOR, lmNbrI, lmNbrS, LMSETCOLOR, MAX_SPOT_SUBLIST_SIZE, nextLMspot, nextSpot, nSample, PP, PPCOLOR, prevSpot, RSAMPLE, RSPOTCOLOR, rSpotNext, SAMPLE, SP, SPCOLOR, SPOT_FEATURE_AREA, SPOT_FEATURE_DENS_PCT, SPOT_FEATURE_DENS_PRIME, SPOT_FEATURE_DENSITY, SPOT_FEATURE_MAX_DENS, SPOT_FEATURE_MEAN_DENSITY, SPOT_FEATURE_MIN_DENS, SPOT_FEATURE_VOLUME, SPOTBOXCOLOR, spotNumber, swappedRsampleAndSampleFlag, US, USCOLOR
 
Constructor Summary
DbPspot()
           
DbPspot(DbSample dbSample)
          DbPspot() - Constructor for new DbPspot.
DbPspot(DbSample dbRsample, DbSample dbSample)
          DbPspot() - Constructor for new DbPspot.
 
Method Summary
 void clearRsampleValues()
          clearRsampleValues() - clear Rsample values in this spot.
 DbPspot clonePspot()
          clonePspot() - clone spot sp into this spot.
 DbPspot clonePspotRsample()
          clonePspotRsample() - clone spot sp into this spot.
 void copyRsampleToSampleSpotValues()
          copyRsampleToSampleSpotValues() - copy Rsample field values in this Pspot to the Sample field values.
 boolean copySpotValues(DbPspot sp, boolean copyPointersFlag)
          copySpotValues() - copy values in spot sp into this spot.
static java.lang.String getSampleOnlyHeaderNames()
          getSampleOnlyHeaderNames() - get row of space-separated names of fields used in either toStringSampleOnly() or toStringRsampleOnly() calls.
static java.lang.String getTabDelimitedFields()
          getTabDelimitedFields() - get a string representation of the tab-delimited data fields
 boolean isLandmarkSpot()
          isLandmarkSpot() - test if sample's ccNbr spot is a landmark spot.
 void swapSampleValues()
          swapSampleValues() - swap the Rsample and Sample field values
 java.lang.String toBriefString()
          toBriefString() - get brief DbPspot features string of the spot.
 java.lang.String toBriefXML()
          toBriefXML() - get a brief string representation of this instance as XML.
 java.lang.String toDxyBriefString()
          toDxyBriefString() - get brief DbPspot features string of the spot.
 java.lang.String toDxyDpDlBriefString()
          toDxyDpDlBriefString() - get brief DbPspot features string of the spot.
 java.lang.String toFullXML()
          toFullXML() - get a full string representation of this instance as XML.
 java.lang.String toString()
          toString() - get DbPspot features string of the spot.
 java.lang.String toStringRsampleOnly()
          toStringRsampleOnly() - get only Rsample DbPspot features of the spot.
 java.lang.String toStringSampleOnly()
          toStringSampleOnly() - get only Sample DbPspot features of the spot.
 java.lang.String toTabDelimitedData()
          toTabDelimitedData() - get a string representation of this instance as tab-delimited data values
 java.lang.String toXML()
          toXML() - get a full string representation of this instance as XML.
 java.lang.String toXML(boolean useFullFlag)
          toXML() - get a string representation of this instance as XML.
 
Methods inherited from class O2Plib.db.DbBaseSpot
copyBaseValues, copyRsampleToSampleBaseValues, setDbSamples, swapBaseValues, verifyNotCircularSSFlist
 
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

rSpotNbr

public int rSpotNbr
spot Rsample spot number


sSpotNbr

public int sSpotNbr
spot Sample spot number


rArea

public int rArea
spot Rsample area in pixels


sArea

public int sArea
spot Sample area in pixels


ccOfGroup

public int ccOfGroup
cc of group Rsample spot belongs to if any


lmFlag

public boolean lmFlag
set true if spot is a landmark spot


rDxLM

public int rDxLM
X distance Rsample spot (x,y) relative to Rsample LM(x,y)


rDyLM

public int rDyLM
Y distance Rsample spot (x,y) relative to Rsample LM(x,y)


sDxLM

public int sDxLM
X distance Sample spot (x,y) relative to Sample LM(x,y)


sDyLM

public int sDyLM
Y distance Sample spot (x,y) relative to Sample LM(x,y)


rPerimeter

public int rPerimeter
Rsample spot perimeter (pixels) for spot


sPerimeter

public int sPerimeter
Sample spot perimeter (pixels) for spot


rSpotOfGroup

public int rSpotOfGroup
NOTE: not used - Rspot group to which this spot belongs. For example, a Rspot group may be used to group together spots in a post-translational modification list.


xRmom

public float xRmom
X Abs Rsample(x,y) spot centroid


yRmom

public float yRmom
Y Abs Rsample(x,y) spot centroid


xSmom

public float xSmom
X Abs Sample(x,y) spot centroid


ySmom

public float ySmom
Y Abs Sample(x,y) spot centroid


rDensity

public float rDensity
Rsample spot density not corrected for background


sDensity

public float sDensity
Sample spot density not corrected for background


rDprime

public float rDprime
Rsample Spot density in D' (density corrected for background by subtracting mnBackground*area .


sDprime

public float sDprime
Sample Spot density in D' (density corrected for background by subtracting mnBackground*area .


rVolume

public float rVolume
Rsample Spot volume (density corrected for background by subtracting mnBackground*area .


sVolume

public float sVolume
Sample Spot volume (density corrected for background by subtracting mnBackground*area .


rMaxDens

public float rMaxDens
max Rsample pixel density seen in spot


sMaxDens

public float sMaxDens
max Sample pixel density seen in spot


rMinDens

public float rMinDens
min Rsample pixel density seen in spot


sMinDens

public float sMinDens
min Sample pixel density seen in spot


rMerx1

public int rMerx1
Rsample Spot minimum enclosing rectangle Left in pixel coords


rMerx2

public int rMerx2
Rsample Spot minimum enclosing rectangle Right in pixel coords


rMery1

public int rMery1
Rsample Spot minimum enclosing rectangle Top in pixel coords


rMery2

public int rMery2
Rsample Spot minimum enclosing rectangle Bottom in pixel coords


sMerx1

public int sMerx1
Sample Spot minimum enclosing rectangle Left in pixel coords


sMerx2

public int sMerx2
Sample Spot minimum enclosing rectangle Right in pixel coords


sMery1

public int sMery1
Sample Spot minimum enclosing rectangle Top in pixel coords


sMery2

public int sMery2
Sample Spot minimum enclosing rectangle Bottom in pixel coords


rMnBkgdDens

public float rMnBkgdDens
Mean Background pixel density for the G1 spot.


sMnBkgdDens

public float sMnBkgdDens
Mean Background pixel density for the G2 spot.


rSx

public float rSx
Std Dev of Rsample density weighted X centroid


rSy

public float rSy
Std Dev of Rsample density weighted Y centroid


sSx

public float sSx
Std Dev of Sample density weighted X centroid


sSy

public float sSy
Std Dev of Sample density weighted Y centroid


rNbrCsamples

public int rNbrCsamples
# of samples in Rsample Cspot Csample' estimate if not 0. It can also be 1 which indicates that there is no Cspot.


rSDxCentroid

public float rSDxCentroid
Rsample Csample' S.D. of X centroid means


rSDyCentroid

public float rSDyCentroid
Rsample Csample' S.D. of Y centroid means


rSDdPrime

public float rSDdPrime
Rsample Csample' S.D. of D' means


rSDarea

public float rSDarea
Rsample Csample' S.D. of area means


sNbrCsamples

public int sNbrCsamples
# of samples in Sample Cspot Csample' estimate if not 0. It can also be 1 which indicates that there is no Cspot.


sSDxCentroid

public float sSDxCentroid
Sample Csample' S.D. of X centroid means


sSDyCentroid

public float sSDyCentroid
Sample Csample' S.D. of Y centroid means


sSDdPrime

public float sSDdPrime
Sample Csample' S.D. of D' means


sSDarea

public float sSDarea
Sample Csample' S.D. of area means

Constructor Detail

DbPspot

public DbPspot()

DbPspot

public DbPspot(DbSample dbSample)
DbPspot() - Constructor for new DbPspot. All other fields default to null or zero.

Parameters:
dbSample - for this spot

DbPspot

public DbPspot(DbSample dbRsample,
               DbSample dbSample)
DbPspot() - Constructor for new DbPspot. All other fields default to null or zero.

Parameters:
dbRsample - is sample for pairing with this spot
dbSample - for this spot
Method Detail

isLandmarkSpot

public boolean isLandmarkSpot()
isLandmarkSpot() - test if sample's ccNbr spot is a landmark spot.

Parameters:
ps - is DbPspot to test
Returns:
value

clonePspot

public DbPspot clonePspot()
clonePspot() - clone spot sp into this spot. Note: copy arrays or string objects by reference

Returns:
Cloned DPspot if succeed, else null

clonePspotRsample

public DbPspot clonePspotRsample()
clonePspotRsample() - clone spot sp into this spot. Note: copy arrays or string objects by reference

Returns:
Cloned DPspot if succeed, else null

copySpotValues

public boolean copySpotValues(DbPspot sp,
                              boolean copyPointersFlag)
copySpotValues() - copy values in spot sp into this spot. Note: copy arrays or string objects by reference

Parameters:
sp - is spot
copyPointersFlag - to copy spot pointers as well
Returns:
true if succeed.

copyRsampleToSampleSpotValues

public void copyRsampleToSampleSpotValues()
copyRsampleToSampleSpotValues() - copy Rsample field values in this Pspot to the Sample field values. Note other field items are shared.


swapSampleValues

public void swapSampleValues()
swapSampleValues() - swap the Rsample and Sample field values


clearRsampleValues

public void clearRsampleValues()
clearRsampleValues() - clear Rsample values in this spot.


toDxyDpDlBriefString

public java.lang.String toDxyDpDlBriefString()
toDxyDpDlBriefString() - get brief DbPspot features string of the spot. Features: spot# rsSpt# rsIdx code LM dP dL rsDxy rsXY rsA rsD'

Returns:
converted brief string

toDxyBriefString

public java.lang.String toDxyBriefString()
toDxyBriefString() - get brief DbPspot features string of the spot. Features: spot# rsSpot# rsIdx code LM rsDxy rsXY rsA rsD'

Returns:
converted brief string

toBriefString

public java.lang.String toBriefString()
toBriefString() - get brief DbPspot features string of the spot. Features: spot# rsSpot# rsIdx code LM rsDxy rsXY rsA rsD'

Returns:
converted brief string

toString

public java.lang.String toString()
toString() - get DbPspot features string of the spot.

Overrides:
toString in class java.lang.Object
Returns:
converted string

getSampleOnlyHeaderNames

public static java.lang.String getSampleOnlyHeaderNames()
getSampleOnlyHeaderNames() - get row of space-separated names of fields used in either toStringSampleOnly() or toStringRsampleOnly() calls.

Returns:
header line
See Also:
toStringSampleOnly

toStringSampleOnly

public java.lang.String toStringSampleOnly()
toStringSampleOnly() - get only Sample DbPspot features of the spot. Use 1 line format with no labels - just space or tab Note: the

Returns:
converted string

toStringRsampleOnly

public java.lang.String toStringRsampleOnly()
toStringRsampleOnly() - get only Rsample DbPspot features of the spot. Use 1 line format with no labels - just space or tab

Returns:
converted string

getTabDelimitedFields

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

Returns:
string representation of the fields, with no "\n"

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, with no "\n"

toBriefXML

public java.lang.String toBriefXML()
toBriefXML() - get a brief string representation of this instance as XML. Just list values. Do Not include the sample names.

Returns:
string representation of this instance

toFullXML

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

Returns:
string representation of this instance

toXML

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

Returns:
string representation of this instance

toXML

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

Parameters:
useFullFlag - add full details else just brief summary
Returns:
string representation of this instance