org.strbio.mol.lib
Class AlignmentParametersEA

java.lang.Object
  extended by org.strbio.mol.lib.AlignmentParameters
      extended by org.strbio.mol.lib.AlignmentParametersEA
All Implemented Interfaces:
Description
Direct Known Subclasses:
OptimalAAParameters, OptimalAAParametersFR

public class AlignmentParametersEA
extends AlignmentParameters

Parameters, with some statistical functions to tell you how accurate they are at alignment and/or fold recognition.

Version:
1.0, 7/2/99
Author:
JMC

Field Summary
 DVector asns1
          asns1 values for each match (there is no such thing for non-matches
 DVector avgScoreMatch
          scores for each match (gapped alignment score)
 DVector avgScoreNonMatch
          scores for each non-match
 DVector totalZMatch
          z score of total score for each match.
 DVector totalZNonMatch
          z score of total score for each non-match.
 
Fields inherited from class org.strbio.mol.lib.AlignmentParameters
gapModel, scoreList
 
Constructor Summary
AlignmentParametersEA()
           
AlignmentParametersEA(GapModel gm, ScoreList sl)
           
 
Method Summary
 boolean canEstimateAA()
          will this return valid results for estAsns1, etc?
 boolean canEstimateFR()
          will this return valid results for estFR*?
 void clearEstAAStats()
          remove stats for estimating alignment accuracy
 void clearEstFRStats()
          remove stats for estimating fold recognition accuracy.
 java.lang.String defaultEAFileAA()
          get the default file name (in the classpath) for alignment accuracy parameters.
 java.lang.String defaultEAFileFR()
          get the default file name (in the classpath) for fold recognition parameters.
 double estASns1(double score)
          estimate the asns1, given an average score (with gap penalties counted).
 double estASns1SD(double score)
          get the SD for the asns1 estimation, given an average score (with gap penalties counted).
 double estFRAccy(double avgScore, double zScore)
          Estimate the accuracy of a given prediction, given the average score and the z score of the total score.
 void loadEstAAStats()
          Load the default accuracy stats from a file in the classpath.
 void loadEstAAStats(java.io.BufferedReader infile)
          Get the accuracy stats out of a file.
 void loadEstAAStats(java.lang.String filename)
          Get the accuracy stats out of a file.
 void loadEstAAStatsRaw(java.io.BufferedReader infile)
          Get raw accuracy stats out of a file.
 void loadEstAAStatsRaw(java.lang.String filename)
          Get the raw accuracy stats out of a file.
 void loadEstFRStats()
          Load the default accuracy stats from a file in the classpath.
 void loadEstFRStats(java.io.BufferedReader infile)
          Get the FR accuracy stats out of a file.
 void loadEstFRStats(java.lang.String filename)
          Get the FR accuracy stats out of a file.
 void loadEstFRStatsRaw(java.io.BufferedReader infile)
          Get the raw FR accuracy stats out of a file.
 void loadEstFRStatsRaw(java.lang.String filename)
          Get the raw FR accuracy stats out of a file.
 void processAA()
          process the AA stats, for speed in estimation.
 void processFR()
          process the FR stats, for speed in estimation.
 void saveEstAAStats(Printf outfile)
          Save accuracy stats to a file.
 void saveEstAAStats(java.lang.String filename)
          Save alignment accuracy stats to a file.
 void saveEstFRStats(Printf outfile)
          Save accuracy stats to a file.
 void saveEstFRStats(java.lang.String filename)
          Save alignment accuracy stats to a file.
 
Methods inherited from class org.strbio.mol.lib.AlignmentParameters
addScoreFunction, addScoreFunction, describe, finished, normalizeWeights, setAlignment, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

avgScoreMatch

public DVector avgScoreMatch
scores for each match (gapped alignment score)


avgScoreNonMatch

public DVector avgScoreNonMatch
scores for each non-match


totalZMatch

public DVector totalZMatch
z score of total score for each match.


totalZNonMatch

public DVector totalZNonMatch
z score of total score for each non-match.


asns1

public DVector asns1
asns1 values for each match (there is no such thing for non-matches

Constructor Detail

AlignmentParametersEA

public AlignmentParametersEA()

AlignmentParametersEA

public AlignmentParametersEA(GapModel gm,
                             ScoreList sl)
Method Detail

defaultEAFileAA

public java.lang.String defaultEAFileAA()
get the default file name (in the classpath) for alignment accuracy parameters. this should be overridden by subclasses.


defaultEAFileFR

public java.lang.String defaultEAFileFR()
get the default file name (in the classpath) for fold recognition parameters. this should be overridden by subclasses.


estASns1

public double estASns1(double score)
estimate the asns1, given an average score (with gap penalties counted).


estASns1SD

public double estASns1SD(double score)
get the SD for the asns1 estimation, given an average score (with gap penalties counted).


processAA

public void processAA()
process the AA stats, for speed in estimation.


estFRAccy

public double estFRAccy(double avgScore,
                        double zScore)
Estimate the accuracy of a given prediction, given the average score and the z score of the total score.


processFR

public void processFR()
process the FR stats, for speed in estimation.


canEstimateAA

public boolean canEstimateAA()
will this return valid results for estAsns1, etc?


canEstimateFR

public boolean canEstimateFR()
will this return valid results for estFR*?


clearEstAAStats

public void clearEstAAStats()
remove stats for estimating alignment accuracy


clearEstFRStats

public void clearEstFRStats()
remove stats for estimating fold recognition accuracy.


saveEstAAStats

public void saveEstAAStats(java.lang.String filename)
                    throws java.io.IOException
Save alignment accuracy stats to a file.

Throws:
java.io.IOException

saveEstAAStats

public void saveEstAAStats(Printf outfile)
                    throws java.io.IOException
Save accuracy stats to a file.

Throws:
java.io.IOException

loadEstAAStatsRaw

public void loadEstAAStatsRaw(java.io.BufferedReader infile)
                       throws java.io.IOException
Get raw accuracy stats out of a file.

Throws:
java.io.IOException

loadEstAAStats

public void loadEstAAStats(java.io.BufferedReader infile)
                    throws java.io.IOException
Get the accuracy stats out of a file.

Throws:
java.io.IOException

loadEstAAStats

public void loadEstAAStats(java.lang.String filename)
                    throws java.io.IOException
Get the accuracy stats out of a file.

Throws:
java.io.IOException

loadEstAAStatsRaw

public void loadEstAAStatsRaw(java.lang.String filename)
                       throws java.io.IOException
Get the raw accuracy stats out of a file.

Throws:
java.io.IOException

loadEstAAStats

public void loadEstAAStats()
                    throws java.io.IOException
Load the default accuracy stats from a file in the classpath.

Throws:
java.io.IOException

saveEstFRStats

public void saveEstFRStats(java.lang.String filename)
                    throws java.io.IOException
Save alignment accuracy stats to a file.

Throws:
java.io.IOException

saveEstFRStats

public void saveEstFRStats(Printf outfile)
                    throws java.io.IOException
Save accuracy stats to a file.

Throws:
java.io.IOException

loadEstFRStats

public void loadEstFRStats(java.io.BufferedReader infile)
                    throws java.io.IOException
Get the FR accuracy stats out of a file.

Throws:
java.io.IOException

loadEstFRStatsRaw

public void loadEstFRStatsRaw(java.io.BufferedReader infile)
                       throws java.io.IOException
Get the raw FR accuracy stats out of a file.

Throws:
java.io.IOException

loadEstFRStats

public void loadEstFRStats(java.lang.String filename)
                    throws java.io.IOException
Get the FR accuracy stats out of a file.

Throws:
java.io.IOException

loadEstFRStatsRaw

public void loadEstFRStatsRaw(java.lang.String filename)
                       throws java.io.IOException
Get the raw FR accuracy stats out of a file.

Throws:
java.io.IOException

loadEstFRStats

public void loadEstFRStats()
                    throws java.io.IOException
Load the default accuracy stats from a file in the classpath.

Throws:
java.io.IOException