Class Filter

java.lang.Object
  |
  +--Filter

class Filter
extends java.lang.Object

The class computes the intersection of selected data filter gene list. This implements gene data filtering. The result is the working gene list workingCL that is then used through MAExplorer. The computation uses the private gene list tmpCL in these calculations.

	FILTER NAME                           Gene list name
   	===========                           ===============
  "The data filtered working gene list"    workingCL  
  "Filter by GeneClass membership"         gcMemberCL   
  "Filter by HP-X, HP-Y t-Test"            HP_XY_t_TestCL  
  "Filter by HP-XY sets t-Test"            HP_XYsets_t_TestCL 
  "Filter by HP-XY sets KS-Test"           HP_XYsets_KS_TestCL 
  "Filter by current OCL F-Test"           OCL_F_TestCL  
  "Filter by Edited Gene List"             gct.editedCL
  "Filter by userFilterGeneSet membership" gct.userFilterGeneSetCL
  "Use Spot CV filter"                     spotCVCL  
  "Threshold: spot intensity [SI1:SI2]"    spotIntensThrCL  
  "Threshold: intensity [I1:I2]"           intensityThrCL  
  "Threshold: ratio [R1:R2]"               ratioThrCL
  "Threshold: ratio [CR1:CR2]"             ratioCy3Cy5ThrCL
  "Filter by HP-E clusters"                HP_EclustersCL
  "Filter by Diff(HP-X,HP-Y)"              DiffHP_XYCL 
  "Filter by Positive Quant Data"          posQuantDataCL 
  "Filter by Good Spot(QualChk) Data"      goodSpotQualChkCL  
  "Filter by Spot(Detection value) Data"   detValueSpotDataCL  
  "Filter by non-zero Spot Data"           nonZeroSpotDataCL  

  Additional Filters which are not in the normal Filter pipeline
  ==============================================================
  "Highest ratio genes"                    highestRatiosCL
  "lowest ratio genes"                     lowestRatiosCL
  "Tightly clustered genes"                clusteredGenesCL
  "Spots in the display list"              displayCL
  "Genes in K-means clusters"              KmeansNodesCL
  "Ratio histogram selected genes"         ratioHistCL
  "Intensity histogram selected genes"     intensHistCL
  "good genes"                             gct.goodGenesCL
  "replicate genes"                        gct.replicateGenesCL
  "Normalization genes"                    gct.normCL
 

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/07/07 21:40:41 $ $Revision: 1.19 $
Author:
P. Lemkin (NCI), G. Thornwall (SAIC), NCI-Frederick, Frederick, MD
See Also:
MAExplorer Home, GeneClass, GeneList, PopupRegistry

Field Summary
(package private)  java.lang.String[] activeFilterNames
          names of active filters for drawing in pseudo array image [0:nActiveFilters-1]
(package private)  GeneList clusteredGenesCL
          "Tightly clustered genes"
(package private)  GeneList detValueSpotDataCL
          "Filter by Spot (Detection Value) Data"
(package private)  GeneList DiffHP_XYCL
          "Filter by Diff(HP-X,HP-Y)"
(package private)  GeneList displayCL
          "Spots in the display list"
private  FileIO fio
          link to globalFileIO instance
(package private)  GeneList gcMemberCL
          "Filter by GeneClass membership"
private  GeneClass gct
          link to global GeneClass instance
(package private)  boolean[] geneInWorkingGeneList
          table lookup for gene membership
(package private)  GeneList goodSpotQualChkCL
          "Filter by Good Spot(QualChk) Data"
(package private)  GeneList highestRatiosCL
          "Highest ratios"
(package private)  GeneList HP_EclustersCL
          "Filter by HP-E clusters"
(package private)  GeneList HP_XY_t_TestCL
          "Filter genes by HP-X,HP-Y t-Test" i.e.
(package private)  GeneList HP_XYsets_KS_TestCL
          "Filter genes by HP-X,HP-Y sets Kolmagorove-Smirnov -Test" i.e.
(package private)  GeneList HP_XYsets_t_TestCL
          "Filter genes by HP-X,HP-Y sets t-Test" i.e.
private  SampleSets hps
          link to global SampleSets instance
(package private)  GeneList intensHistCL
          "Intensity histogram selected genes"
(package private)  GeneList intensityThrCL
          "Threshold: intensity [I1:I2]"
(package private) static int junk_BAD_DATA
          property: has bad data
(package private) static int junk_IS_FILTERED
          property: is filtered
(package private) static int junk_NOT_FILTERED
          property: is not filtered
(package private)  GeneList KmeansNodesCL
          "Genes in primary K-means nodes"
(package private)  GeneList lowestRatiosCL
          "Lowest ratios"
private  MAExplorer mae
          link to global MAExplorer instance
(package private)  int maxGenes
          max # genes/genelist
