main_scripts
Class DICER_main

java.lang.Object
  extended by main_scripts.DICER_main

public class DICER_main
extends java.lang.Object

This class runs the DICER algorithm and outputs the analysis results. * For running the main (i.e. the runnable jar), the format of the input should be (in this order): 1. A gene expression matrix file. This is a tab delimited file in which the first row contains the condition names, and the first column contains the gene names. For example, see the LungCancer.txt file LungCancer.zip. 2. A "classes file". This file contains partitioning of the conditions in the matrix to groups. We assume that conditions from the same groups are adjacent in the matrix. This file is tab delimited, in each row there are three columns: the start index of the current group (enumeration of the conditions starts from zero),the end index, and the group name. For example, see the classesFile.txt in LungCancer.zip 3. A number between 0 and the number of classes -1 that specifies the class of interest. 4. A name of an output file. OPTIONAL: 5. 1 if you want to print the DC and CG graphs (as matrices). All output files prefixes are the name of the output path specified by the user. It creates the following files, according to the suffixes: 1. _Modules.txt - a flat file with the gene to modules assignments. in this file, up or down specifies from which DICER analysis the modules where detected. 2. _metaGraph.sif - a SIF file that represents the DC map among the modules 3. _metaGraph.txt - a file with the edge scores for _metaGraph.sif 4. The final output file is the output path indicated by the user and it contains all gene to meta-module or DC cluster mappings.


Field Summary
protected  double[][] consistentCorrelationsGraph
           
protected  double[][] dGGraph
           
protected  MetaModuleFinder downClusterer
           
protected  java.util.LinkedList<java.util.HashSet<java.lang.Integer>> downCorrelatedClusters
           
protected  MetaModuleFinder downMetaModulesFinder
           
protected  LLRScoresCalculator globalCorrelationsLLRAnalyzer
           
protected  LLRScoresCalculator llrAnalysisForTscores
           
protected  java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> metaClusters
           
protected  java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> modules
           
protected  float[] randomScores
           
protected  float[][] realTscoresGraph
           
protected  TscoresCalculator tScoresCalc
           
protected  double[][] uGGraph
           
protected  MetaModuleFinder upClusterer
           
protected  java.util.LinkedList<java.util.HashSet<java.lang.Integer>> upCorrelatedClusters
           
protected  MetaModuleFinder upMetaModulesFinder
           
 
Constructor Summary
DICER_main(ExpressionMatrix mat, java.lang.String cP, int cla)
           
DICER_main(java.lang.String[] args)
          The format of the input should be (in this order): 1.
DICER_main(java.lang.String gP, java.lang.String cP, int cla, java.lang.String out)
           
 
Method Summary
 void doStatisticalAnalysis()
          This method performs statistical operations: 1.
static float[] floatListToArray(java.util.LinkedList<java.lang.Float> positiveScores)
           
 MetaModuleFinder getDownClusterer()
           
 java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> getMetaClusters()
           
 boolean[][] getMetaGraph()
           
 boolean[][] getMetaGraph(java.util.LinkedList<java.util.HashSet<java.lang.Integer>> allSeeds)
           
protected static void getMetaModules(java.lang.String type, MetaModuleFinder clusterer, java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> mms)
           
 java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> getModules()
           
protected static void getModules(MetaModuleFinder clust, java.lang.String type, java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> seeds)
           
 java.util.LinkedList<java.util.HashSet<java.lang.Integer>> getUpCorrelatedClusters()
           
static void main(java.lang.String[] args)
           
 void printAnalysisResults()
          This method prints DICER flow results.
protected static int printClusters(java.util.LinkedList<java.util.HashSet<java.lang.Integer>> downCluster, java.lang.String type, java.util.ArrayList<java.lang.String> geneNames, java.io.BufferedWriter writer)
           
static void printMatrix(double[][] mat, java.lang.String path)
           
protected static void printMetaClusters(java.lang.String type, java.io.BufferedWriter writer, MetaModuleFinder clusterer, java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> mms)
           
protected static void printMetaGraph(MetaModuleFinder clustererUp, MetaModuleFinder clustererDown, java.io.BufferedWriter writer1, java.io.BufferedWriter writer2)
           
protected static void printModules(MetaModuleFinder clust, java.lang.String type, java.io.BufferedWriter writer, int minSize, java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> seeds)
           
protected  void printStatisticalAnalysisMatrices(java.lang.String pathName)
           
static double[][] readMatrix(java.lang.String path)
           
protected  void readStatisticalMatrices(java.lang.String pathName)
           
 void runAlgo(boolean doStatistical, boolean printMatrices)
          This method runs the algorithm and keeps all statistical and clustering results in the fitting modules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tScoresCalc

protected TscoresCalculator tScoresCalc

realTscoresGraph

protected float[][] realTscoresGraph

randomScores

protected float[] randomScores

llrAnalysisForTscores

protected LLRScoresCalculator llrAnalysisForTscores

globalCorrelationsLLRAnalyzer

protected LLRScoresCalculator globalCorrelationsLLRAnalyzer

dGGraph

protected double[][] dGGraph

uGGraph

protected double[][] uGGraph

consistentCorrelationsGraph

protected double[][] consistentCorrelationsGraph

downClusterer

protected MetaModuleFinder downClusterer

upClusterer

protected MetaModuleFinder upClusterer

upMetaModulesFinder

protected MetaModuleFinder upMetaModulesFinder

downMetaModulesFinder

protected MetaModuleFinder downMetaModulesFinder

downCorrelatedClusters

protected java.util.LinkedList<java.util.HashSet<java.lang.Integer>> downCorrelatedClusters

upCorrelatedClusters

protected java.util.LinkedList<java.util.HashSet<java.lang.Integer>> upCorrelatedClusters

modules

protected java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> modules

metaClusters

protected java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> metaClusters
Constructor Detail

DICER_main

public DICER_main(java.lang.String[] args)
The format of the input should be (in this order): 1. A gene expression matrix file. This is a tab delimited file in which the first row contains the condition names, and the first column contains the gene names. For example, see the LungCancer.txt file LungCancer.zip. 2. A "classes file". This file contains partitioning of the conditions in the matrix to groups. We assume that conditions from the same groups are adjacent in the matrix. This file is tab delimited, in each row there are three columns: the start index of the current group (enumeration of the conditions starts from zero),the end index, and the group name. For example, see the classesFile.txt in LungCancer.zip 3. A number between 0 and the number of classes -1 that specifies the class of interest. 4. A name of an output file.


DICER_main

public DICER_main(java.lang.String gP,
                  java.lang.String cP,
                  int cla,
                  java.lang.String out)

DICER_main

public DICER_main(ExpressionMatrix mat,
                  java.lang.String cP,
                  int cla)
Method Detail

runAlgo

public void runAlgo(boolean doStatistical,
                    boolean printMatrices)
This method runs the algorithm and keeps all statistical and clustering results in the fitting modules.

Parameters:
doStatistical - : a boolean. Specifies if to perform the statistical analysis or to read the graphs instead
printMatrices - : a boolean. Specifies if to write the graphs to files or not

doStatisticalAnalysis

public void doStatisticalAnalysis()
This method performs statistical operations: 1. Compare random and real T-scores. 2. Calculate the consistent correlations graph. Progress remarks are printed to the standard output.


printAnalysisResults

public void printAnalysisResults()
This method prints DICER flow results. All output files prefixes are the name of the output path specified by the user. It creates the following files, according to the suffixes: 1. _Modules.txt - a flat file with the gene to modules assignments. in this file, up or down specifies from which DICER analysis the modules where detected. 2. _metaGraph.sif - a SIF file that represents the DC map among the modules 3. _metaGraph.txt - a file with the edge scores for _metaGraph.sif 4. The final output file is the output path indicated by the user and it contains all gene to meta-module or DC cluster mappings.


floatListToArray

public static float[] floatListToArray(java.util.LinkedList<java.lang.Float> positiveScores)

printModules

protected static void printModules(MetaModuleFinder clust,
                                   java.lang.String type,
                                   java.io.BufferedWriter writer,
                                   int minSize,
                                   java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> seeds)

getModules

protected static void getModules(MetaModuleFinder clust,
                                 java.lang.String type,
                                 java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> seeds)

printMetaClusters

protected static void printMetaClusters(java.lang.String type,
                                        java.io.BufferedWriter writer,
                                        MetaModuleFinder clusterer,
                                        java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> mms)

getMetaModules

protected static void getMetaModules(java.lang.String type,
                                     MetaModuleFinder clusterer,
                                     java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> mms)

printClusters

protected static int printClusters(java.util.LinkedList<java.util.HashSet<java.lang.Integer>> downCluster,
                                   java.lang.String type,
                                   java.util.ArrayList<java.lang.String> geneNames,
                                   java.io.BufferedWriter writer)

printMetaGraph

protected static void printMetaGraph(MetaModuleFinder clustererUp,
                                     MetaModuleFinder clustererDown,
                                     java.io.BufferedWriter writer1,
                                     java.io.BufferedWriter writer2)

getMetaGraph

public boolean[][] getMetaGraph()

getMetaGraph

public boolean[][] getMetaGraph(java.util.LinkedList<java.util.HashSet<java.lang.Integer>> allSeeds)

printStatisticalAnalysisMatrices

protected void printStatisticalAnalysisMatrices(java.lang.String pathName)

readStatisticalMatrices

protected void readStatisticalMatrices(java.lang.String pathName)

printMatrix

public static void printMatrix(double[][] mat,
                               java.lang.String path)

readMatrix

public static double[][] readMatrix(java.lang.String path)

main

public static void main(java.lang.String[] args)

getMetaClusters

public java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> getMetaClusters()

getUpCorrelatedClusters

public java.util.LinkedList<java.util.HashSet<java.lang.Integer>> getUpCorrelatedClusters()

getDownClusterer

public MetaModuleFinder getDownClusterer()

getModules

public java.util.Hashtable<java.lang.String,java.util.HashSet<java.lang.String>> getModules()