org.strbio.mol.lib
Class ThreadResults

java.lang.Object
  extended by org.strbio.mol.lib.ThreadResults

public class ThreadResults
extends java.lang.Object

Threading results on one protein.

  Version 1.11, 11/4/99 - made most probability comparisons >= instead of >
  Version 1.1, 8/30/99 - added printXXX functions
  Version 1.0, 7/9/99 - original version
  

Version:
1.11, 11/4/99
Author:
JMC

Field Summary
 FoldLibrary library
          The library the threading was done on.
 DVector pMatch
          A vector of the probabilities that each protein in the library is a match.
 IVector sorted
          A sorted vector of the probabilities, from highest to lowest.
 Protein target
          The protein that was threaded.
 
Constructor Summary
ThreadResults()
           
 
Method Summary
 void clearAlignments()
          clear all known alignments.
 ProfilePSI foldRank(int n)
          Get protein number corresponding to rank N, (starting at 0), or null for 'no match'.
 Alignment getAlignment(int i)
          get an alignment, or null if it hasn't been done.
 Alignment getAlignmentRank(int n)
          get an alignment for a given rank, or null if it hasn't been done.
 void makeAlignment(Printf outfile, AlignmentParameters ap, int i)
          make one alignment to a given fold.
 void makeAlignments(Printf outfile, AlignmentParameters ap, double cutoff)
          make alignments for all folds >= a certain pMatch value.
 int nAbove(double p)
          How many folds are there above or equal to a given probability (including 'no match')
 double pNoMatch()
          Calculate the probability that no match is in the library.
 double pRank(int n)
          Get probability for rank N (starting at 0)... this includes 'no match'.
 void printAlignment(Printf outfile, AlignmentParametersEA ap, int i)
          print one alignment in a standard format.
 void printAlignments(Printf outfile, AlignmentParametersEA ap, double cutoff)
          print alignments in a standard format.
 void printMatches(Printf outfile, boolean showAll)
          print fold rankings in a standard format.
 int rankNoMatch()
          Calculate where 'no match' would rank among the folds (starting at 0).
 void saveResultAS(Printf outfile, AlignmentParametersEA ap, int i)
          save one alignment in AS-readable format.
 void saveResultModeller(Printf outfile, AlignmentParametersEA ap, int i)
          save one result in AlignmentSet-readable format to a file.
 void saveResultsAS(Printf outfile, AlignmentParametersEA ap, double cutoff)
          save results in AlignmentSet-readable format to a file.
 void saveResultsEnglish(Printf outfile, AlignmentParametersEA ap, double cutoff)
          save results in english to a file.
 void saveResultsModeller(Printf outfile, AlignmentParametersEA ap, double cutoff)
          save results in AlignmentSet-readable format to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

public Protein target
The protein that was threaded.


library

public FoldLibrary library
The library the threading was done on.


pMatch

public DVector pMatch
A vector of the probabilities that each protein in the library is a match.


sorted

public IVector sorted
A sorted vector of the probabilities, from highest to lowest. Index 0 contains the number of the best match, etc.

Constructor Detail

ThreadResults

public ThreadResults()
Method Detail

pNoMatch

public double pNoMatch()
Calculate the probability that no match is in the library.


rankNoMatch

public int rankNoMatch()
Calculate where 'no match' would rank among the folds (starting at 0).


clearAlignments

public void clearAlignments()
clear all known alignments.


makeAlignments

public void makeAlignments(Printf outfile,
                           AlignmentParameters ap,
                           double cutoff)
make alignments for all folds >= a certain pMatch value.


makeAlignment

public void makeAlignment(Printf outfile,
                          AlignmentParameters ap,
                          int i)
make one alignment to a given fold.


printMatches

public void printMatches(Printf outfile,
                         boolean showAll)
                  throws java.io.IOException
print fold rankings in a standard format.

Throws:
java.io.IOException

printAlignment

public void printAlignment(Printf outfile,
                           AlignmentParametersEA ap,
                           int i)
                    throws java.io.IOException
print one alignment in a standard format.

Throws:
java.io.IOException

printAlignments

public void printAlignments(Printf outfile,
                            AlignmentParametersEA ap,
                            double cutoff)
                     throws java.io.IOException
print alignments in a standard format.

Throws:
java.io.IOException

getAlignment

public Alignment getAlignment(int i)
get an alignment, or null if it hasn't been done.


getAlignmentRank

public Alignment getAlignmentRank(int n)
get an alignment for a given rank, or null if it hasn't been done.


foldRank

public ProfilePSI foldRank(int n)
Get protein number corresponding to rank N, (starting at 0), or null for 'no match'.


pRank

public double pRank(int n)
Get probability for rank N (starting at 0)... this includes 'no match'.


nAbove

public int nAbove(double p)
How many folds are there above or equal to a given probability (including 'no match')


saveResultsEnglish

public void saveResultsEnglish(Printf outfile,
                               AlignmentParametersEA ap,
                               double cutoff)
                        throws java.io.IOException
save results in english to a file. Show alignments for everything over a given cutoff.

Throws:
java.io.IOException

saveResultAS

public void saveResultAS(Printf outfile,
                         AlignmentParametersEA ap,
                         int i)
                  throws java.io.IOException
save one alignment in AS-readable format.

Throws:
java.io.IOException

saveResultsAS

public void saveResultsAS(Printf outfile,
                          AlignmentParametersEA ap,
                          double cutoff)
                   throws java.io.IOException
save results in AlignmentSet-readable format to a file. Show alignments for everything over a given cutoff.

Throws:
java.io.IOException

saveResultModeller

public void saveResultModeller(Printf outfile,
                               AlignmentParametersEA ap,
                               int i)
                        throws java.io.IOException
save one result in AlignmentSet-readable format to a file.

Throws:
java.io.IOException

saveResultsModeller

public void saveResultsModeller(Printf outfile,
                                AlignmentParametersEA ap,
                                double cutoff)
                         throws java.io.IOException
save results in AlignmentSet-readable format to a file. Show alignments for everything over a given cutoff.

Throws:
java.io.IOException