(package private)  int[] midList
          list of Mids used in passing data back and forth to FilterPlugins
(package private)  int nActiveFilters
          # of active filters
(package private)  GeneList nonZeroSpotDataCL
          "Filter by non-zero Spot Data"
(package private)  GeneList OCL_F_TestCL
          "Filter genes by current Ordered Condition List F-Test" i.e.
(package private)  GeneList posQuantDataCL
          "Filter by Positive Quant Data"
(package private)  GeneList ratioCy3Cy5ThrCL
          "Threshold: ratio [CR1:CR2]"
(package private)  GeneList ratioHistCL
          "Ratio histogram selected genes"
(package private)  GeneList ratioThrCL
          "Threshold: ratio [R1:R2]"
(package private)  GeneList spotCVCL
          "Use Spot CV filter"
(package private)  GeneList spotIntensThrCL
          "Threshold: spot intensity [RI1:RI2]"
private  Statistics stat
          link to global Statistics instance
private  GeneList tmpCL
          temporary gene list for intersections computations
(package private)  GeneList workingCL
          Working gene list after run filter
 
Constructor Summary
(package private) Filter(MAExplorer mae)
          Filter() - constructor to initialize data filter but not initial gene lists
(package private) Filter(MAExplorer mae, int maxGenes)
          Filter() - constructor to initialize data filter and initial gene lists.
 
Method Summary
private  void allocateGeneLists()
          allocateGeneLists() - create all of the gene lists if they were not previously created
(package private)  float calcF1F2CV(float g1, float g2)
          calcF1F2CV() - compute 2 sample estimate the coefficient of variation as where CV is estimated as 2*|g1-g2|/(g1+g2).
(package private)  boolean checkCy3Cy5SamplesRange(float cy3, float cy5)
          checkCy3Cy5SamplesRange() - test cy3/cy5 [CR1:CR2] for current rangeMode RANGE_INSIDE, RANGE_OUTSIDE.
(package private)  boolean checkSamplesRange(float g1, float g2, boolean testRatioFlag)
          checkSamplesRange() - for testing intensity[I1:I2] or ratio [R1:R2] for current rangeMode RANGE_INSIDE, RANGE_OUTSIDE.
(package private)  boolean checkSpotIntensityCompareRange(int nOK1, int nOK2, boolean[] ok1, boolean[] ok2, float gProduct1, float gProduct2, float gSum1, float gSum2)
          checkSpotIntensityCompareRange() - for testing spot intensity in [ST1:ST2] with compareMode COMPARE_ALL, COMPARE_ANY, COMPARE_PRODUCT, COMPARE_SUM.
(package private)  boolean checkSpotIntensityRange(float g1)
          checkSpotIntensityRange() - test spot intensity in [ST1:ST2] for specified rangeMode RANGE_INSIDE, RANGE_OUTSIDE.
(package private)  boolean computeWorkingGeneList()
          computeWorkingGeneList() - run the data filter gene to compute the workingCL gene list.
(package private)  boolean doFilterPluginPipelineInitOpr(java.lang.String pipelineInitOpr, int argVal)
          doFilterPluginPipelineInitOpr() - do pipeline Init operation on all active FilterPlugin's.
(package private)  boolean doFilterPluginPipelineOpr()
          doFilterPluginPipelineOpr() - do pipeline operation on all active FilterPlugin's.
(package private)  boolean isGIDinWorkingCL(int gid)
          isGIDinWorkingCL() - return true if GridCoords gid is in the workingCL of genes
(package private)  boolean isMIDinWorkingCL(int mid)
          isMIDinWorkingCL() - return true if Master Gene Id (mid) is in workingCL
(package private)  boolean setCy3Cy5RatiosCL(GeneList genesToTestCL, GeneList passedCL, MaHybridSample msX, boolean useCy5Cy3flag)
          setCy3Cy5RatiosCL() - Set GeneList of thresholded genes for Cy3/Cy5 ratio range where the threshold for rangeType [CR1:CR2] and rangeMode RANGE_INSIDE, RANGE_OUTSIDE.
(package private)  boolean setDetValueQuantData(GeneList detValueSpotDataCL, GeneList genesToTestCL, int detValueSpotTestMode)
          setDetValueQuantData() - filter out genes failing Detection Value quant values.
(package private)  boolean setDiffHP_XYCL(GeneList passedCL, GeneList genesToTestCL, float diffThr)
          setDiffHP_XYCL() - Filter genes by diff(HP-X,HP-Y) GEQ diffThr.
(package private)  boolean setGeneListBySpotCV(GeneList cvResultCL, GeneList genesToTestCL, float spotCVthr, int cvTestMode)
          setGeneListBySpotCV() - do test of coefficient of variation against threshold.
(package private)  boolean setGoodSpotQuantData(GeneList goodSpotDataCL, GeneList genesToTestCL, int goodSpotTestMode)
          setGoodSpotQuantData() - filter out genes failing QualChk quant values.
(package private)  boolean setHP_EclustersCL(GeneList passedCL, GeneList genesToTestCL, float clusterDistThr)
          setHP_EclustersCL() - Filter genes by HP-E clusters LEQ clusterDist
(package private)  boolean setHP_XY_t_TestCL(GeneList t_TestResultCL, GeneList genesToTestCL, MaHybridSample msX, MaHybridSample msY, float pValueThr)
          setHP_XY_t_TestCL() - set GeneList of genes passing HP-X,HP-Y t-Test with a pValue better than pValueThr.
Compute the means and std deviations using the f1,f2 values for each sample.
(package private)  boolean setHP_XYsets_KS_TestCL(GeneList KS_TestResultCL, GeneList genesToTestCL, float pValueThr)
          setHP_XYsets_KS_TestCL() - set GeneList of genes passing HP-X,HP-Y sets KS-Test (Kolmogorov-Smirnov) with a pValue better than pValueThr.
[CHECK] how do we handle this if not in HP-XY 'set' mode?GeneList
(package private)  boolean setHP_XYsets_t_TestCL(GeneList t_TestResultCL, GeneList genesToTestCL, float pValueThr)
          setHP_XYsets_t_TestCL() - set GeneList of genes passing HP-X,HP-Y sets t-Test with a pValue better than pValueThr.
[CHECK] how do we handle this if not in HP-XY 'set' mode?GeneList
(package private)  boolean setNonZeroQuantData(GeneList nonZeroSpotDataCL, GeneList genesToTestCL)
          setNonZeroQuantData() - filter out genes with 0.0 quant values in any HP-EP samples.
(package private)  boolean setOCL_F_TestCL(GeneList OCL_F_TestResultCL, GeneList genesToTestCL, float pValueThr)
          setOCL_F_TestCL() - set GeneList of genes passing F-test on current OCL (Ordered Condition List) with a pValue better than pValueThr.
(package private)  boolean setPostiveQuantData(GeneList posQuantDataCL, GeneList genesToTestCL, int posQuantTestMode)
          setPostiveQuantData() - filter out genes with negative quant values.
(package private)  boolean setRatiosGeneList(GeneList ratiosCL, GeneList genesToTestCL, int maxGenesToRpt, boolean useHP_XYratio, boolean sortDirection)
          setRatiosGeneList() set ratiosCL by reportMode and sort by specified direction.
(package private)  boolean setSIthresholdsCL(GeneList genesToTestCL, GeneList resultCL)
          setSIthresholdsCL() - set GeneList of Spot Iintensity thresholded range where the threshold for rangeType [ST1:ST2] and rangeMode is RANGE_INSIDE, RANGE_OUTSIDE.
(package private)  boolean setThresholdsCL(GeneList genesToTestCL, GeneList passedCL, MaHybridSample msX, MaHybridSample msY, boolean testGrayFlag)
          setThresholdsCL() - set GeneList of thresholded F1,F2 or HP_X,HP_Y intensity or ratio range where the threshold for rangeType [T1:T2] or [R1:R2] and rangeMode is RANGE_INSIDE, RANGE_OUTSIDE.
(package private)  void showNbrFilteredGenes()
          showNbrFilteredGenes() - update Msg3 status line with the number of genes passing filter
 
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

hps

private SampleSets hps
link to global SampleSets instance

fio

private FileIO fio
link to globalFileIO instance

stat

private Statistics stat
link to global Statistics instance

gct

private GeneClass gct
link to global GeneClass instance

tmpCL

private GeneList tmpCL
temporary gene list for intersections computations

junk_IS_FILTERED

static final int junk_IS_FILTERED
property: is filtered

junk_NOT_FILTERED

static final int junk_NOT_FILTERED
property: is not filtered

junk_BAD_DATA

static final int junk_BAD_DATA
property: has bad data

workingCL

GeneList workingCL
Working gene list after run filter

gcMemberCL

GeneList gcMemberCL
"Filter by GeneClass membership"

HP_XY_t_TestCL

GeneList HP_XY_t_TestCL
"Filter genes by HP-X,HP-Y t-Test" i.e. mae.msListX(Y)

HP_XYsets_t_TestCL

GeneList HP_XYsets_t_TestCL
"Filter genes by HP-X,HP-Y sets t-Test" i.e. mae.msX(Y)

HP_XYsets_KS_TestCL

GeneList HP_XYsets_KS_TestCL
"Filter genes by HP-X,HP-Y sets Kolmagorove-Smirnov -Test" i.e. mae.msListX(Y)

OCL_F_TestCL

GeneList OCL_F_TestCL
"Filter genes by current Ordered Condition List F-Test" i.e. current OCL

spotCVCL

GeneList spotCVCL
"Use Spot CV filter"

spotIntensThrCL

GeneList spotIntensThrCL
"Threshold: spot intensity [RI1:RI2]"

intensityThrCL

GeneList intensityThrCL
"Threshold: intensity [I1:I2]"

ratioThrCL

GeneList ratioThrCL
"Threshold: ratio [R1:R2]"

ratioCy3Cy5ThrCL

GeneList ratioCy3Cy5ThrCL
"Threshold: ratio [CR1:CR2]"

HP_EclustersCL

GeneList HP_EclustersCL
"Filter by HP-E clusters"

DiffHP_XYCL

GeneList DiffHP_XYCL
"Filter by Diff(HP-X,HP-Y)"

posQuantDataCL

GeneList posQuantDataCL
"Filter by Positive Quant Data"

goodSpotQualChkCL

GeneList goodSpotQualChkCL
"Filter by Good Spot(QualChk) Data"

detValueSpotDataCL

GeneList detValueSpotDataCL
"Filter by Spot (Detection Value) Data"

nonZeroSpotDataCL

GeneList nonZeroSpotDataCL
"Filter by non-zero Spot Data"

highestRatiosCL

GeneList highestRatiosCL
"Highest ratios"

lowestRatiosCL

GeneList lowestRatiosCL
"Lowest ratios"

clusteredGenesCL

GeneList clusteredGenesCL
"Tightly clustered genes"

displayCL

GeneList displayCL
"Spots in the display list"

KmeansNodesCL

GeneList KmeansNodesCL
"Genes in primary K-means nodes"

ratioHistCL

GeneList ratioHistCL
"Ratio histogram selected genes"

intensHistCL

GeneList intensHistCL
"Intensity histogram selected genes"

maxGenes

int maxGenes
max # genes/genelist

geneInWorkingGeneList

boolean[] geneInWorkingGeneList
table lookup for gene membership

activeFilterNames

java.lang.String[] activeFilterNames
names of active filters for drawing in pseudo array image [0:nActiveFilters-1]

nActiveFilters

int nActiveFilters
# of active filters

midList

int[] midList
list of Mids used in passing data back and forth to FilterPlugins
Constructor Detail

Filter

Filter(MAExplorer mae,
       int maxGenes)
Filter() - constructor to initialize data filter and initial gene lists.
Parameters:
mae - is the MAExplorer instance
maxGenes - is the max # of possible genes
See Also:
allocateGeneLists()

Filter

Filter(MAExplorer mae)
Filter() - constructor to initialize data filter but not initial gene lists
Parameters:
mae - is the MAExplorer instance
Method Detail

allocateGeneLists

private void allocateGeneLists()
allocateGeneLists() - create all of the gene lists if they were not previously created
See Also:
GeneList

showNbrFilteredGenes

void showNbrFilteredGenes()
showNbrFilteredGenes() - update Msg3 status line with the number of genes passing filter
See Also:
Util.showMsg3(java.lang.String)

doFilterPluginPipelineInitOpr

boolean doFilterPluginPipelineInitOpr(java.lang.String pipelineInitOpr,
                                      int argVal)
doFilterPluginPipelineInitOpr() - do pipeline Init operation on all active FilterPlugin's.
Parameters:
pipelineInitOpr - - is either "resetPipeline" or "finishPipeline"
Returns:
true if succeed

doFilterPluginPipelineOpr

boolean doFilterPluginPipelineOpr()
doFilterPluginPipelineOpr() - do pipeline operation on all active FilterPlugin's.
Returns:
true if succeed

computeWorkingGeneList

boolean computeWorkingGeneList()
computeWorkingGeneList() - run the data filter gene to compute the workingCL gene list. This data filter computes the successive intersections of all genes with GeneLists from all active restrictive filters. The restrictive filters are recomputed before the intersection is done. NOTE: this is expensive, so don't call every repaint() cycle!!!
Returns:
FALSE if there is no filter setting workingCL to all genes. Otherwise, the filter is in workingCL. If we return true, we may want to mae.repaint() since we may need to update the display from workingCL.
See Also:
GeneBitSet.copyBStoCL(GeneList, GeneBitSet), GeneClass.getGeneListOfCurrentGeneClass(), GeneList.addGene(Gene), GeneList.clear(), GeneList.copy(GeneList, GeneList), GeneList.intersection(GeneList, GeneList, GeneList), PopupRegistry.updateFilter(GeneList), Util.showMsg(java.lang.String), Util.showMsg2(java.lang.String), Util.showMsg3(java.lang.String), allocateGeneLists(), doFilterPluginPipelineOpr(), setCy3Cy5RatiosCL(GeneList, GeneList, MaHybridSample, boolean), setGeneListBySpotCV(GeneList, GeneList, float, int), setGoodSpotQuantData(GeneList, GeneList, int), setHP_XYsets_t_TestCL(GeneList, GeneList, float), setHP_XY_t_TestCL(GeneList, GeneList, MaHybridSample, MaHybridSample, float), #setHP_XY_KS_TestCL, setOCL_F_TestCL(GeneList, GeneList, float), setPostiveQuantData(GeneList, GeneList, int), setRatiosGeneList(GeneList, GeneList, int, boolean, boolean), setSIthresholdsCL(GeneList, GeneList), setThresholdsCL(GeneList, GeneList, MaHybridSample, MaHybridSample, boolean), showNbrFilteredGenes()

setPostiveQuantData

boolean setPostiveQuantData(GeneList posQuantDataCL,
                            GeneList genesToTestCL,
                            int posQuantTestMode)
setPostiveQuantData() - filter out genes with negative quant values. If any spot is < 0.0, then kill the gene depending on what is being tested.
[NOTE] for now this assumes Data in one (AFFY) channel. If we are dealing with Ratio or 2 Channel data, then compare both channels.
 Do posQuantTestMode test depending on what is being compared. i.e.
   SS_MODE_MS     mae.ms                   "Filter PosQuant current HP"
   SS_MODE_XY    (mae.msX, mae.msY)        "Filter PosQuant HP-X and HP-Y"
   SS_MODE_XYSET (mae.msListX,mae.msListY) "Filter PosQuant HP-X-set and HP-Y-set"
   SS_MODE_E      mae.ListE                "Filter PosQuant all HP-E"
Parameters:
posSpotDataCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
posQuantTestMode - is the SS_MODE_xxxx specified above
Returns:
true if succeed and results in posSpotDataCL, else false if a problem.
See Also:
ExprProfile, GeneList.clearNull(), GeneList.addGene(Gene), MaHybridSample.getSpotDataStatic(int, boolean)

setGoodSpotQuantData

boolean setGoodSpotQuantData(GeneList goodSpotDataCL,
                             GeneList genesToTestCL,
                             int goodSpotTestMode)
setGoodSpotQuantData() - filter out genes failing QualChk quant values. Only valid it QualChk data exists! Test first
 Do goodSpotTestMode test depending on what is being compared. i.e.
   SS_MODE_MS     mae.ms                   "Filter current HP"
   SS_MODE_XY    (mae.msX, mae.msY)        "Filter HP-X and HP-Y"
   SS_MODE_XYSET (mae.msListX,mae.msListY) "Filter HP-X-set and HP-Y-set"
   SS_MODE_E      mae.ListE                "Filter all HP-E"

 [TODO] Also, mae.qualityTypeMode selects various tests:
   QUALTYPE_ALPHA= 1,         - QualCheck types (Alphabetic codes)
   QUALTYPE_MAE_PROP_CODES    - uses Gene.xxxx prop codes
   QUALTYPE_THRESHOLD         - Uses qualThr threshold
 
Parameters:
goodSpotDataCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
goodSpotTestMode - is the SS_MODE_xxxx specified above
Returns:
true if succeed and results in goodSpotDataCL, else false if a problem.
See Also:
GeneList.clearNull(), GeneList.addGene(Gene)

setDetValueQuantData

boolean setDetValueQuantData(GeneList detValueSpotDataCL,
                             GeneList genesToTestCL,
                             int detValueSpotTestMode)
setDetValueQuantData() - filter out genes failing Detection Value quant values. Only valid it Detection Value data exists! Test ms.hasDetValueDataFlag first. It will threshold using the detValueSpotThr state threshold.
 Do detValueSpotTestMode test depending on what is being compared. i.e.
   SS_MODE_MS     mae.ms                   "Filter current HP"
   SS_MODE_XY    (mae.msX, mae.msY)        "Filter HP-X and HP-Y"
   SS_MODE_XYSET (mae.msListX,mae.msListY) "Filter HP-X-set and HP-Y-set"
   SS_MODE_E      mae.ListE                "Filter all HP-E"
 
Parameters:
detValueSpotDataCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
detValueSpotTestMode - is the SS_MODE_xxxx specified above
Returns:
true if succeed and results in detValueSpotDataCL, else false if a problem.
See Also:
GeneList.clearNull(), GeneList.addGene(Gene)

setNonZeroQuantData

boolean setNonZeroQuantData(GeneList nonZeroSpotDataCL,
                            GeneList genesToTestCL)
setNonZeroQuantData() - filter out genes with 0.0 quant values in any HP-EP samples. If any spot is == 0.0, then kill the gene depending on what is being tested.
Parameters:
nonZeroSpotDataCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
Returns:
true if succeed and results in nonZeroSpotDataCL, else false if a problem.
See Also:
ExprProfile, GeneList.clearNull(), GeneList.addGene(Gene), MaHybridSample.getSpotDataStatic(int, boolean)

setRatiosGeneList

boolean setRatiosGeneList(GeneList ratiosCL,
                          GeneList genesToTestCL,
                          int maxGenesToRpt,
                          boolean useHP_XYratio,
                          boolean sortDirection)
setRatiosGeneList() set ratiosCL by reportMode and sort by specified direction.
Parameters:
ratiosCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
maxGenesToRpt - is the maximum number of genes to test in report
useHP_XYratio - is flag to use HP X/Y ratio else use F1/F2 ratio
sortDirection - as either ASSENDING or DESCENDING
Returns:
true if succeed and results in ratiosCL, else false if a problem.
See Also:
Gene.setGeneData(float), Gene.sortGeneList(Gene[], int, boolean), GeneList.clearNull(), GeneList.addGene(Gene), GeneList.compressGeneList(), HPxyData.updateDataAndStat(int), MaHybridSample.getDataByGID(int, boolean, int), Util.showMsg3(java.lang.String)

setGeneListBySpotCV

boolean setGeneListBySpotCV(GeneList cvResultCL,
                            GeneList genesToTestCL,
                            float spotCVthr,
                            int cvTestMode)
setGeneListBySpotCV() - do test of coefficient of variation against threshold. The mae.useCVmaxElseMeanFlag determines whether we use max or mean of the CVs. If maxFIELDS==1, then can't do F1F2 for single HP.
 Call F1F2CV test depending on what is being compared. i.e.
   SS_MODE_MS     mae.ms                    "Filter F1F2 current HP"
   SS_MODE_XY    (mae.msX, mae.msY)         "Filter F1F2 HP-X and HP-Y"
   SS_MODE_XYSET (mae.msListX)              "Filter F1F2 HP-X-set"   
   SS_MODE_XYSET (mae.mae.msListY)          "Filter F1F2 HP-Y-set"     
   SS_MODE_XYSET (mae.msListX,mae.msListY)  "Filter F1F2 HP-X-set and HP-Y-set"
   SS_MODE_ELIST  mae.ListE                 "Filter F1F2 all HP-E"
Parameters:
cvResultCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
spotCVthr - is the coefficient of variantion threshold to use
cvMode - is the way to compute the CV (see SS_MODE_xxxx above)
Returns:
true if succeed and results in cvResultsCL, else false if a problem.
See Also:
ExprProfile.updateData(int), GeneList.clearNull(), GeneList.addGene(Gene), HPxyData.updateDataAndStat(int), MaHybridSample.getSpotData12Static(int, int, boolean), calcF1F2CV(float, float)

setHP_XY_t_TestCL

boolean setHP_XY_t_TestCL(GeneList t_TestResultCL,
                          GeneList genesToTestCL,
                          MaHybridSample msX,
                          MaHybridSample msY,
                          float pValueThr)
setHP_XY_t_TestCL() - set GeneList of genes passing HP-X,HP-Y t-Test with a pValue better than pValueThr.
Compute the means and std deviations using the f1,f2 values for each sample. Put the pValue in the gene object.
Parameters:
t_TestResultCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
msX - is the X sample with F1 and F2 duplicates
msY - is the Y sample with F1 and F2 duplicates
pValueThr - is the p-value threshold to use
Returns:
true if succeed and results in t_TestResultsCL, else false if a problem.
See Also:
Gene.setGeneData(float), GeneList.clearNull(), GeneList.addGene(Gene), MaHybridSample.getDataByGID(int, boolean, int), Statistics.calcTandPvalues(int, int, double, double, double, double)

setHP_XYsets_t_TestCL

boolean setHP_XYsets_t_TestCL(GeneList t_TestResultCL,
                              GeneList genesToTestCL,
                              float pValueThr)
setHP_XYsets_t_TestCL() - set GeneList of genes passing HP-X,HP-Y sets t-Test with a pValue better than pValueThr.
[CHECK] how do we handle this if not in HP-XY 'set' mode?GeneList
Parameters:
t_TestResultCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
pValueThr - is the p-value threshold to use
Returns:
true if succeed and results in t_TestResultsCL, else false if a problem.
See Also:
Gene.setGeneData(float), GeneList.clearNull(), GeneList.addGene(Gene), HPxyData.setupDataStruct(boolean), HPxyData.updateDataAndStat(int), Statistics.calcTandPvalues(int, int, double, double, double, double)

setHP_XYsets_KS_TestCL

boolean setHP_XYsets_KS_TestCL(GeneList KS_TestResultCL,
                               GeneList genesToTestCL,
                               float pValueThr)
setHP_XYsets_KS_TestCL() - set GeneList of genes passing HP-X,HP-Y sets KS-Test (Kolmogorov-Smirnov) with a pValue better than pValueThr.
[CHECK] how do we handle this if not in HP-XY 'set' mode?GeneList
Parameters:
KS_TestResultCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
pValueThr - is the p-value threshold to use
Returns:
true if succeed and results in KS_TestResultsCL, else false if a problem.
See Also:
Gene.setGeneData(float), GeneList.clearNull(), GeneList.addGene(Gene), HPxyData.setupDataStruct(boolean), Statistics.calcKStestStat(double[], int, double[], int)

setOCL_F_TestCL

boolean setOCL_F_TestCL(GeneList OCL_F_TestResultCL,
                        GeneList genesToTestCL,
                        float pValueThr)
setOCL_F_TestCL() - set GeneList of genes passing F-test on current OCL (Ordered Condition List) with a pValue better than pValueThr. The current OCL MUST be defined else return true.
Parameters:
OCL_F_TestResultCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
pValueThr - is the p-value threshold to use
Returns:
true if succeed and results in OCL_F_TestResultsCL, else false if a problem.
See Also:
Gene.setGeneData(float), GeneList.clearNull(), GeneList.addGene(Gene), Condition#getSampleNamesInCondList, Condition#getConditionsInOrderedCondList, Condition#getSamplesInCondList, Statistics.calcNCondFtestStat(float[][], int[], int)

setHP_EclustersCL

boolean setHP_EclustersCL(GeneList passedCL,
                          GeneList genesToTestCL,
                          float clusterDistThr)
setHP_EclustersCL() - Filter genes by HP-E clusters LEQ clusterDist
Parameters:
passedCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
clusterDistThr - is the cluster distance threshold to use
Returns:
true if succeed and results in passedCL, else false if a problem.

setDiffHP_XYCL

boolean setDiffHP_XYCL(GeneList passedCL,
                       GeneList genesToTestCL,
                       float diffThr)
setDiffHP_XYCL() - Filter genes by diff(HP-X,HP-Y) GEQ diffThr.
Parameters:
passedCL - is the gene list returned with a new set of genes
genesToTestCL - list of genes to test
diffThr - is the difference threshold to use
Returns:
true if succeed and results in passedCL, else false if a problem.

setSIthresholdsCL

boolean setSIthresholdsCL(GeneList genesToTestCL,
                          GeneList resultCL)
setSIthresholdsCL() - set GeneList of Spot Iintensity thresholded range where the threshold for rangeType [ST1:ST2] and rangeMode is RANGE_INSIDE, RANGE_OUTSIDE. All spots being tested must be within the range. It tests the gray range if testGray is true, else it tests ratios.
 Call spot intensity for spots in HPs
  depending on what is being compared. i.e.
   SS_MODE_MS         mae.ms                "Filter F1F2 current HP"
   SS_MODE_XY        (mae.msX, mae.msY)     "Filter F1F2 HP-X or HP-Y"
   SS_MODE_XORY_SET  (mae.msListX,.msListY) "Filter F1F2 HP-X-set or HP-Y-set"
   SS_MODE_XANDY_SET (mae.msListX,.msListY) "Filter F1F2 HP-X-set and HP-Y-set"
   SS_MODE_E         mae.ListE              "Filter F1F2 all HP-E"
 
This is modified by spotIntensCompareMode COMPARE_ALL all g1, g2 values meet range COMPARE_ANY any g1, g2 values meet range COMPARE_PRODUCT the product of all g1, g2 values meet range COMPARE_SUM the sum of all g1, g2 values meet range COMPARE_AT_MOST at most nOKthr of all values meet range COMPARE_AT_LEAST at least nOKthr of all values meet range
Parameters:
genesToTestCL - list of genes to test
resultCL - is the gene list returned with a new set of genes
Returns:
true if succeed and results in passedCL, else false if a problem.
See Also:
GeneList.clearNull(), GeneList.addGene(Gene), MaHybridSample.getSpotDataStatic(int, boolean), checkSpotIntensityRange(float)

checkSpotIntensityRange

boolean checkSpotIntensityRange(float g1)
checkSpotIntensityRange() - test spot intensity in [ST1:ST2] for specified rangeMode RANGE_INSIDE, RANGE_OUTSIDE.
Parameters:
g1 - value to test
Returns:
true if pass the range test

checkSpotIntensityCompareRange

boolean checkSpotIntensityCompareRange(int nOK1,
                                       int nOK2,
                                       boolean[] ok1,
                                       boolean[] ok2,
                                       float gProduct1,
                                       float gProduct2,
                                       float gSum1,
                                       float gSum2)
checkSpotIntensityCompareRange() - for testing spot intensity in [ST1:ST2] with compareMode COMPARE_ALL, COMPARE_ANY, COMPARE_PRODUCT, COMPARE_SUM.
[CHECK] check logic for all combinations of rangeMode and spotIntensTestMode.
Parameters:
nOK1 - is the size of variable 2 lists
nOK2 - is the size of variable 2 lists
ok1 - is list of flagged variable for variable 1 list
ok2 - is list of flagged variable for variable 2 list
gProduct1 - is product of variables for variable 1 list
gProduct2 - is product of variables for variable 2 list
gSum1 - is sum of variables for variable 1 list
gSum2 - is sum of variables for variable 2 list
Returns:
true if succeed in the test.
See Also:
checkSpotIntensityRange(float)

setThresholdsCL

boolean setThresholdsCL(GeneList genesToTestCL,
                        GeneList passedCL,
                        MaHybridSample msX,
                        MaHybridSample msY,
                        boolean testGrayFlag)
setThresholdsCL() - set GeneList of thresholded F1,F2 or HP_X,HP_Y intensity or ratio range where the threshold for rangeType [T1:T2] or [R1:R2] and rangeMode is RANGE_INSIDE, RANGE_OUTSIDE. If msY is not null, then use msX.F1 and msX.F2 for Y, else use msX.(F1+F2)/2 and msY.(F1+F2)/2. The dataType is mae.DATA_TOT, DATA_AVG. It tests the gray range if testGray is true, else it tests ratios.
Parameters:
genesToTestCL - list of genes to test
passedCL - is the gene list returned with a new set of genes
msX - is the X sample with F1 and F2 duplicates
msY - is the Y sample with F1 and F2 duplicates
Returns:
true if succeed and results in passedCL, else false if a problem.
See Also:
Gene.setGeneData(float), GeneList.clearNull(), GeneList.addGene(Gene), HPxyData.updateDataAndStat(int), MaHybridSample.getDataByGID(int, boolean, int), checkSamplesRange(float, float, boolean)

setCy3Cy5RatiosCL

boolean setCy3Cy5RatiosCL(GeneList genesToTestCL,
                          GeneList passedCL,
                          MaHybridSample msX,
                          boolean useCy5Cy3flag)
setCy3Cy5RatiosCL() - Set GeneList of thresholded genes for Cy3/Cy5 ratio range where the threshold for rangeType [CR1:CR2] and rangeMode RANGE_INSIDE, RANGE_OUTSIDE. Use msX.F1 (Cy3) and msX.F2 (Cy5). We must be in Ratio mode.
Parameters:
genesToTestCL - list of genes to test
passedCL - is the gene list returned with a new set of genes
msX - is the X sample with F1 and F2 duplicates
useCy5Cy3flag - if swapped Cy3 and Cy5 data
Returns:
true if succeed and results in passedCL, else false if a problem.
See Also:
GeneList.clearNull(), GeneList.addGene(Gene), MaHybridSample.getDataByGID(int, boolean, int), checkCy3Cy5SamplesRange(float, float)

calcF1F2CV

float calcF1F2CV(float g1,
                 float g2)
calcF1F2CV() - compute 2 sample estimate the coefficient of variation as where CV is estimated as 2*|g1-g2|/(g1+g2). If (g1+g2)==0, then return 0.0.
Parameters:
g1 - value
g2 - value
Returns:
computed value

checkSamplesRange

boolean checkSamplesRange(float g1,
                          float g2,
                          boolean testRatioFlag)
checkSamplesRange() - for testing intensity[I1:I2] or ratio [R1:R2] for current rangeMode RANGE_INSIDE, RANGE_OUTSIDE. If doing ratio test and normalization is set to Zscore, compute (g1-g2) else g1/g2.
Parameters:
g1 - value
g2 - value
testRatioFlag - test ratio data[R1:R2], else intensity data against [I1:I2] range.
Returns:
true if the ratio meets the range test

checkCy3Cy5SamplesRange

boolean checkCy3Cy5SamplesRange(float cy3,
                                float cy5)
checkCy3Cy5SamplesRange() - test cy3/cy5 [CR1:CR2] for current rangeMode RANGE_INSIDE, RANGE_OUTSIDE. If doing Zscore, compute (cy3-cy5) else cy3/cy5.
Parameters:
cy3 - value of cy3 (F1) channel
cy5 - value of cy5 (F2) channel
Returns:
true if the ratio meets the range test

isGIDinWorkingCL

boolean isGIDinWorkingCL(int gid)
isGIDinWorkingCL() - return true if GridCoords gid is in the workingCL of genes
Parameters:
gid - is Gene Index GID to test
Returns:
true if gid is in working gene set
See Also:
GeneList.isGIDinGeneList(int)

isMIDinWorkingCL

boolean isMIDinWorkingCL(int mid)
isMIDinWorkingCL() - return true if Master Gene Id (mid) is in workingCL
Parameters:
mid - is Master Gene Index MID to test
Returns:
true if mid is in working gene set
See Also:
GeneList.isMIDinGeneList(int)