org.gersteinlab.regulation
Class TrajectoryProfile

java.lang.Object
  extended by org.gersteinlab.regulation.TrajectoryProfile

public class TrajectoryProfile
extends java.lang.Object

        A class for storing the trajectory profile of all genes read from a
        file.
        

Version:
1.0 (August 20, 2008)
        Change History:
        1.0     - Initial version
        
Author:
Kevin Yuk-Lap Yip

Field Summary
protected  double[][][] dydt
           
protected  int expCount
           
protected  int geneCount
           
protected  java.lang.String[] geneNames
           
protected  int pointCount
           
protected  int polyDeg
           
protected  double[][][] profile
           
protected  double[][][] profile2
           
protected  double[] t
           
protected  double[] xs
           
protected  double[][][] y
           
 
Constructor Summary
protected TrajectoryProfile(java.io.Reader r, int polyDegIn)
          Constructor.
 
Method Summary
 double getResidual(int j, int[][] ks, java.lang.Class<? extends RateModel> modelClass, double[] a0)
          Get the residual when using some genes k to predict the expression of a gene j based on the best fit of a rate model starting from an initial set of parameter values.
 double getResidual(int j, int[][] ks, java.lang.Class<? extends RateModel> modelClass, double[] aStar, int iter, double[] mins, double[] maxs)
          Get the residual when using some genes k to predict the expression of a gene j based on the best fit of a rate model starting from random parameter values.
static TrajectoryProfile readProfile(java.io.Reader r, int polyDegIn)
          Read and return the profile in a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

geneCount

protected int geneCount

geneNames

protected java.lang.String[] geneNames

expCount

protected int expCount

pointCount

protected int pointCount

profile

protected double[][][] profile

polyDeg

protected int polyDeg

profile2

protected double[][][] profile2

xs

protected double[] xs

t

protected double[] t

y

protected double[][][] y

dydt

protected double[][][] dydt
Constructor Detail

TrajectoryProfile

protected TrajectoryProfile(java.io.Reader r,
                            int polyDegIn)
                     throws java.io.IOException
Constructor.

Parameters:
r - The reader of the file
polyDegIn - Degree of polynomial for smoothing the trajectories
Throws:
java.io.IOException
Method Detail

readProfile

public static TrajectoryProfile readProfile(java.io.Reader r,
                                            int polyDegIn)
                                     throws java.io.IOException
Read and return the profile in a file.

Parameters:
r - The reader of the file
polyDegIn - Degree of polynomial for smoothing the trajectories
Returns:
The profile
Throws:
java.io.IOException

getResidual

public double getResidual(int j,
                          int[][] ks,
                          java.lang.Class<? extends RateModel> modelClass,
                          double[] aStar,
                          int iter,
                          double[] mins,
                          double[] maxs)
                   throws java.lang.InstantiationException,
                          java.lang.IllegalAccessException,
                          java.lang.IllegalArgumentException,
                          java.lang.reflect.InvocationTargetException,
                          java.lang.NoSuchMethodException
Get the residual when using some genes k to predict the expression of a gene j based on the best fit of a rate model starting from random parameter values.

Parameters:
j - The gene whose expression is to be predicted
ks - The genes to be used to make the predictions First dimension: predictor set Second dimension: predictors
modelClass - The class of the rate model
aStar - For specifying the number of parameters and storing the final parameter values
iter - The number of random initial parameter sets to try
mins - Minimum of parameter values
maxs - Maximum of parameter values
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException

getResidual

public double getResidual(int j,
                          int[][] ks,
                          java.lang.Class<? extends RateModel> modelClass,
                          double[] a0)
                   throws java.lang.InstantiationException,
                          java.lang.IllegalAccessException,
                          java.lang.IllegalArgumentException,
                          java.lang.reflect.InvocationTargetException,
                          java.lang.NoSuchMethodException
Get the residual when using some genes k to predict the expression of a gene j based on the best fit of a rate model starting from an initial set of parameter values.

Parameters:
j - The gene whose expression is to be predicted
ks - The genes to be used to make the predictions First dimension: predictor set Second dimension: predictors
modelClass - The class of the rate model
a0 - The initial parameter values. The final values will be stored back to this array.
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException