Class MaHybridSample

java.lang.Object
  |
  +--MaHybridSample

class MaHybridSample
extends java.lang.Object

The MaHybridSample class is the primary instance of hybridized sample array data. It includes all sample-specific image-dependent data such as xy coords, raw intensity(ies if both f1,f2 or f1/f2, etc. or Cy3, Cy5), background, QualCheck data, statistical descriptions of that data and calibration data. It also includes the data access methods used by all of the rest of MAExplorer. It initially invokes a MaHPquantTable instance to read the quantified data from the .quant data file. Note: The genomic ID info is kept in the list of Gene instances accessed through Maps.midStaticCL or Maps.gidStaticCL.

An instance of this class contains primary data describing a particular hybridized sample including: its name; full name; file name; channel(s) intensity, background, QualCheck flag, pseudoarray image and actual image spot coordinates, correlation coefficient, gidMap; Cy3/Cy5 channel swap state; statistics on total data and subsets of the data; scale factors for different normalizations; etc.

It includes many primary methods used throughout MAExplorer for accessing this data including:

List of methods
 lookupGeneFromXY() - lookup mid if find Point xy in sample HP pseudoarray image
 scaleIntensData() - scale raw intensity data as function of normalization mode
 cvRI2HistScale() - convert raw intensity to histogram scale data for the gid
 cvHist2RIscale() - convert histogram scale to raw intensity data for the gid
 calcIntensScaleExtrema() - calculate intensity scale factor extrema for current normalization mode
 getSpotDataStatic() - get a STATIC scaled spot data object for this gid
 getSpotData12Static() - get STATIC scaled spot data object for gid1, gid2
 getF1F2Data() - get list spot (F1,F2)'s intensity data for data filtered genes
 computeMinMaxF1F2Data() - compute F1 F2 min and max raw intensity extrema
 getDataByGID() - get scaled intensity data specified by gid and data type
 getRawDataByGID() - get raw (possibly bkgrd corrected) data specified by gid and data type
 getRawIntens() - get spot (rawIntensity - rawBackground) data by gid and data type
 getRawBkgrd() - get raw background intensity specified by the gid
 calcIntensHist() - compute Filtered spot intensity histogram for this sample
 calcMeanCalDNA() - calculate mean and stdDev RAW intensity Calibration DNA
 calcMeanUseNormGeneSet() - calculate mean and stdDev RAW intensity
 swapCy5Cy3AndReCalcStats() - swap Cy3 and Cy5, recalculate statistics for the sample
 clearHPglobalStats() - clear global array statistics before compute actual ranges
 recalcGlobalStats() - recalculate global array statistics for all or just Good Spots
 cvtRawQdataToMAEdata() - convert .quant data to MAE data using HP array data ms.(bkgrdQ,totQ)[]

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.18 $
Author:
P. Lemkin (NCI), G. Thornwall (SAIC), NCI-Frederick, Frederick, MD
See Also:
MAExplorer Home, MaHPquantTable

Field Summary
(package private)  float BGAvgQ
          Average background for entire array
(package private)  float BGLowQ
          low background estimate for entire array
(package private)  float BGRmsQ
          RMS background for entire array
(package private)  float bkgrdQ
          raw background intensity, unscaled
(package private)  float[] bkgrdSpotQ
          list of raw background intensity data/spot, unscaled
(package private) static int DATA_F1TOT
          type code: for f1 data
(package private) static int DATA_F2TOT
          type code: for f2 data
(package private) static int DATA_MEAN_F1F2TOT
          type code: for (f1+f2)/2 data
(package private) static int DATA_RATIO_F1F2TOT
          type code: for f1/f2 data
(package private)  boolean dataAvailFromQuantFileFlag
          set if can get quant data data from .quant file
(package private)  java.lang.String databaseFileID
          (opt) DatabaseFileID used with some databases (eg.
(package private)  boolean dataFromStateFileFlag
          flag: set if can get data from .state file
(package private)  float deltaBin
          Filter hist: #bins/maxData-minData)
(package private)  float deltaHistBin
          total array: width of a logRatio histogram bin
(package private)  float[] detValueQ
          (opt) list of spot Detection Value within spot for all spots.
(package private)  boolean doRatioFlag
          flag: if maxFIELD==1 && useRatioDataFlag
(package private)  java.awt.Point downPoint
          [FUTURE] for dragging- could be used for defining rubber-band regions
private  Filter fc
          link to global Filter instance
(package private)  boolean flipRowsColsFlag
          flag: flip rows and columns
(package private)  java.lang.String fullStageText
          full Stage text name of hybridized sample used in menus, etc
private  GeneClass gct
          link to global GeneClass instance
(package private)  int[] gidMapQ
          map GridCoord id for [f][g][r][c] for each row of this sample's tData[].
(package private)  float gidMaxF1
          gid for max intens values F1 in getF1F2list
(package private)  float gidMaxF2
          gid for max intens values F2 in getF1F2list
(package private)  float gidMinF1
          gid for min intens values F1 in getF1F2list
(package private)  float gidMinF2
          gid for min intens values F2 in getF1F2list
(package private)  boolean hasActualXYcoordsFlag
          flag: set if have actual XY coords - not pseudoCoords
(package private)  boolean hasBkgrdPerSpotFlag
          flag: set if have bkgrd intens/spot
(package private)  boolean hasDetValueSpotDataFlag
          flag: if using spot data "CorrCoef" or "DetValue" field
(package private)  boolean hasQualChkFlag
          flag: if using "QualCheck" field
(package private)  boolean hasValidDataFlag
          flag: set if .quant array data is set up ok
(package private)  boolean hasXYimageCQflag
          flag: has xyImgCQ_X/Y[] data for Montage image
(package private)  int[] hist
          normalized intensity histogram [0:nBins]
(package private)  java.lang.String hpName
          basename hybridized sample DB file name without file extension
(package private)  int idxHP
          index in list of all samples (mae.hps.msList[]) for this HP sample
(package private)  boolean implicitFieldsFlag
          flag: set true if no "field" field
(package private)  float logDeltaBin
          total array: (mae.MAX_INTENSITY/logRange)
(package private)  float logMaxRatioRI
          total array: log maxRatioRI
(package private)  float logMaxRI
          total array: log of maxRI
(package private)  float logMean
          Filter hist: log of mean raw intensity
(package private)  float logMeanAbsDev
          Filter hist: log of mean absolute deviation raw intensity
(package private)  float logMeanAbsDevRI
          total array: Filter hist: log of mean absolute deviation raw intensity
(package private)  float logMeanRI
          total array: mean of log of rawIntensity
(package private)  float logMiddle
          total array: -logMinRatioRI for finding RI==1.0
(package private)  float logMinRatioRI
          total array: log minRatioRI
(package private)  float logMinRI
          total array: log of minRI
(package private)  float logRange
          total array: log ratio range [Rmin:Rmax]
(package private)  float logStdDev
          Filter hist: log of stdDev raw intensity
(package private)  float logStdDevRI
          total array: std dev of log of means
(package private)  float madHPri
          total array: rawIntens meanAbsDev, all genes in HP w/o bkgrd
(package private)  MAExplorer mae
          link to global MAExplorer instance
private  Maps map
          link to global Maps instance
(package private)  float maxDataF1
          max intens values F1 in getF1F2list
(package private)  float maxDataF2
          max intens values F2 in getF1F2list
(package private)  float maxDataS
          current norm: scaled max data
(package private)  float maxFV
          maximum and fractions of dynamic range
(package private)  float maxHistData
          total array: mode hist data value
(package private)  float maxIntens
          max intensity of histogram data
(package private)  float maxRatioRI
          total array: max(f1RI/f2RI) for all spots
(package private)  float maxRaw
          total array: if Ratio, maximum of range of F1 or F2 RawIntens
(package private)  float maxRawS
          current norm: scaled maxRaw data
(package private)  float maxRI
          total array: range of RI or ratio
(package private)  float maxRI1
          total array: range of RawIntensity1
(package private)  float maxRI2
          total array: range of RawIntensity2
(package private)  float mean
          Filter hist: mean raw intensity
(package private)  float meanAbsDev
          Filter hist: mean absolute deviation raw intensity
(package private)  float meanCalDNA
          mean 'calibration DNA' intensity
(package private)  int meanIdx
          Filter hist: index of mean raw intensity
(package private)  float meanIntens
          mean of histogram data
(package private)  float meanUseGeneSet
          mean 'User Filter Gene set' intensity
(package private)  float median
          Filter hist: median raw intensity
(package private)  float medianF1
          median of F1 channel
(package private)  float medianF1Bkgd
          median background of F1 channel
(package private)  float medianF2
          median of F2 channel if present
(package private)  float medianF2Bkgd
          median background of F2 channel if present
(package private)  int medianIdx
          Filter hist: index of median raw intensity
(package private)  float medianIntens
          median of histogram data
(package private)  float medianRI
          total array: median value of rawIntensity
(package private)  java.lang.String menuTitle
          string to use in Sample menu entry
(package private)  float minDataF1
          min intens values F1 in getF1F2list
(package private)  float minDataF2
          min intens values F2 in getF1F2list
(package private)  float minDataS
          current norm: scaled min data
(package private)  float minHistData
          total array: min hist data value
(package private)  float minIntens
          min intensity of histogram data
(package private)  float minRatioRI
          total array: min(f1RI/f2RI) for all spots
(package private)  float minRaw
          total array: if Ratio, minimum of range of F1 or F2 RawIntens
(package private)  float minRawS
          current norm: scaled minRaw data
(package private)  float minRI
          total array: range of RI or ratio
(package private)  float minRI1
          total array: range of RawIntensity1
(package private)  float minRI2
          total array: range of RawIntensity2
(package private)  float mnHPri
          total array: rawIntens mean, all genes in HP w/o bkgrd
(package private)  float mnHPri1
          total array: rawIntens f1 mean, all genes in HP w/o bkgrd
(package private)  float mnHPri2
          total array: rawIntens f2 mean, all genes in HP w/o bkgrd
(package private)  float mode
          Filter hist: mode raw intensity
(package private)  int modeIdx
          Filter hist: index of mode raw intensity
(package private)  float modeIntens
          mode of histogram data
(package private)  float modeRI
          total array: mode value of rawIntensity
(package private)  int nBins
          number of bins in histogram.
(package private)  boolean needLoginFlag
          flag: set if requires login for this HP for it's projectName
(package private)  float normFactor
          normalization factor for all intensity data so we can compare intensity between HP samples.
(package private)  java.lang.String oImageName
          (opt) original image filename
(package private)  java.lang.String prjName
          project this HP sample belongs to
(package private)  float[] qualChkQ
          (opt) list of spot specific quality check using Gene.XXX properties for all spots
(package private)  float ratioMedianBkgdScale
          may be set if Cy3/Cy5 median bkgrd scale correction
(package private)  float ratioMedianScale
          may be set if Cy3/Cy5 median scale correction.
(package private)  java.lang.String sampleID
          English name of the sample
(package private)  float scaleCalDNA
          scale factor for scaling by calDNA
(package private)  float scaleCalDNAto65K
          scale factor for scaling by calDNA but max for all HPs is 65K
(package private)  float scaleToMaxIV
          total array: maxFV/maxRIscale factor to compute max range
(package private)  float scaleUseGeneSet
          scale factor for 'User Filter Gene set'
(package private)  float scaleUseGeneSetTo65K
          scale factor for 'User Filter Gene Set' but max for all HPs is 65K
(package private)  float sdHPri
          total array: rawIntens StdDev, all genes in HP w/o bkgrd
(package private)  float sdHPri1
          total array: rawIntens f1 StdDev, all genes in HP w/o bkgrd
(package private)  float sdHPri2
          total array: rawIntens f2 StdDev, all genes in HP w/o bkgrd
private  Statistics stat
          link to global Statistics instance
(package private)  float stdDev
          Filter hist: std deviation raw intensity
(package private)  float stdDevCalDNA
          stddev 'calibration DNA' intensity
(package private)  float stdDevUseGeneSet
          stddev 'User Filter Gene Set' intensity
(package private)  boolean swapCy5Cy3DataFlag
          flag: swapped Cy3 (Field1) and Cy5 (Field 2) data
(package private)  java.lang.String[] textHP
          title for each HP grid
(package private)  float[] totQ
          list of raw intensity data/spot, unscaled
(package private)  java.awt.Point upPoint
          [FUTURE] for dragging- could be used for defining rubber-band regions
(package private)  int[] x_textQ
          position of X grid label for PseudoImage
(package private)  int xCmax
          total array: max X coord mapped to MAE coord
(package private)  int xCmin
          total array: min X coord mapped to MAE coord
(package private)  java.awt.Point[] xyCQ
          (X,Y) of data from original array (if present) mapped to MAExplorer coordinate system or generated for PseudoArray Image
(package private)  int[] xyImgCQ_X
          (opt) X original image X coords scaled by 2.0.
(package private)  int[] xyImgCQ_Y
          (opt) X original image X coords scaled by 2.0.
(package private)  int[] y_textQ
          position of Y grid label for PseudoImage
(package private)  int yCmax
          total array: max Y coord mapped to MAE coord
(package private)  int yCmin
          total array: min Y coord mapped to MAE coord
 
Constructor Summary
(package private) MaHybridSample(MAExplorer mae, java.lang.String hybSampleName, java.lang.String sampleID, java.lang.String databaseFileID, java.lang.String oImageName, java.lang.String menuTitle, java.lang.String fullStageText, java.lang.String projectName, boolean needLoginFlag, boolean swapCy5Cy3DataFlag, int idxHybridSample)
          MaHybridSample() - constuctor for an instance of a Microarray hybridized sample data
 
Method Summary
(package private)  boolean calcIntensHist()
          calcIntensHist() - compute Filtered spot intensity histogram for this sample It gets the normalized data from SpotData.
(package private)  boolean calcIntensScaleExtrema()
          calcIntensScaleExtrema() - calculate intensity scale factor extrema for current normalization mode.
(package private)  boolean calcMeanCalDNA()
          calcMeanCalDNA() - calculate mean and stdDev RAW intensity Calibration DNA.
(package private)  boolean calcMeanUseNormGeneSet()
          calcMeanUseNormGeneSet() - calculate mean and stdDev RAW intensity.
(package private)  void clearHPglobalStats()
          clearHPglobalStats() - clear global array statistics before compute actual ranges
(package private)  boolean computeMinMaxF1F2Data(boolean useF1F2ratioFlag, boolean useAllGenesFlag)
          computeMinMaxF1F2Data() - compute F1 F2 min and max raw intensity extrema.
(package private)  float cvHist2RIscale(float hData)
          cvHist2RIscale() - convert histogram scale to raw intensity data for the gid.
(package private)  float cvRI2HistScale(int gid)
          cvRI2HistScale() - convert raw intensity to histogram scale data for the gid.
(package private)  boolean cvtRawQdataToMAEdata(boolean screenGoodGenesFlag)
          cvtRawQdataToMAEdata() - convert .quant data to MAE data using HP array data ms.(bkgrdQ,totQ)[] Note: totQ is RawIntensity, or unscaled ratio RawIntensity1/RawIntensity2.
(package private)  float getDataByGID(int gid, boolean useF1F2ratioFlag, int type)
          getDataByGID() - get scaled intensity data specified by gid and data type.
(package private)  int getF1F2Data(float[] xList, float[] yList, int[] propList, GeneList ml, boolean setPropsFlag, boolean useF1F2ratioFlag, boolean filterByMLflag)
          getF1F2Data() - get list spot (F1,F2)'s intensity data for data filtered genes and return it in the xList[1:n] is the field 1 data, yList[0:n-1] is field 2 data and the property in propList[0:n-1].
(package private)  float getRawBkgrd(int gid)
          getRawBkgrd() - get raw background intensity specified by the gid.
(package private)  float getRawDataByGID(int gid, boolean useF1F2ratioFlag, int type)
          getRawDataByGID() - get raw data specified by gid and data type.
(package private)  float getRawIntens(int gid, boolean useF1F2ratioFlag)
          getRawIntens() - get spot (rawIntensity - rawBackground) data by gid and data type
(package private)  SpotData getSpotData12Static(int gid1, int gid2, boolean useF1F2ratioFlag)
          getSpotData12Static() - get STATIC scaled spot data object for gid1, gid2.
(package private)  SpotData getSpotDataStatic(int gid, boolean useF1F2ratioFlag)
          getSpotDataStatic() - get a STATIC scaled spot data object for this gid.
(package private)  int lookupGeneFromXY(java.awt.Point xy)
          lookupGeneFromXY() - lookup mid if find Point xy in sample HP pseudoarray image
(package private)  boolean readHPquantFile(int hpNbr)
          readHPquantFile() - read the hybridized sample Quant File.
(package private)  boolean recalcGlobalStats(boolean useGoodSpotsOnlyFlag)
          recalcGlobalStats() - recalculate global array statistics for all or just Good Spots.
(package private)  float scaleIntensData(float dataI)
          scaleIntensData() - scale raw intensity data as function of normalization mode.
(package private)  float scaleIntensData(float dataI, int gid)
          scaleIntensData() - scale raw intensity data as function of normalization mode.
private  void setupHybSampleData()
          setupHybSampleData() - setup for .quant file for this hybridized sample.
(package private)  boolean swapCy5Cy3AndReCalcStats()
          swapCy5Cy3AndReCalcStats() - swap Cy3 and Cy5, recalculate statistics for this sample.
(package private)  boolean validateHybSample(java.lang.String projectName)
          validateHybSample() - validate if login is required for this sample for this project.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

mae

MAExplorer mae
link to global MAExplorer instance

map

private Maps map
link to global Maps instance

fc

private Filter fc
link to global Filter instance

stat

private Statistics stat
link to global Statistics instance

gct

private GeneClass gct
link to global GeneClass instance

DATA_MEAN_F1F2TOT

static final int DATA_MEAN_F1F2TOT
type code: for (f1+f2)/2 data

DATA_RATIO_F1F2TOT

static final int DATA_RATIO_F1F2TOT
type code: for f1/f2 data

DATA_F1TOT

static final int DATA_F1TOT
type code: for f1 data

DATA_F2TOT

static final int DATA_F2TOT
type code: for f2 data

menuTitle

java.lang.String menuTitle
string to use in Sample menu entry

prjName

java.lang.String prjName
project this HP sample belongs to

fullStageText

java.lang.String fullStageText
full Stage text name of hybridized sample used in menus, etc

oImageName

java.lang.String oImageName
(opt) original image filename

sampleID

java.lang.String sampleID
English name of the sample

databaseFileID

java.lang.String databaseFileID
(opt) DatabaseFileID used with some databases (eg. mAdb)

hpName

java.lang.String hpName
basename hybridized sample DB file name without file extension

idxHP

int idxHP
index in list of all samples (mae.hps.msList[]) for this HP sample

minDataF1

float minDataF1
min intens values F1 in getF1F2list

minDataF2

float minDataF2
min intens values F2 in getF1F2list

maxDataF1

float maxDataF1
max intens values F1 in getF1F2list

maxDataF2

float maxDataF2
max intens values F2 in getF1F2list

gidMinF1

float gidMinF1
gid for min intens values F1 in getF1F2list

gidMinF2

float gidMinF2
gid for min intens values F2 in getF1F2list

gidMaxF1

float gidMaxF1
gid for max intens values F1 in getF1F2list

gidMaxF2

float gidMaxF2
gid for max intens values F2 in getF1F2list

meanIdx

int meanIdx
Filter hist: index of mean raw intensity

modeIdx

int modeIdx
Filter hist: index of mode raw intensity

medianIdx

int medianIdx
Filter hist: index of median raw intensity

maxFV

float maxFV
maximum and fractions of dynamic range

deltaBin

float deltaBin
Filter hist: #bins/maxData-minData)

mean

float mean
Filter hist: mean raw intensity

mode

float mode
Filter hist: mode raw intensity

median

float median
Filter hist: median raw intensity

stdDev

float stdDev
Filter hist: std deviation raw intensity

meanAbsDev

float meanAbsDev
Filter hist: mean absolute deviation raw intensity

logMean

float logMean
Filter hist: log of mean raw intensity

logStdDev

float logStdDev
Filter hist: log of stdDev raw intensity

logMeanAbsDev

float logMeanAbsDev
Filter hist: log of mean absolute deviation raw intensity

ratioMedianScale

float ratioMedianScale
may be set if Cy3/Cy5 median scale correction. It is estimated (medianF2/medianF1).

ratioMedianBkgdScale

float ratioMedianBkgdScale
may be set if Cy3/Cy5 median bkgrd scale correction

stdDevUseGeneSet

float stdDevUseGeneSet
stddev 'User Filter Gene Set' intensity

meanUseGeneSet

float meanUseGeneSet
mean 'User Filter Gene set' intensity

scaleUseGeneSet

float scaleUseGeneSet
scale factor for 'User Filter Gene set'

scaleUseGeneSetTo65K

float scaleUseGeneSetTo65K
scale factor for 'User Filter Gene Set' but max for all HPs is 65K

stdDevCalDNA

float stdDevCalDNA
stddev 'calibration DNA' intensity

meanCalDNA

float meanCalDNA
mean 'calibration DNA' intensity

scaleCalDNA

float scaleCalDNA
scale factor for scaling by calDNA

scaleCalDNAto65K

float scaleCalDNAto65K
scale factor for scaling by calDNA but max for all HPs is 65K

medianF1

float medianF1
median of F1 channel

medianF2

float medianF2
median of F2 channel if present

medianF1Bkgd

float medianF1Bkgd
median background of F1 channel

medianF2Bkgd

float medianF2Bkgd
median background of F2 channel if present

maxDataS

float maxDataS
current norm: scaled max data

minDataS

float minDataS
current norm: scaled min data

maxRawS

float maxRawS
current norm: scaled maxRaw data

minRawS

float minRawS
current norm: scaled minRaw data

downPoint

java.awt.Point downPoint
[FUTURE] for dragging- could be used for defining rubber-band regions

upPoint

java.awt.Point upPoint
[FUTURE] for dragging- could be used for defining rubber-band regions

textHP

java.lang.String[] textHP
title for each HP grid

x_textQ

int[] x_textQ
position of X grid label for PseudoImage

y_textQ

int[] y_textQ
position of Y grid label for PseudoImage

doRatioFlag

boolean doRatioFlag
flag: if maxFIELD==1 && useRatioDataFlag

swapCy5Cy3DataFlag

boolean swapCy5Cy3DataFlag
flag: swapped Cy3 (Field1) and Cy5 (Field 2) data

needLoginFlag

boolean needLoginFlag
flag: set if requires login for this HP for it's projectName

hasXYimageCQflag

boolean hasXYimageCQflag
flag: has xyImgCQ_X/Y[] data for Montage image

dataFromStateFileFlag

boolean dataFromStateFileFlag
flag: set if can get data from .state file

dataAvailFromQuantFileFlag

boolean dataAvailFromQuantFileFlag
set if can get quant data data from .quant file

hist

int[] hist
normalized intensity histogram [0:nBins]

nBins

int nBins
number of bins in histogram. will be MAExplorer.MAX_INTENSITY

medianIntens

float medianIntens
median of histogram data

meanIntens

float meanIntens
mean of histogram data

modeIntens

float modeIntens
mode of histogram data

maxIntens

float maxIntens
max intensity of histogram data

minIntens

float minIntens
min intensity of histogram data

normFactor

float normFactor
normalization factor for all intensity data so we can compare intensity between HP samples.

BGLowQ

float BGLowQ
low background estimate for entire array

BGAvgQ

float BGAvgQ
Average background for entire array

BGRmsQ

float BGRmsQ
RMS background for entire array

bkgrdQ

float bkgrdQ
raw background intensity, unscaled

bkgrdSpotQ

float[] bkgrdSpotQ
list of raw background intensity data/spot, unscaled

totQ

float[] totQ
list of raw intensity data/spot, unscaled

detValueQ

float[] detValueQ
(opt) list of spot Detection Value within spot for all spots. e.g. Affymetrix "Detection p-value", etc.

qualChkQ

float[] qualChkQ
(opt) list of spot specific quality check using Gene.XXX properties for all spots

gidMapQ

int[] gidMapQ
map GridCoord id for [f][g][r][c] for each row of this sample's tData[].

xyCQ

java.awt.Point[] xyCQ
(X,Y) of data from original array (if present) mapped to MAExplorer coordinate system or generated for PseudoArray Image

xyImgCQ_X

int[] xyImgCQ_X
(opt) X original image X coords scaled by 2.0. The (X,Y) mapped of original image was mapped to scaled down image for use in generating montage images.

xyImgCQ_Y

int[] xyImgCQ_Y
(opt) X original image X coords scaled by 2.0. The (X,Y) mapped of original image was mapped to scaled down image for use in generating montage images.

hasActualXYcoordsFlag

boolean hasActualXYcoordsFlag
flag: set if have actual XY coords - not pseudoCoords

hasBkgrdPerSpotFlag

boolean hasBkgrdPerSpotFlag
flag: set if have bkgrd intens/spot

hasQualChkFlag

boolean hasQualChkFlag
flag: if using "QualCheck" field

hasDetValueSpotDataFlag

boolean hasDetValueSpotDataFlag
flag: if using spot data "CorrCoef" or "DetValue" field

implicitFieldsFlag

boolean implicitFieldsFlag
flag: set true if no "field" field

flipRowsColsFlag

boolean flipRowsColsFlag
flag: flip rows and columns

hasValidDataFlag

boolean hasValidDataFlag
flag: set if .quant array data is set up ok

minHistData

float minHistData
total array: min hist data value

maxHistData

float maxHistData
total array: mode hist data value

mnHPri

float mnHPri
total array: rawIntens mean, all genes in HP w/o bkgrd

sdHPri

float sdHPri
total array: rawIntens StdDev, all genes in HP w/o bkgrd

madHPri

float madHPri
total array: rawIntens meanAbsDev, all genes in HP w/o bkgrd

mnHPri1

float mnHPri1
total array: rawIntens f1 mean, all genes in HP w/o bkgrd

sdHPri1

float sdHPri1
total array: rawIntens f1 StdDev, all genes in HP w/o bkgrd

mnHPri2

float mnHPri2
total array: rawIntens f2 mean, all genes in HP w/o bkgrd

sdHPri2

float sdHPri2
total array: rawIntens f2 StdDev, all genes in HP w/o bkgrd

scaleToMaxIV

float scaleToMaxIV
total array: maxFV/maxRIscale factor to compute max range

logMeanRI

float logMeanRI
total array: mean of log of rawIntensity

logStdDevRI

float logStdDevRI
total array: std dev of log of means

logMeanAbsDevRI

float logMeanAbsDevRI
total array: Filter hist: log of mean absolute deviation raw intensity

logMaxRI

float logMaxRI
total array: log of maxRI

logMinRI

float logMinRI
total array: log of minRI

medianRI

float medianRI
total array: median value of rawIntensity

modeRI

float modeRI
total array: mode value of rawIntensity

minRI

float minRI
total array: range of RI or ratio

maxRI

float maxRI
total array: range of RI or ratio

minRI1

float minRI1
total array: range of RawIntensity1

maxRI1

float maxRI1
total array: range of RawIntensity1

minRI2

float minRI2
total array: range of RawIntensity2

maxRI2

float maxRI2
total array: range of RawIntensity2

minRaw

float minRaw
total array: if Ratio, minimum of range of F1 or F2 RawIntens

maxRaw

float maxRaw
total array: if Ratio, maximum of range of F1 or F2 RawIntens

deltaHistBin

float deltaHistBin
total array: width of a logRatio histogram bin

maxRatioRI

float maxRatioRI
total array: max(f1RI/f2RI) for all spots

minRatioRI

float minRatioRI
total array: min(f1RI/f2RI) for all spots

logMaxRatioRI

float logMaxRatioRI
total array: log maxRatioRI

logMinRatioRI

float logMinRatioRI
total array: log minRatioRI

logRange

float logRange
total array: log ratio range [Rmin:Rmax]

logDeltaBin

float logDeltaBin
total array: (mae.MAX_INTENSITY/logRange)

logMiddle

float logMiddle
total array: -logMinRatioRI for finding RI==1.0

xCmax

int xCmax
total array: max X coord mapped to MAE coord

yCmax

int yCmax
total array: max Y coord mapped to MAE coord

xCmin

int xCmin
total array: min X coord mapped to MAE coord

yCmin

int yCmin
total array: min Y coord mapped to MAE coord
Constructor Detail

MaHybridSample

MaHybridSample(MAExplorer mae,
               java.lang.String hybSampleName,
               java.lang.String sampleID,
               java.lang.String databaseFileID,
               java.lang.String oImageName,
               java.lang.String menuTitle,
               java.lang.String fullStageText,
               java.lang.String projectName,
               boolean needLoginFlag,
               boolean swapCy5Cy3DataFlag,
               int idxHybridSample)
MaHybridSample() - constuctor for an instance of a Microarray hybridized sample data
Parameters:
mae - is instance of MAExplorer
hybSampleName - is the sample name
sampleID - is the free text form of the sample name
databaseFileID - is the (opt) database file ID
oImageName - is the image name
menuTitle - is the string used in Sample menu entry
fullStageText - is the full Stage text name
projectName - is the project this HP sample belongs
needLoginFlag - indicates that it requires login for projectName
swapCy5Cy3DataFlag - indicates that swap (Cy3,Cy5) data
idxHybridSample - is the index in hps.msList[] entry for this sample
See Also:
FileIO.logMsgln(java.lang.String), Util.showMsg(java.lang.String), setupHybSampleData(), validateHybSample(java.lang.String)
Method Detail

setupHybSampleData

private void setupHybSampleData()
setupHybSampleData() - setup for .quant file for this hybridized sample. This includes: reading .quant file, and setup grid mappings, default normalization constants.
See Also:
GridCoords.createIndexToGridCoordMap(), calcIntensScaleExtrema(), readHPquantFile(int)

validateHybSample

boolean validateHybSample(java.lang.String projectName)
validateHybSample() - validate if login is required for this sample for this project. Test if need to get user login to proceed. Check needLoginFlag which was set from HP entry in the Samples table if Login is set to true.
 If the user had already logged in and the project is the
    mae.validProjects[0:mae.nValidProjects-1] list, then don't
 check since already logged in.
 Otherwise, get the (uN,uPW) from popup dialog and then check
 with the server to see if the (uN,uPW,uPrj) is in the password file.

 If the login is OK, then it has the side effect of setting
   mae.curProjName= projectName;
   mae.isLoggedInFlag= true;
   this.needLoginFlag= false;
 Also push projectName into the list of projects.
   mae.validProjects[mae.nValidProjects++]
Parameters:
projectName - project name for this database
Returns:
true if login is OK.
See Also:
UserState.validateUserProject(java.lang.String, java.lang.String, java.lang.String)

readHPquantFile

boolean readHPquantFile(int hpNbr)
readHPquantFile() - read the hybridized sample Quant File. Note the .quant data files are in the /Quant subdirectory! [TODO] fixup so can use with mAdb CGI server.
Parameters:
hpNbr - is the sample number in the msList[] list of samples..
Returns:
false if failed.
See Also:
FileIO.logMsgln(java.lang.String), MaHPquantTable, MathMAE.logZero(double)

lookupGeneFromXY

int lookupGeneFromXY(java.awt.Point xy)
lookupGeneFromXY() - lookup mid if find Point xy in sample HP pseudoarray image
Parameters:
xy - is the xy coordinate near the spot.
Returns:
MID if found else -1.

scaleIntensData

float scaleIntensData(float dataI)
scaleIntensData() - scale raw intensity data as function of normalization mode. This is called on a per-spot basis. This calls the extended for with (mid,gid,sampleNbr)=(0,0,0).
Parameters:
dataI - is the raw intensity of a spot
Returns:
the scaled intensity
See Also:
MaeJavaAPI.getActiveNormalization(), MaeJavaAPI.getNormalizationState()

scaleIntensData

float scaleIntensData(float dataI,
                      int gid)
scaleIntensData() - scale raw intensity data as function of normalization mode. This method uses the gid and sample number (idxHP) in case it is needed. This is called on a per-spot basis.
Parameters:
dataI - is the raw intensity of a spot
gid - is GID of the spot
Returns:
the scaled intensity
See Also:
MaeJavaAPI.getActiveNormalization(), MaeJavaAPI.getNormalizationState()

cvRI2HistScale

float cvRI2HistScale(int gid)
cvRI2HistScale() - convert raw intensity to histogram scale data for the gid. The hist scale is [0:mae.MAX_INTENSITY-1].
 Get the raw intensity data for spot gid and scale to
  a) log(f1/f2) if ratio mode
  b) raw intensity for spot ms.scaleToMaxIV if > 65K
  c) else raw intensity for spot.
Parameters:
gid - is Grid Index ID
Returns:
histogram scaled data.
See Also:
MathMAE.logZero(double)

cvHist2RIscale

float cvHist2RIscale(float hData)
cvHist2RIscale() - convert histogram scale to raw intensity data for the gid. The hist scale is [0:mae.MAX_INTENSITY-1].
 Get raw intensity data inverse histogram data for
  a) log(f1/f2) if ratio mode
  b) raw intensity for spot ms.scaleToMaxIV if > 65K
  c) else raw intensity for spot.
Parameters:
hData - is the histogram value to be scaled
Returns:
histogram scaled data.

calcIntensScaleExtrema

boolean calcIntensScaleExtrema()
calcIntensScaleExtrema() - calculate intensity scale factor extrema for current normalization mode.
Returns:
true if successful.
See Also:
MaeJavaAPI.getActiveNormalization(), MaeJavaAPI.getNormalizationState()

getSpotDataStatic

SpotData getSpotDataStatic(int gid,
                           boolean useF1F2ratioFlag)
getSpotDataStatic() - get a STATIC scaled spot data object for this gid.
Parameters:
gid - is the Grid Index (GID)
useF1F2ratioFlag - to compute F1/F2 ratio data
Returns:
data instance else null if there is no data or there is a problem.
See Also:
SpotData.setSpotData(MaHybridSample, int, int, int, float), getRawIntens(int, boolean), scaleIntensData(float)

getSpotData12Static

SpotData getSpotData12Static(int gid1,
                             int gid2,
                             boolean useF1F2ratioFlag)
getSpotData12Static() - get STATIC scaled spot data object for gid1, gid2.
Parameters:
gid1 - is the Grid Index (GID) F1
gid2 - is the Grid Index (GID) F2
useF1F2ratioFlag - to compute F1/F2 ratio data
Returns:
data else null if there is no data or there is a problem.
See Also:
SpotData.setSpotData1(MaHybridSample, java.awt.Point, int, float), SpotData.setSpotData2(MaHybridSample, java.awt.Point, int, float), getRawIntens(int, boolean), scaleIntensData(float)

getF1F2Data

int getF1F2Data(float[] xList,
                float[] yList,
                int[] propList,
                GeneList ml,
                boolean setPropsFlag,
                boolean useF1F2ratioFlag,
                boolean filterByMLflag)
getF1F2Data() - get list spot (F1,F2)'s intensity data for data filtered genes and return it in the xList[1:n] is the field 1 data, yList[0:n-1] is field 2 data and the property in propList[0:n-1]. Also add the gene list data for each entry.
Parameters:
xList[max - # genes to get] Return F1 values
yList[max - # genes to get] Return optional F2 values
propList[max - # genes to get] gene property values
ml - is the GeneList to save genes in if not null or filter by GeneList. To filter by all genes, set ml to set of all genes mae.gct.allGenesCL
setPropsFlag - set the propList[] data from workingCL as IS_FILTERED or IS_NOT_FILTERED
useF1F2ratioFlag - pass onto getSpotData12Static()
filterByMLflag - if true, then filter by ml GeneList.
Returns:
the number of genes pushed. If the list length is shorter than the number of genes to be copied, then do not save the remaining genes, but return the total count so the caller can test if they got them all if the return size equals the (xList[], yList[]) sizes.
See Also:
Gene.setGeneData(float), GeneBitSet.isItemInGeneBitSet(int), GeneList.clearNull(), GeneList.setGene(Gene, int), Filter.isMIDinWorkingCL(int), getSpotData12Static(int, int, boolean)

computeMinMaxF1F2Data

boolean computeMinMaxF1F2Data(boolean useF1F2ratioFlag,
                              boolean useAllGenesFlag)
computeMinMaxF1F2Data() - compute F1 F2 min and max raw intensity extrema. The results are saved in (minDataF1, minDataF2, maxDataF1, maxDataF2).
Parameters:
useF1F2ratioFlag - to compute F1/F2 ratio data
useAllGenesFlag - to use all genes else use the workingCL gene list
Returns:
true if succeed
See Also:
Filter.isMIDinWorkingCL(int), getSpotData12Static(int, int, boolean)

getDataByGID

float getDataByGID(int gid,
                   boolean useF1F2ratioFlag,
                   int type)
getDataByGID() - get scaled intensity data specified by gid and data type. Note: this may get the F1 and F2 data, its mean or its ratio. If it is ratio, then the data is precomputed in totQ[].
Parameters:
gid - is the Grid Index GID for spot
useF1F2ratioFlag - to compute F1/F2 ratio data
type - is DATA_MEAN_F1F2TOT or DATA_RATIO_F1F2TOT, DATA_F1TOT, or DATA_F2TOT
Returns:
data
See Also:
getSpotDataStatic(int, boolean), getSpotData12Static(int, int, boolean)

getRawDataByGID

float getRawDataByGID(int gid,
                      boolean useF1F2ratioFlag,
                      int type)
getRawDataByGID() - get raw data specified by gid and data type. If background correction is enabled, then return background corrected raw intensity. Note: this may get the F1 and F2 data, its mean or its ratio.
Parameters:
gid - is the GeneID GID for the spot
useF1F2ratioFlag - if set get the F1/F2 ratio else F1 data
type - is access method: DATA_MEAN_F1F2TOT, DATA_RATIO_F1F2TOT, DATA_F1TOT, or DATA_F2TOT
Returns:
raw intensity value for this sample
See Also:
getRawIntens(int, boolean)

getRawIntens

final float getRawIntens(int gid,
                         boolean useF1F2ratioFlag)
getRawIntens() - get spot (rawIntensity - rawBackground) data by gid and data type
 If background subtraction is enabled then
   I1= (signal1 - bkgrdQ1)and I2= (signal2 - bkgrdQ2).
 else
   I1= signal1, and I2= signal2.
 If using ratio data, then return ratio (I1/I2) else I1.
 If using ratioMedianScaling, then also multiply ratio data
 by scaling factor (ratioMedianScale if not subtracting
 background and by ratioMedianBkgdScale if we are subtracting
 background).
Parameters:
gid - is the Grid index ID GID for the spot
useF1F2ratioFlag - then return ratio of F1/F2 else F1.
Returns:
raw intensity value for this sample. If no sample is defined, then return 0.0F.
See Also:
Maps

getRawBkgrd

final float getRawBkgrd(int gid)
getRawBkgrd() - get raw background intensity specified by the gid. If using ratio data, then return ratio, else intensity data.
Parameters:
gid - is the Grid index ID GID for the spot
Returns:
data

calcIntensHist

boolean calcIntensHist()
calcIntensHist() - compute Filtered spot intensity histogram for this sample It gets the normalized data from SpotData. The data is scaled to the (minRI,maxRI) range of the data. It also computes (meanIntens, modeIntens, maxIntens, and minIntens).
Returns:
true if succeed
See Also:
Filter.isMIDinWorkingCL(int), Statistics.calcHistStats(java.lang.String, int, float[], int), cvHist2RIscale(float), getDataByGID(int, boolean, int)

calcMeanCalDNA

boolean calcMeanCalDNA()
calcMeanCalDNA() - calculate mean and stdDev RAW intensity Calibration DNA. These are saved in this instance of (meanCalDNA, stdDevCalDNA) The number of calibration DNA genes are in GeneNames.calDNACL.length
Returns:
true if successful.
See Also:
Statistics.calcHistStats(java.lang.String, int, float[], int), cvHist2RIscale(float), getRawDataByGID(int, boolean, int)

calcMeanUseNormGeneSet

boolean calcMeanUseNormGeneSet()
calcMeanUseNormGeneSet() - calculate mean and stdDev RAW intensity. These are saved in this instance of (meanUseGeneSet, stdDevUseGeneSet) The number of normCL genes are in fc.normCL.length
Returns:
true if successful.
See Also:
Statistics.calcHistStats(java.lang.String, int, float[], int), cvHist2RIscale(float), getRawDataByGID(int, boolean, int)

swapCy5Cy3AndReCalcStats

boolean swapCy5Cy3AndReCalcStats()
swapCy5Cy3AndReCalcStats() - swap Cy3 and Cy5, recalculate statistics for this sample. toggle swapCy5Cy3DataFlag.
Returns:
true if succeed.

clearHPglobalStats

void clearHPglobalStats()
clearHPglobalStats() - clear global array statistics before compute actual ranges

recalcGlobalStats

boolean recalcGlobalStats(boolean useGoodSpotsOnlyFlag)
recalcGlobalStats() - recalculate global array statistics for all or just Good Spots.
Parameters:
useGoodSpotsOnlyFlag - to only use good spots in computing statistics.
Returns:
true if successful.
See Also:
clearHPglobalStats(), cvtRawQdataToMAEdata(boolean)

cvtRawQdataToMAEdata

boolean cvtRawQdataToMAEdata(boolean screenGoodGenesFlag)
cvtRawQdataToMAEdata() - convert .quant data to MAE data using HP array data ms.(bkgrdQ,totQ)[] Note: totQ is RawIntensity, or unscaled ratio RawIntensity1/RawIntensity2.
Compute the statistics (ms.mnHPiq, ms.sdHPiq) etc. for all data points in HP for: f1, f2, f1/f2.
If doing ratio (f1/f2), map log(f1/f2) to [0:mae.MAX_INTENSITY] do statistics and then map back to (f1/f2) space.

Parameters:
screenGoodGenesFlag - to only use good spots in computing statistics.
Returns:
true if successful.
See Also:
MathMAE.logZero(double), Statistics.calcHistStats(java.lang.String, int, float[], int), cvHist2RIscale(float), cvRI2HistScale(int)