|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.peace_tools.data.ESTList
public class ESTList
Class to encapsulate a list of ESTs. This class has been designed to contain a list of ESTs that are typically loaded from a FASTA file. The ESTs are maintained as an ordered list of values so that the index of the ESTs are used as IDs to look up ESTs.
Field Summary | |
---|---|
private java.util.ArrayList<EST> |
ests
This instance variable contains the list of ESTs encapsulated in this ESTList class. |
private java.lang.String |
name
A unique name or identifier associated with this EST list. |
private java.lang.Object |
prevClusterList
This reference is used to track the object used to hold the list of DBClassifiers in the work space. |
Constructor Summary | |
---|---|
ESTList(java.lang.String name)
Create an empty list of ESTs tagged with a given name. |
Method Summary | |
---|---|
void |
classify(javax.swing.ProgressMonitor pm)
Method classify all the ESTs in this list. |
double[] |
computeStatistics()
Method to compute and return statistics about the set of ESTs encapsulated in this list. |
java.util.ArrayList<EST> |
getESTs()
Obtain the list of ESTs encapsulated by this ESTList. |
java.lang.String |
getName()
The name associated to identify this ESTList. |
boolean |
isClassified()
Determine if the EST list is current with work space classifiers. |
static ESTList |
loadESTs(java.io.File fastaFile)
Load ESTs from a given FASTA file and build a new ESTList. |
static ESTList |
loadESTs(java.lang.String fileName,
java.io.InputStream is)
Load ESTs from a stream that provides FASTA data. |
void |
writeESTs(java.io.File outFile)
Writes ESTs in FASTA format to a given file. |
void |
writeESTs(java.io.PrintStream writer)
Writes ESTs in FASTA format to a given writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList<EST> ests
private final java.lang.String name
private java.lang.Object prevClusterList
Constructor Detail |
---|
public ESTList(java.lang.String name)
name
- An identifier to be associated with this ESTList.
Typically the absolute path to the FASTA file from where the data
was loaded is used as the identifier. This information helps to
locate ESTs that were loaded from a given file.Method Detail |
---|
public java.lang.String getName()
public java.util.ArrayList<EST> getESTs()
public static ESTList loadESTs(java.io.File fastaFile) throws java.io.IOException
fastaFile
- The FASTA file from where the ESTs are to be loaded.
java.io.IOException
- This method throws an IO exception on errors.public static ESTList loadESTs(java.lang.String fileName, java.io.InputStream is) throws java.io.IOException
fileName
- The absolute path to the FASTA file to be used to
name/tag the newly created ESTList.is
- The input stream from where the EST data is to be read.
java.io.IOException
- This method throws an IO exception on errors.public void writeESTs(java.io.PrintStream writer) throws java.io.IOException
writer
- The output stream to which the ESTs are to be written.
java.io.IOException
- This method throws an IO exception on errors.public void writeESTs(java.io.File outFile) throws java.io.IOException
outFile
- The file to which the ESTs are to be written.
java.io.IOException
- This method throws an IO exception on errors.public double[] computeStatistics()
public boolean isClassified()
public void classify(javax.swing.ProgressMonitor pm)
This method is typically invoked directly from a view (rather than from the model associated with the view) to classify all the ESTs in the list based on the current classifications set in the work space. This method iterates over all the ESTs and has the ESTs compute their classifications.
This method recomputes classifications only if the classifier list in the work space has actually changed. Consequently, repeatedly calling this method does not have side effects. However, if classification is performed then it may be a long running process particularly, for large EST sets. Consequently, it is best to invoke this method from a separate thread so that the GUI does not appear to be hanging while classifications are computed.
pm
- An optional progress monitor to be updated as ESTs are
classified. The progress monitor provides feedback to the user about
the progress. This parameter can be null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |