|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object O2Plib.db.CSD.CSDglb O2Plib.db.CSD.CSDRspot
public class CSDRspot
Class CSDRspot is an ERspot for the Composite Samples Database (CSD).
An Rspot set is an ordered list of corrersponding DbPspots from the samples in the CSD. Spot labels may be SP, PP, AP, US from the DbPairSamples DbPspot data. Spots that are SP, PP or AP are assigned as Rspots. If the US is an Rsample spot, then it too is an Rspot. Subsequently, if the Rsample is an AP label and it is a Rspot then it will be upgraded to a SP or PP as subsequent spot pairs are read into the Rspot set.
In addition, if the spot pair is a US with the Sample (Rsample has no spot), then that spot is added as an extended Rspot or ERspot set. If it is within a small mapped distance threshold (eRspotDistThr) to an existing ERspot, it is added to that ERspot set - otherwise a new ERspot is created. If the Rspot set is an ERspot set, the eRspotFlag is set.
The (xRspot,yRspot) coordinates are the centroid values of the Rsample spot (if it exists) and the idRsampleSpot is set to the Rsample spot idNbr for that spot. If the Rspot set is an ERspot set, then the (xRspot,yRspot) is set to (xERspot, yERspot).
The ERspot is used when reading in US spots from SPF files in order to determine if the US spot (not in the Rsample) should join an existing eRspot or create a new one if it is too far away.
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/.
Field Summary | |
---|---|
CSDannotation |
annotation
Spot annotation |
static int |
ERSPOT_DIST_THR
Default distance threshold for restricting adding spots to ERspot sets if the distance to a potential spot to be added with the (xERspot,yERspot) distance is LEQ this distance. |
static float |
eRspotDistThr
Restrict adding spots to ERspot sets if the distance to a potential spot to be added with the (xERspot,yERspot) distance is LEQ this distance. |
boolean |
eRspotFlag
This Rspot is an eRspot (extrapolated Rspot) |
static int |
globalRspotCtr
global Rspot set counter to generate new Rspot set IDs in the init() method. |
int |
idNbr
Rspot set number [1:max # of Rspots]. |
int |
idRsampleSpot
The DbPspot rSpotNbr idNbr from the Rsample spot if it exists (i.e. |
int[] |
idxCondList
List of indices constituting the corresponding CSDcond for each entry in the Rspot set. |
int[] |
idxSampleList
List of indices [0:nSpots-1] constituting the corresponding DbSamples for each entry in the Rspot set. |
int |
indexRsample
Index of Rsample in this.idxSampleList[]. |
int |
lmSetRsample
LMset that the Rsample belongs to |
int |
maxSpots
Maximum number of spots in the Rspot set |
float[] |
mnCarea
Mean area for Rspots being analyzed for condition subsets. |
float[] |
mnCdPrime
Mean D' for entire Rspot set for condition subsets. |
float[] |
mnCnormDensity
mean normalized density for Rspots being analyzed for condition subsets. |
float |
mnCVdensity
Mean Coef. |
float |
mnXcentroid
Mean Xabs (Rsample space) for entire Rspot set in to the Rsample cartesian space. |
float |
mnYcentroid
Mean Yabs (Rsample space) for entire Rspot set in to the Rsample cartesian space. |
int[] |
nCsample
# of samples in the Condition subset of the Rspot set. |
CSDRspot |
nextRspot
Next instance for list of Rspots linked list |
CSDnorm |
norm
Rspot set normalization method |
int |
nSpots
Number of spots in the Rspot set |
DbPspot |
rSamplePspot
The DbSpot for the Rsample Rspot. |
float |
rspCV
sum of coefficient of variation (COV) density for entire Rspot set. |
float |
rspCVsq
Square of sum of COV Density. |
static int |
RSPOT_DIST_THR
Default distance threshold for restricting adding spots to Rspot sets if the distance to a potential spot to be added with the (xRspot,yRspot) distance is LEQ this distance. |
static float |
rSpotDistThr
Restrict adding spots to Rspot sets if the distance to a potential spot to be added with the (xRspot,yRspot) distance is LEQ this distance. |
float[] |
sdMnCarea
S.D. |
float[] |
sdMnCdPrime
S.D. |
float[] |
sdMnCnormDensity
S.D. |
float |
sdMnXcentroid
S.D. |
float |
sdMnYcentroid
S.D. |
DbPspot[] |
spotList
List of DbPspots constituting the Rspot set [0:nSpots-1]. |
float |
sumCVdensitySq
sum of squares of all rSpCV |
static java.lang.String |
VERSION
Version for this module |
float |
xERspot
Estimated X centroid coordinate of ERspot mapped to the Rsample coordinate space.This is created only if the Rspot is an ERspot. |
float |
xRspot
X coordinate of Rsample Rspot. |
float |
yERspot
Estimated Y centroid coordinate of ERspot mapped to the Rsample coordinate space. |
float |
yRspot
Y coordinate of Rsample Rspot. |
Constructor Summary | |
---|---|
CSDRspot()
CSDRspot() - Constructor for new CSDRspot. |
|
CSDRspot(int maxSpots)
CSDRspot() - Constructor for new CSDRspot. |
Method Summary | |
---|---|
boolean |
add(DbPspot ps)
add() - add DbPspot to the Rspot set spotList[] list if the pairing code is SP, PP, AP, or (US with (xRmom,yRmom) NEQ 0). |
boolean |
add2ERspot(DbPspot ps)
add2ERspot() - add DbPspot to ERspot set. |
boolean |
calcXYeRspotCentroid()
calcXYeRspotCentroid() - compute (xERspot,yERspot) estimated centroid of ERspot data using non-Rsample Pspots which must exist. |
void |
clear()
clear() - clear CSDRspot. |
CSDRspot |
cloneIt()
cloneIt() - clone the contents of this Rspot. |
void |
copy(CSDRspot r)
copy() - copy the contents of Rspot r to this Rspot. |
CSDnorm |
getNormalization()
getNormalization() - set normalization for Rspot set. |
float[] |
getNormalizedDprimeData()
getNormalizedDprimeData() - get normalized D' spot intensity for Rspot set. |
static java.lang.String |
getTabDelimitedFields(boolean useAnnotationFlag,
boolean useNormFlag)
getTabDelimitedFields() - get a string representation of the tab-delimited data fields |
float[] |
getUnNormalizedDprimeData()
getUnNormalizedDprimeData() - get unnormalized D' spot intensity for Rspot set. |
void |
init(int maxSpots)
init() - initialize CSDRspot structures. |
DbPspot |
lookupBestDbPspotBySampleIdx(int idxSample)
lookupBestDbPspotBySampleIdx() - find best DbPspot from Rspot set by sample index. |
boolean |
regrow(int newSize)
regrow() - increase the size of the Rspot set |
boolean |
remove(DbPspot ps)
remove() - remove DbPspot from Rspot set. |
boolean |
remove(int idxSample)
remove() - remove DbPspot from Rspot set by sample index. |
boolean |
rightSize()
rightSize() - right-size the size of the Rspot set to nSpots. |
CSDannotation |
setAnnotation()
getAnnotation() - set annotation for Rspot set. |
void |
setAnnotation(CSDannotation annotation)
setAnnotation() - set annotation to Rspot set. |
static void |
setERspotDistanceThr(float eRspotDistanceThr)
setERspotDistanceThr() - set threshold to restrict adding spots to ERspot sets if the distance to a potential spot to be added with the (xERspot,yERspot) distance is LEQ this distance. |
void |
setERspotFlag(boolean eRspotFlag)
setERspotFlag() - set the eRspot flag |
void |
setLMsetRsample(int lmSetRsample)
setLMsetRsample() - set the LMset number associated with this spot for the Rsample |
void |
setNormalization(CSDnorm norm)
setNormalization() - set annotation to Rspot set. |
static void |
setRspotDistanceThr(float rSpotDistanceThr)
setRspotDistanceThr() - set threshold to restrict adding spots to Rspot sets if the distance to a potential spot to be added with the (xRspot,yRspot) distance is LEQ this distance. |
void |
setXYeRspotCoords(float xERspot,
float yERspot)
setXYeRspotCoords() - set the (xERspot,yERspot) for this eRspot set |
void |
setXYrspotCoords(float xRspot,
float yRspot)
setXYrspotCoords() - set the (xRspot,yRspot) for this Rspot set |
boolean |
sort(int sortByType)
sort() - sort the Rspot set in ascending order by the feature specified by sortByType. |
java.lang.String |
toBriefXML()
toBriefXML() - get a brief string representation of this instance as XML. |
java.lang.String |
toFullXML()
toFullXML() - get a full string representation of this instance as XML. |
java.lang.String |
toString()
toString() - print DbRspot features of the spot. |
java.lang.String |
toStringFull()
toStringFull() - print DbRspot full features of the spot. |
java.lang.String |
toStringPointers()
toStringPointers() - print DbRspot pointers of the spot. |
java.lang.String |
toStringStatistics()
toStringStatistics() - print DbRspot statistics of the Rspot set. |
java.lang.String |
toTabDelimitedData(java.lang.String rowPrefix,
boolean useAnnotationFlag,
boolean useNormFlag)
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 useFullRspotFlag)
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 |
---|
public static final java.lang.String VERSION
public static int RSPOT_DIST_THR
public static int ERSPOT_DIST_THR
public static int globalRspotCtr
public int idNbr
public int idRsampleSpot
public DbPspot rSamplePspot
public float xRspot
public float yRspot
public int lmSetRsample
public static float rSpotDistThr
public static float eRspotDistThr
public boolean eRspotFlag
public float xERspot
public float yERspot
public int nSpots
public int maxSpots
public DbPspot[] spotList
public int[] idxSampleList
public int indexRsample
public CSDannotation annotation
public CSDnorm norm
public int[] idxCondList
public int[] nCsample
public float[] mnCdPrime
public float[] mnCnormDensity
public float[] mnCarea
public float[] sdMnCdPrime
public float[] sdMnCnormDensity
public float[] sdMnCarea
public float mnXcentroid
public float mnYcentroid
public float sdMnXcentroid
public float sdMnYcentroid
public float rspCV
public float rspCVsq
public float mnCVdensity
public float sumCVdensitySq
public CSDRspot nextRspot
Constructor Detail |
---|
public CSDRspot()
public CSDRspot(int maxSpots)
maxSpots
- is the maximum number of spots preallocated
for this Rspot set.Method Detail |
---|
public void clear()
clear
in interface CSDlistInterface
public void setERspotFlag(boolean eRspotFlag)
eRspotFlag
- is flag value to setpublic void setLMsetRsample(int lmSetRsample)
lmSetRsample
- is the landmark set number if not -1public void setXYrspotCoords(float xRspot, float yRspot)
xRspot
- is value to setyRspot
- is value to setpublic void setXYeRspotCoords(float xERspot, float yERspot)
xERspot
- is value to setyERspot
- is value to setpublic static void setRspotDistanceThr(float rSpotDistanceThr)
rSpotDistanceThr
- distance to use.
If it is <= 0, use RSPOT_DIST_THRpublic static void setERspotDistanceThr(float eRspotDistanceThr)
eRspotDistanceThr
- distance to use.
If it is <= 0, use ERSPOT_DIST_THRpublic void init(int maxSpots)
init
in interface CSDlistInterface
maxSpots
- is the maximum number of spots preallocated
for this Rspot set.public void copy(CSDRspot r)
r
- is Rspot to copypublic CSDRspot cloneIt()
public boolean sort(int sortByType)
sortByType
- - (will be feature type)
public boolean regrow(int newSize)
regrow
in interface CSDlistInterface
newSize
- is new size of Rspot set
public boolean rightSize()
rightSize
in interface CSDlistInterface
public boolean add(DbPspot ps)
ps
- is the DbPspot to add
public boolean add2ERspot(DbPspot ps)
ps
- is the DbPspot to add. It must be a US spot with
(xRmom,yRmom) EQ 0.
public boolean calcXYeRspotCentroid()
public boolean remove(DbPspot ps)
ps
- is the DbPspot to remove
public boolean remove(int idxSample)
idxSample
- is the index of the spots for the Sample to remove
public DbPspot lookupBestDbPspotBySampleIdx(int idxSample)
idxSample
- is the index of the spots for the Sample
public void setAnnotation(CSDannotation annotation)
annotation
- to assign to the Rspot setpublic CSDannotation setAnnotation()
public void setNormalization(CSDnorm norm)
norm
- to assign to the Rspot setpublic CSDnorm getNormalization()
public float[] getNormalizedDprimeData()
public float[] getUnNormalizedDprimeData()
public java.lang.String toString()
toString
in interface CSDlistInterface
toString
in class java.lang.Object
DpSpot#toStringSampleOnly
public java.lang.String toStringFull()
public java.lang.String toStringPointers()
public java.lang.String toStringStatistics()
public static java.lang.String getTabDelimitedFields(boolean useAnnotationFlag, boolean useNormFlag)
useAnnotationFlag
- - to add annotation fieldsuseNormFlag
- - to add normalization fields
public java.lang.String toTabDelimitedData(java.lang.String rowPrefix, boolean useAnnotationFlag, boolean useNormFlag)
rowPrefix
- to add to each row if not nulluseAnnotationFlag
- - to add annotation fieldsuseNormFlag
- - to add normalization fields
public java.lang.String toBriefXML()
public java.lang.String toFullXML()
public java.lang.String toXML()
public java.lang.String toXML(boolean useFullRspotFlag)
useFullFlag
- add full details else just brief summary
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |