Class SampleSets

java.lang.Object
  |
  +--SampleSets

class SampleSets
extends java.lang.Object

The SampleSets class maintains the set of all HP samples, the HP-X set, HP-Y set and the HP-E list.

 List of sets of MaHybridSample sample instances in this class  
   msList[1:nHP]     is the set of all samples currently loaded in the database     
   msListX[1:nHP_X]  is the HP-X set samples  
   msListY[1:nHP_Y]  is the HP-Y set samples  
   msListE[1:nHP_E]  is the HP-E set samples 
The HPxyData class is used for computing means, stdDev, CVs for the HP-X and HP-Y sets.

The PopupHPChooser and PopupHPmenuGuesser classes create user GUI popup windows that are used to change these data structures.

The HP-E list is used for defining expression profiles (@see ExprProfile) that is used in expression profile plots and for computing cluster distances used in clustering methods.

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 MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2003/02/18 18:02:35 $ $Revision: $
Author:
P. Lemkin (NCI), G. Thornwall (SAIC), NCI-Frederick, Frederick, MD
See Also:
MAExplorer Home, ExprProfile, HPxyData, MaHybridSample, PopupHPChooser, PopupHPmenuGuesser

Field Summary
(package private)  int idxRatioHP
           1/msRatioHP for ratio EP calcs.
private  MAExplorer mae
          link to global MAExplorer instance
(package private) static MaHybridSample[] msList
          total HP list [1:nHP] for all active samples
(package private) static MaHybridSample[] msListE
          Expression Profile [1:nHP_E]
(package private) static MaHybridSample[] msListX
          X-axis [1:nHP_X]
(package private) static MaHybridSample[] msListY
          Y-axis [1:nHP_Y]
private  java.lang.String[] nameList
          Names of samples for Cy5/Cy3 swap
(package private) static int nHP
          number of Samples in msList[]
(package private) static int nHP_E
          list H.P.
(package private) static int nHP_X
          list (set) Samples for X-axis msListX[]
(package private) static int nHP_Y
          list (set) Samples for Y-Axis msListY[]
(package private)  int nTopSubMenus
          number of top level menus
private  boolean[] oldValueList
          originbal list for Cy5/Cy3 swap if cancel
(package private)  java.lang.String sCy35
          "Cy3/Cy5" based on mae.cfg.fluoresLbl[12]
(package private)  java.lang.String sCy53
          "Cy5/Cy3" based on mae.cfg.fluoresLbl[12]
(package private)  java.lang.String sHPsetCy53
          may have " some HPs ("+sCy53+") swapped"
(package private)  java.lang.String sMod
          prefix title "" or " 'set'"
(package private)  java.lang.String sModX
          HP-X epilog "", sHPsetCy53, sCy35, sCy53
(package private)  java.lang.String sModXY
          either sModX or sModY depending on mode
(package private)  java.lang.String sModY
          HP-Y epilog "", sHPsetCy53, sCy35, sCy53
(package private)  java.lang.String[] topSubMenuNames
          The following are the order of the top level menus in the menu tree.
private  boolean[] valueList
          list for Cy5/Cy3 swap
 
Constructor Summary
(package private) SampleSets(MAExplorer mae)
          SampleSets() - constructor to create the sample lists.
 
Method Summary
(package private)  boolean addHPtoDB(MaHybridSample ms, int i)
          addHPtoDB() - set HP sample to active database entry i
(package private)  boolean addHPtoElist(MaHybridSample ms)
          addHPtoElist() - add HP sample to end of HP-E list
(package private)  boolean addHPtoXset(MaHybridSample ms)
          addHPtoXset() - add HP sample to HP-X set
(package private)  boolean addHPtoYset(MaHybridSample ms)
          addHPtoYset() - add HP sample to HP-Y set
(package private)  boolean addNewHPtoDB(MaHybridSample ms)
          addNewHPtoDB() - add new HP sample to end of active database list
private  void assignHPtoAxis(int n, int axis, MaHybridSample ms)
          assignHPtoAxis() - assign sample to current HP-X or HP-Y sample This is the default.
(package private)  void changeHPswapCy5Cy3Samples()
          changeHPswapCy5Cy3Samples() - popup scrollable GUI array of checkbox to change cy3/Cy5 swap flags msList[0:nHP-1].swapCy5Cy3DataFlags
(package private)  boolean chkSwapCy5Cy3(java.lang.String msListToCheck)
          chkSwapCy5Cy3() - test if HP-X, HP-Y or HP-E list have Cy3/Cy5 swap flag set.
(package private)  void copyValuesToMlistCy3Cy5Flags()
          copyValuesToMlistCy3Cy5Flags() - copy nameListCB[] state to valueList[]
(package private) static int lookupHPsampleNbr(MaHybridSample ms)
          lookupHPsampleNbr() - lookup MaHybidSample's sampleNbr.
(package private)  boolean rmvHPfromElist(MaHybridSample ms)
          rmvHPfromElist() - remove HP sample from HP-E list
(package private)  boolean rmvHPfromXset(MaHybridSample ms)
          rmvHPfromXset() - remove HP sample from HP-X set
(package private)  boolean rmvHPfromYset(MaHybridSample ms)
          rmvHPfromYset() - remove HP sample from HP-Y set
(package private)  boolean setHPlistsFromPARAM()
          setHPlistsFromPARAM() - set msList{X|Y|E}[] from PARAM cfg.{X|Y|E}list.
(package private)  void setHPxyModStrings()
          setHPxyModStrings() - set up (sMod, sModX, sModY, sModXY) state strings.
(package private)  void showHP_E_assignmentsPopup()
          showHP_E_assignmentsPopup() - make popup display of HP_E list of samples.
(package private)  void showHP_XY_assignmentsPopup()
          showHP_XY_assignmentsPopup() - make popup display of HP_X and HP-Y sample lists
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

mae

private MAExplorer mae
link to global MAExplorer instance

topSubMenuNames

java.lang.String[] topSubMenuNames
The following are the order of the top level menus in the menu tree. NOTE that the key words are in the Samples Table "Source" or "Probe" fields.

nTopSubMenus

int nTopSubMenus
number of top level menus

msListX

static MaHybridSample[] msListX
X-axis [1:nHP_X]

msListY

static MaHybridSample[] msListY
Y-axis [1:nHP_Y]

msListE

static MaHybridSample[] msListE
Expression Profile [1:nHP_E]

msList

static MaHybridSample[] msList
total HP list [1:nHP] for all active samples

nHP_X

static int nHP_X
list (set) Samples for X-axis msListX[]

nHP_Y

static int nHP_Y
list (set) Samples for Y-Axis msListY[]

nHP_E

static int nHP_E
list H.P. Samples for expr.profiles msListE[]

nHP

static int nHP
number of Samples in msList[]

idxRatioHP

int idxRatioHP
1/msRatioHP for ratio EP calcs.

sMod

java.lang.String sMod
prefix title "" or " 'set'"

sModX

java.lang.String sModX
HP-X epilog "", sHPsetCy53, sCy35, sCy53

sModY

java.lang.String sModY
HP-Y epilog "", sHPsetCy53, sCy35, sCy53

sModXY

java.lang.String sModXY
either sModX or sModY depending on mode

sCy35

java.lang.String sCy35
"Cy3/Cy5" based on mae.cfg.fluoresLbl[12]

sCy53

java.lang.String sCy53
"Cy5/Cy3" based on mae.cfg.fluoresLbl[12]

sHPsetCy53

java.lang.String sHPsetCy53
may have " some HPs ("+sCy53+") swapped"

nameList

private java.lang.String[] nameList
Names of samples for Cy5/Cy3 swap

valueList

private boolean[] valueList
list for Cy5/Cy3 swap

oldValueList

private boolean[] oldValueList
originbal list for Cy5/Cy3 swap if cancel
Constructor Detail

SampleSets

SampleSets(MAExplorer mae)
SampleSets() - constructor to create the sample lists.
Parameters:
mae - is MAExplorer instance
See Also:
MaHybridSample
Method Detail

lookupHPsampleNbr

static int lookupHPsampleNbr(MaHybridSample ms)
lookupHPsampleNbr() - lookup MaHybidSample's sampleNbr. Make sure it is legal return sampleNbr.
Parameters:
ms - is MaHybridSample. If null, return current HP
Returns:
corresponding sampleNbr else -1 if not found.

addHPtoDB

boolean addHPtoDB(MaHybridSample ms,
                  int i)
addHPtoDB() - set HP sample to active database entry i
Parameters:
ms - is sample to replace at entry i
i - is position of sample list to replace
Returns:
true if succeed.

addNewHPtoDB

boolean addNewHPtoDB(MaHybridSample ms)
addNewHPtoDB() - add new HP sample to end of active database list
Parameters:
ms - is sample to add
Returns:
true if succeed.

addHPtoXset

boolean addHPtoXset(MaHybridSample ms)
addHPtoXset() - add HP sample to HP-X set
Parameters:
ms - is sample to add to HP-X set
Returns:
true if succeed.
See Also:
MenuBarFrame.setHP_XYlabels(), Util.showMsg(java.lang.String), assignHPtoAxis(int, int, MaHybridSample)

addHPtoYset

boolean addHPtoYset(MaHybridSample ms)
addHPtoYset() - add HP sample to HP-Y set
Parameters:
ms - is sample to add to HP-Y set
Returns:
true if succeed.
See Also:
MenuBarFrame.setHP_XYlabels(), Util.showMsg(java.lang.String), assignHPtoAxis(int, int, MaHybridSample)

addHPtoElist

boolean addHPtoElist(MaHybridSample ms)
addHPtoElist() - add HP sample to end of HP-E list
Parameters:
ms - is sample to add to HP-E list
Returns:
true if succeed.
See Also:
Util.showMsg(java.lang.String)

rmvHPfromXset

boolean rmvHPfromXset(MaHybridSample ms)
rmvHPfromXset() - remove HP sample from HP-X set
Parameters:
ms - is sample to remove from HP-X set
Returns:
true if succeed.
See Also:
Util.showMsg(java.lang.String)

rmvHPfromYset

boolean rmvHPfromYset(MaHybridSample ms)
rmvHPfromYset() - remove HP sample from HP-Y set
Parameters:
ms - is sample to remove from HP-Y set
Returns:
true if succeed.
See Also:
Util.showMsg(java.lang.String)

rmvHPfromElist

boolean rmvHPfromElist(MaHybridSample ms)
rmvHPfromElist() - remove HP sample from HP-E list
Parameters:
ms - is sample to remove from HP-E list
Returns:
true if succeed.
See Also:
Util.showMsg(java.lang.String)

assignHPtoAxis

private void assignHPtoAxis(int n,
                            int axis,
                            MaHybridSample ms)
assignHPtoAxis() - assign sample to current HP-X or HP-Y sample This is the default.
Parameters:
n - is the sampleNbr to set to mae.curHP
axis - is either mae.X_AXIS or mae.Y_AXIS
ms - is HP sample to assign

setHPlistsFromPARAM

boolean setHPlistsFromPARAM()
setHPlistsFromPARAM() - set msList{X|Y|E}[] from PARAM cfg.{X|Y|E}list. Also sets limits for msListX[1:nHP_X], msListY[1:nHP_Y] and msListE[1:nHP_X]. Set the default current HP-X and HP-Y to the first entries on the Xlist and Ylist PARAM lists (if any) using the map entries idxListX[0] for curHP_X and idxListY[0] for curHP_Y. Handles case where there is NO intial data!
Returns:
true if succeed

showHP_XY_assignmentsPopup

void showHP_XY_assignmentsPopup()
showHP_XY_assignmentsPopup() - make popup display of HP_X and HP-Y sample lists
See Also:
ShowStringPopup, Util.showFeatures(java.lang.String, java.lang.String), Util.showMsg(java.lang.String)

showHP_E_assignmentsPopup

void showHP_E_assignmentsPopup()
showHP_E_assignmentsPopup() - make popup display of HP_E list of samples.
See Also:
ShowStringPopup, Util.showFeatures(java.lang.String, java.lang.String), Util.showMsg(java.lang.String)

chkSwapCy5Cy3

boolean chkSwapCy5Cy3(java.lang.String msListToCheck)
chkSwapCy5Cy3() - test if HP-X, HP-Y or HP-E list have Cy3/Cy5 swap flag set. If in ratio density mode, check to see if any HPs in the specified list have the ms.swapCy5Cy3DataFlag set.
Returns:
true if this is true, else false.

setHPxyModStrings

void setHPxyModStrings()
setHPxyModStrings() - set up (sMod, sModX, sModY, sModXY) state strings. The string reflects the ratio or intensity mode state as well as whether swapCy5Cy3DataFlags is in effect.
See Also:
chkSwapCy5Cy3(java.lang.String)

changeHPswapCy5Cy3Samples

void changeHPswapCy5Cy3Samples()
changeHPswapCy5Cy3Samples() - popup scrollable GUI array of checkbox to change cy3/Cy5 swap flags msList[0:nHP-1].swapCy5Cy3DataFlags
See Also:
Component.repaint(), Filter.computeWorkingGeneList(), Component.repaint(), MaHybridSample.swapCy5Cy3AndReCalcStats(), PopupRegistry.updateCurGene(int, int, java.lang.Object), PopupScrollableSelector, setHPxyModStrings()

copyValuesToMlistCy3Cy5Flags

void copyValuesToMlistCy3Cy5Flags()
copyValuesToMlistCy3Cy5Flags() - copy nameListCB[] state to valueList[]