|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.biojava.bio.seq.io.FastaFormat
Format for Fasta files.
The description lines often include complicated annotation for sequences. The parsing of these is handled by a FastaDescriptionReader object.
Field Summary | |
static FastaDescriptionReader |
DEFAULT_DESCRIPTION_READER
The default description reader. |
Constructor Summary | |
FastaFormat()
|
Method Summary | |
FastaDescriptionReader |
getDescriptionReader()
Retrieve the current description reader. |
int |
getLineWidth()
Retrive the current line width. |
Sequence |
readSequence(StreamReader.Context context,
SymbolParser resParser,
SequenceFactory sf)
Read in a single sequence. |
void |
setDescriptionReader(FastaDescriptionReader fdr)
Set the descripiton reader. |
void |
setLineWidth(int width)
Set the line width. |
void |
writeSequence(Sequence seq,
java.io.PrintStream os)
Write out a sequence to the specified printstream |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final FastaDescriptionReader DEFAULT_DESCRIPTION_READER
Constructor Detail |
public FastaFormat()
Method Detail |
public void setDescriptionReader(FastaDescriptionReader fdr)
dfr
- the new description readerpublic FastaDescriptionReader getDescriptionReader()
public int getLineWidth()
public void setLineWidth(int width)
When writing, the lines of sequence will never be longer than the line width.
width
- the new line widthpublic Sequence readSequence(StreamReader.Context context, SymbolParser resParser, SequenceFactory sf) throws IllegalSymbolException, java.io.IOException
The format is responsible for converting characters in a stream into a
complete sequence. It should read from the stream contained in
context
, parse the symbol characters using
resParser
and generate a sequence from the resulting
symbol list using sf
. Any non-sequence information within
the format should be read in either as features, or as annotation.
context
- the context to parse fromresParser
- the parser to parse chars to Symbol objectssf
- the sequence factory for generating a full sequencepublic void writeSequence(Sequence seq, java.io.PrintStream os)
seq
- the sequence to write outos
- the printstream to write to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |