calhoun.analysis.crf.io
Class FastaInput
java.lang.Object
calhoun.analysis.crf.io.FastaInput
- All Implemented Interfaces:
- InputComponentIO, java.io.Serializable
public class FastaInput
- extends java.lang.Object
- implements InputComponentIO
- See Also:
- Serialized Form
|
Method Summary |
java.util.List<java.lang.String> |
getComponentNames()
A list of names of the components of the InputSequence created by this reader. |
java.lang.String |
getHeader()
|
java.lang.Integer |
getNumSeqCap()
|
java.lang.String |
getSequence()
|
void |
readInputSequences(java.lang.String location,
java.util.List<java.util.Map<java.lang.String,InputSequence<?>>> inputs)
reads input sequences from this location. |
void |
setHeader(java.lang.String header)
|
void |
setNumSeqCap(java.lang.Integer numSeqCap)
|
void |
setSequence(java.lang.String sequence)
|
void |
writeInputSequences(java.lang.String location,
java.util.List<? extends java.util.Map<java.lang.String,? extends InputSequence<?>>> inputComponents)
writes input sequences to this location. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FastaInput
public FastaInput()
getComponentNames
public java.util.List<java.lang.String> getComponentNames()
- Description copied from interface:
InputComponentIO
- A list of names of the components of the InputSequence created by this reader.
- Specified by:
getComponentNames in interface InputComponentIO
- Returns:
- a list of input sequence component names.
readInputSequences
public void readInputSequences(java.lang.String location,
java.util.List<java.util.Map<java.lang.String,InputSequence<?>>> inputs)
throws java.io.IOException
- Description copied from interface:
InputComponentIO
- reads input sequences from this location. In most cases the location will be a file and this object will read in one or more components of the
overall input from that file. Alist of inputs is returned. Each input consists of a set of key-value pairs, where the key is the name of the
input component and the value is an (@link InputSequence) object. If this is not the first component to be loaded, this list may already contain
entries for the input.
- Specified by:
readInputSequences in interface InputComponentIO
- Parameters:
location - the location of the data to read. Meaning of the location is implementation dependent, but will usually be a file name.inputs - a list of input sequences. For each input sequence, a map is returned that maps component names to their
associated InputSequence objects.
- Throws:
java.io.IOException
writeInputSequences
public void writeInputSequences(java.lang.String location,
java.util.List<? extends java.util.Map<java.lang.String,? extends InputSequence<?>>> inputComponents)
throws java.io.IOException
- Description copied from interface:
InputComponentIO
- writes input sequences to this location.
InputComponentIO optionally can implement this function to provide the ability to write input
data as well as read it. This is used by many of the data manipulation tools, such as those for subsetting and creating cross-validation sets.
- Specified by:
writeInputSequences in interface InputComponentIO
- Parameters:
location - the location of the data to write. Meaning of the location is implementation dependent, but will usually be a file name.inputComponents - an iterator over input sequences. For each input sequence, a map is returned that maps component names to their
associated InputSequence objects. All components of the input are passed, and this object is reponsible for knowing which components
it should be writing.
- Throws:
java.io.IOException
getHeader
public java.lang.String getHeader()
- Returns:
- Returns the header.
setHeader
public void setHeader(java.lang.String header)
- Parameters:
header - The header to set.
getSequence
public java.lang.String getSequence()
- Returns:
- Returns the sequence.
setSequence
public void setSequence(java.lang.String sequence)
- Parameters:
sequence - The sequence to set.
getNumSeqCap
public java.lang.Integer getNumSeqCap()
setNumSeqCap
public void setNumSeqCap(java.lang.Integer numSeqCap)