Class Report

java.lang.Object
  |
  +--Report

class Report
extends java.lang.Object

The class generates a popup report window for either HP sample or Gene reports. There are many varients for these reports and these are specified by the reportMode argument. There may be multiple Report instances if the reportMode is different for different reports.

 
List of report modes (defined in MAExplorer class)
  RPT_TBL_SAMPLES_DB_INFO         - array report of SamplesDB  
  RPT_TBL_HP_DB_INFO              - array report of extra Info samples data (DEPRICATED)       
  RPT_TBL_SAMPLES_WEB_LINKS       - array report with active Web links 
  RPT_TBL_HP_XY_SET_STAT          - array samples set statistics 
  RPT_TBL_OCL_STAT                - array OCL statistics 
  RPT_TBL_HP_MN_VAR_STAT          - array samples mean and variance statistics 
  RPT_TBL_HP_HP_CORR              - HP vs HP correlation coefficient for only filtered genes      
  RPT_TBL_CALIB_DNA_STAT          - array samples Calibration DNA statistics   
  RPT_TBL_MAE_PRJ_DB              - project database  

  RPT_TBL_HIGH_RATIO              - highest N HP-X/HP-Y ratio genes
  RPT_TBL_LOW_RATIO               - lowest N HP-X/HP-Y ratio genes
  RPT_TBL_HIGH_F1F2               - highest N current HP F1/F2 ratio genes 
  RPT_TBL_LOW_F1F2                - lowest N current HP F1/F2 ratio genes
  RPT_TBL_FILTERED_GENES          - data Filtered genes
  RPT_TBL_GENE_CLASS              - genes in current GencClass
  RPT_TBL_NAMED_GENES             - all named genes
  RPT_TBL_EXPR_PROFILE            - expression profiles of filtered genes 
  RPT_TBL_CUR_GENE_CLUSTER        - current gene clustering statistics
  RPT_TBL_ALL_GENES_CLUSTER       - all genes clustering statistics 
  RPT_TBL_KMEANS_CLUSTER          - K-means clustering statistics      
  RPT_TBL_MN_KMEANS_CLUSTER       - mean clusters for K-means clusters statistics       
  RPT_TBL_EDITED_GENE_LIST        - Edited Gene List       
  RPT_TBL_NORMALIZATION_GENE_LIST - Normalization gene list statistics  
  RPT_TBL_HIER_CLUSTER           -  hierarchical clusters gene statistics 

Reports may be either tab-delimited (using ShowStringPopup) or dynamic spreadsheets and this is specified the the state variable using the tblFmtMode set to either RPT_FMT_TAB_DELIM or RPT_FMT_DYN.

The font size and type used in the reports may also be specified.

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

Field Summary
private  boolean addExprProfFlag
           
private  boolean addHierClusterStatFlag
           
private  boolean addHP_XYstatFlag
           
private  boolean addKmeansClusterStatFlag
           
private  boolean addKmeansMnAndSDstatFlag
           
private  boolean addOCLstatFlag
           
(package private) static int ASCENDING
          flag: sort rows by assending column data
(package private) static int CELL_EXPR_PROFILE
           
(package private) static int CELL_NOP
          Spreadsheet Cell mode: cell has no associated action
(package private) static int CELL_URL
           
private  Config cfg
          link to global Config instance
private  ClusterGenes clg
          link to ClusterGenes instance
(package private) static int DESCENDING
          flag: sort rows by desending column data
(package private) static int DONT_SORT
          flag: Do not sort
private  Filter fc
          link to global Filter instance
private  GipoTable gipo
          link to global GipoTable instance
private  MAExplorer mae
          link to global MAExplorer instance
private  java.lang.String popupName
          ARG: name for for PopupRegistry
private  int popupPropertyBits
          ARG: property bits for PopupRegistry
private  int reportMode
          Report mode
private  java.lang.String rName
          Report name
private  SamplesTable sampDB
          link to global SamplesTable instance
private  int sortDirection
          Sort direction: assending or descending
private  Statistics stat
          link to global Statistics instance
private  int tblFmtMode
          Table format mode: spreadsheet or tab-delim
private  Table updateTable
          Table used for updating a report
private  boolean useEPrawIntensValFlag
           
 
Constructor Summary
(package private) Report(MAExplorer mae, java.lang.String rName, int reportMode, int tblFmtMode, java.lang.String popupName, int popupPropertyBits)
          Report() - constructor for Report
 
Method Summary
(package private)  void close()
          close() - close this popup and reset flags if needed
private  java.lang.String createStrReportOfOCL_FstatData(Gene[] mList, int nC)
          createStrReportOfOCL_FstatData() - make String report of OCL F-test for mList[0:nC-1] If the OCL F-Test filter is active, then report F-test statistics.
private  Table createTableKmeansClusterStats(Gene[] mList, int nC)
          createTableKmeansClusterStats() - make Table of Kmeans clusters for mList[0:nC-1]
private  Table createTableOfExprProfiles(Gene[] mList, int nC, boolean normByHP_Xflag)
          createTableOfExprProfiles() - make Table of expression profiles for mList[0:nC-1]
private  Table createTableOfHP_XYstat(Gene[] mList, int nC)
          createTableOfHP_XYstat() - make Table of HP_XYstatistics for mList[0:nC-1] If the t-Test filter is active, then report t-test statistics If the KS-Test filter is active, then report KS-test statistics
private  Table createTableOfOCL_Fstat(Gene[] mList, int nC)
          createTableOfOCL_Fstat() - make Table of OCL F-test for mList[0:nC-1] If the OCL F-Test filter is active, then report F-test statistics
private  SimpleTable createTotGeneRptTbl(Gene[] mListOrig, int nMlistOrig, int maxGene, java.lang.String title, int sortDirection, java.lang.String dataName, boolean showGeneName, int reportMode)
          createTotGeneRptTbl() - generate total gene report table.
private  Table createTotURLgeneRptTbl(Table kcTbl, Gene[] mListOrig, int nMlistOrig, int maxGene, java.lang.String title, int sortDirection, java.lang.String dataName, int[] cellFormat, boolean showGeneName)
          createTotURLgeneRptTbl() - generate total URL gene report table
private  java.lang.String cvGene2TabDelimStr(Gene gene, int i, java.lang.String dataName, boolean showGeneName, Table epTbl, Table hpxyTbl)
          cvGene2TabDelimStr() - convert a gene to printable tab-delimited string
private  java.lang.String getGeneTabDelimFieldsStr(java.lang.String dataName, boolean showGeneName, Table epTbl, Table hpxyTbl)
          getGeneTabDelimFieldsStr() - create tab delimited gene fields string
(package private)  void makeReport()
          makeReport() - make gene-report instance using reportMode to determine report
(package private)  void setName(java.lang.String rName)
          setName() - set Report name
private  void showGeneReport(Gene[] mListOrig, int nMlistOrig, int maxGenesReported, java.lang.String title, int sortDirection, java.lang.String dataName, boolean showGeneName, int tblFmtMode, int reportMode)
          showGeneReport() - show gene report with top maxGene's.
private  void showPopupSpreadsheetGeneReport(Table kcTbl, Table kcUrlTbl, Gene[] mListOrig, int nMlistOrig, int maxGene, java.lang.String title, int sortDirection, java.lang.String dataName, int[] cellFormat, boolean showGeneName)
          showPopupSpreadsheetGeneReport() - show gene report with top maxGene's.
(package private)  void updateCurGene(int mid)
          updateCurGene() - update report if current gene changed and this type of report requires it.
(package private)  void updateFilter(GeneList ml)
          updateFilter() - update report if Filter using new GeneList ml.
(package private)  void updateLabels()
          updateLabels() - update plot if labels changed and this type of report requires it.
(package private)  void updateSlider()
          updateSlider() - update report if Slider changed and this type of report requires it.
 
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

clg

private ClusterGenes clg
link to ClusterGenes instance

cfg

private Config cfg
link to global Config instance

fc

private Filter fc
link to global Filter instance

gipo

private GipoTable gipo
link to global GipoTable instance

sampDB

private SamplesTable sampDB
link to global SamplesTable instance

stat

private Statistics stat
link to global Statistics instance

DONT_SORT

static final int DONT_SORT
flag: Do not sort

ASCENDING

static final int ASCENDING
flag: sort rows by assending column data

DESCENDING

static final int DESCENDING
flag: sort rows by desending column data

CELL_NOP

static int CELL_NOP
Spreadsheet Cell mode: cell has no associated action

CELL_URL

static int CELL_URL

CELL_EXPR_PROFILE

static int CELL_EXPR_PROFILE

rName

private java.lang.String rName
Report name

reportMode

private int reportMode
Report mode

popupName

private java.lang.String popupName
ARG: name for for PopupRegistry

popupPropertyBits

private int popupPropertyBits
ARG: property bits for PopupRegistry

tblFmtMode

private int tblFmtMode
Table format mode: spreadsheet or tab-delim

updateTable

private Table updateTable
Table used for updating a report

sortDirection

private int sortDirection
Sort direction: assending or descending

useEPrawIntensValFlag

private boolean useEPrawIntensValFlag

addExprProfFlag

private boolean addExprProfFlag

addHP_XYstatFlag

private boolean addHP_XYstatFlag

addOCLstatFlag

private boolean addOCLstatFlag

addHierClusterStatFlag

private boolean addHierClusterStatFlag

addKmeansClusterStatFlag

private boolean addKmeansClusterStatFlag

addKmeansMnAndSDstatFlag

private boolean addKmeansMnAndSDstatFlag
Constructor Detail

Report

Report(MAExplorer mae,
       java.lang.String rName,
       int reportMode,
       int tblFmtMode,
       java.lang.String popupName,
       int popupPropertyBits)
Report() - constructor for Report
Parameters:
mae - is the MAExplorer instance
rName - is the name of the report used for a title etc.
reportMode - is the mae.RPT_xxxx state
tblFmtMode - is table format mode mae.RPT_FMT_xxxx state
popupName - is the name for the PopupRegistry
popupPropertyBits - are the property bits for the PopupRegistry
See Also:
makeReport()
Method Detail

setName

void setName(java.lang.String rName)
setName() - set Report name
Parameters:
rname - is the new report name

makeReport

void makeReport()
makeReport() - make gene-report instance using reportMode to determine report
See Also:
CompositeDatabase.getNormHP_XandYdata(float[], float[], int[], GeneList, MaHybridSample, MaHybridSample, boolean, boolean), Filter.computeWorkingGeneList(), Gene.setGeneData(float), Gene.setGeneData1AndData2(float, float), GeneClass.getGeneListOfCurrentGeneClass(), GeneClass.getGeneListOfGeneClass(java.lang.String), MAExplorer.logDRYROTerr(java.lang.String), MaHybridSample.getF1F2Data(float[], float[], int[], GeneList, boolean, boolean, boolean), SamplesTable.makeHPrestrictedTable(Table), ShowSpreadsheetPopup, ShowStringPopup, Table, Table.getTableRowsSubset(SimpleTable, java.lang.String, java.lang.String, java.lang.String), Table.makeTabDelimReport(java.lang.String), Util.showMsg(java.lang.String), showGeneReport(Gene[], int, int, java.lang.String, int, java.lang.String, boolean, int, int)

createTableOfExprProfiles

private Table createTableOfExprProfiles(Gene[] mList,
                                        int nC,
                                        boolean normByHP_Xflag)
createTableOfExprProfiles() - make Table of expression profiles for mList[0:nC-1]
Parameters:
mList - is the list of genes
nC - is the number of genes
normByHP_Xflag - is the normalize by HP-X sample flag
Returns:
table of expression profiles
See Also:
ExprProfile, ExprProfile.setupData(int), Table, Util.cvf2s(float, int)

createTableOfOCL_Fstat

private Table createTableOfOCL_Fstat(Gene[] mList,
                                     int nC)
createTableOfOCL_Fstat() - make Table of OCL F-test for mList[0:nC-1] If the OCL F-Test filter is active, then report F-test statistics
Parameters:
mList - is the list of genes
nC - is the number of genes
Returns:
table of X Y statistics
See Also:
HPxyData.updateDataAndStat(int), Statistics.calcNCondFtestStat(float[][], int[], int), Table, Util.cvf2s(float, int)

createTableOfHP_XYstat

private Table createTableOfHP_XYstat(Gene[] mList,
                                     int nC)
createTableOfHP_XYstat() - make Table of HP_XYstatistics for mList[0:nC-1] If the t-Test filter is active, then report t-test statistics If the KS-Test filter is active, then report KS-test statistics
Parameters:
mList - is the list of genes
nC - is the number of genes
Returns:
table of X Y statistics
See Also:
HPxyData.updateDataAndStat(int), Statistics.calcTandPvalues(int, int, double, double, double, double), Table, Util.cvf2s(float, int)

createTableKmeansClusterStats

private Table createTableKmeansClusterStats(Gene[] mList,
                                            int nC)
createTableKmeansClusterStats() - make Table of Kmeans clusters for mList[0:nC-1]
Parameters:
mList - is the list of genes
nC - is the number of genes
Returns:
table of K-kmeans clustering statistics
See Also:
Table, Util.cvf2s(float, int), Util.cvtValueToStars(float, float, int, boolean)

createStrReportOfOCL_FstatData

private java.lang.String createStrReportOfOCL_FstatData(Gene[] mList,
                                                        int nC)
createStrReportOfOCL_FstatData() - make String report of OCL F-test for mList[0:nC-1] If the OCL F-Test filter is active, then report F-test statistics. This report is meant to be used in an updateable String Popup

[TODO] extend report

Parameters:
mList - is the list of genes
nC - is the number of genes
Returns:
table of X Y statistics
See Also:
HPxyData.updateDataAndStat(int), Statistics.calcNCondFtestStat(float[][], int[], int), Table, Util.cvf2s(float, int)

cvGene2TabDelimStr

private java.lang.String cvGene2TabDelimStr(Gene gene,
                                            int i,
                                            java.lang.String dataName,
                                            boolean showGeneName,
                                            Table epTbl,
                                            Table hpxyTbl)
cvGene2TabDelimStr() - convert a gene to printable tab-delimited string
Parameters:
gene - is the gene to convert
i - is the id (row?) of the entry
epTbl - is an opt. expr profile data
hpxyTbl - is an opt. HP-X/-Y set stat. data
Returns:
tab-delimited string of gene data
See Also:
GridCoords.cvtFGRC2str(int, int, int, int, boolean), SpotFeatures.getPlate(int), Util.cvd2s(double, int)

getGeneTabDelimFieldsStr

private java.lang.String getGeneTabDelimFieldsStr(java.lang.String dataName,
                                                  boolean showGeneName,
                                                  Table epTbl,
                                                  Table hpxyTbl)
getGeneTabDelimFieldsStr() - create tab delimited gene fields string
Parameters:
dataName - is title for the data
showGeneName - is flag to show the gene name as well
epTbl - is an opt. expr profile data
hpxyTbl - is an opt. HP-X/-Y set stat. data
Returns:
tab-delimited string of gene data

showGeneReport

private void showGeneReport(Gene[] mListOrig,
                            int nMlistOrig,
                            int maxGenesReported,
                            java.lang.String title,
                            int sortDirection,
                            java.lang.String dataName,
                            boolean showGeneName,
                            int tblFmtMode,
                            int reportMode)
showGeneReport() - show gene report with top maxGene's.
Parameters:
mListOrig - is list of genes to display
nMlistOrig - is number of genes
maxGenesReported - is the max # of genes to show in the report
title - of report
sortDirection - as either ASCENDING, DESCENDING, DONT_SORT
dataName - to show dataName if this is not null
showGeneName - is flag to show Gene_Name of each gene
tblFmtMode - is mode on how to present table
reportMode - is the type of table
See Also:
ShowStringPopup, Table, Table.makeTabDelimReport(java.lang.String), createTotGeneRptTbl(Gene[], int, int, java.lang.String, int, java.lang.String, boolean, int), createTotURLgeneRptTbl(Table, Gene[], int, int, java.lang.String, int, java.lang.String, int[], boolean), showPopupSpreadsheetGeneReport(Table, Table, Gene[], int, int, java.lang.String, int, java.lang.String, int[], boolean)

createTotURLgeneRptTbl

private Table createTotURLgeneRptTbl(Table kcTbl,
                                     Gene[] mListOrig,
                                     int nMlistOrig,
                                     int maxGene,
                                     java.lang.String title,
                                     int sortDirection,
                                     java.lang.String dataName,
                                     int[] cellFormat,
                                     boolean showGeneName)
createTotURLgeneRptTbl() - generate total URL gene report table
Parameters:
kcTbl - is returned table (initial table is created prior to call)
mListOrig - is list of genes to display
nMlistOrig - is number of genes
maxGene - is max# genes to show
title - of report
sortDirection - as either ASCENDING, DESCENDING, DONT_SORT
dataName - to show dataName if this is not null
cellFormat - of size [nCols+1]
showGeneName - is flag to show Gene_Name
See Also:
MAExplorer.logDRYROTerr(java.lang.String), Table.getTableRowsSubset(SimpleTable, java.lang.String, java.lang.String, java.lang.String)

createTotGeneRptTbl

private SimpleTable createTotGeneRptTbl(Gene[] mListOrig,
                                        int nMlistOrig,
                                        int maxGene,
                                        java.lang.String title,
                                        int sortDirection,
                                        java.lang.String dataName,
                                        boolean showGeneName,
                                        int reportMode)
createTotGeneRptTbl() - generate total gene report table.
Parameters:
mListOrig - is list of genes to display
nMlistOrig - is number of genes
maxGene - is max# genes to show
title - of report
sortDirection - as either ASCENDING, DESCENDING, DONT_SORT
dataName - to show dataName if this is not null
showGeneName - is flag to show Gene_Name
reportMode - is the type of report
Returns:
table returned else null if problem.
See Also:
Gene.sortGeneList(Gene[], int, boolean), GridCoords.cvtGID2str(int, boolean), MAExplorer.logDRYROTerr(java.lang.String), SimpleTable, SimpleTable.setRowData(java.lang.String[], int, int), SimpleTable.setFieldData(java.lang.String[], int), SpotFeatures.getPlate(int), Util.cvd2s(double, int), createTableOfExprProfiles(Gene[], int, boolean), createTableOfHP_XYstat(Gene[], int), createTableKmeansClusterStats(Gene[], int)

showPopupSpreadsheetGeneReport

private void showPopupSpreadsheetGeneReport(Table kcTbl,
                                            Table kcUrlTbl,
                                            Gene[] mListOrig,
                                            int nMlistOrig,
                                            int maxGene,
                                            java.lang.String title,
                                            int sortDirection,
                                            java.lang.String dataName,
                                            int[] cellFormat,
                                            boolean showGeneName)
showPopupSpreadsheetGeneReport() - show gene report with top maxGene's.
Parameters:
kcTbl - is returned table (initial table is created prior to call)
kcUrlTbl - is returned table (initial table is created prior to call)
mListOrig - is list of genes to display
nMlistOrig - is number of genes
maxGene - is max# genes to show
title - of report
sortDirection - as either ASCENDING, DESCENDING, DONT_SORT
dataName - to show dataName if this is not null
cellFormat - of size [nCols+1]
showGeneName - is flag to show Gene_Name
See Also:
MAExplorer.logDRYROTerr(java.lang.String), ShowSpreadsheetPopup

updateCurGene

void updateCurGene(int mid)
updateCurGene() - update report if current gene changed and this type of report requires it.
Parameters:
mid - is the new Master Gene ID of the current gene

updateFilter

void updateFilter(GeneList ml)
updateFilter() - update report if Filter using new GeneList ml. Use the Filter.workingCL if the specified list is null.
Parameters:
ml - is the gene list to update now that filter has changed.

updateSlider

void updateSlider()
updateSlider() - update report if Slider changed and this type of report requires it.

updateLabels

void updateLabels()
updateLabels() - update plot if labels changed and this type of report requires it.

close

void close()
close() - close this popup and reset flags if needed