|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcalhoun.seq.FastaWriter
public class FastaWriter
Used for writing fasta files. Formats sequences to a specific line length. Allows multiple sequences to be to the same file.
| Field Summary | |
|---|---|
static int |
DEFAULT_LINE_LENGTH
|
| Constructor Summary | |
|---|---|
FastaWriter(java.io.File file,
boolean append)
Opens a fasta file for writing. |
|
FastaWriter(java.io.File file,
boolean append,
int lineLength)
Opens a fasta file for writing. |
|
FastaWriter(java.lang.String file,
boolean append)
Opens a fasta file for writing. |
|
FastaWriter(java.lang.String file,
boolean append,
int lineLength)
Opens a fasta file for writing. |
|
FastaWriter(java.io.Writer w,
int lineLength)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the file. |
java.lang.String |
getFilename()
|
void |
writeSeq(FastaSequence seq)
Writes a sequence to the file, which may have been previously read from a different file. |
void |
writeSeq(java.lang.String header,
java.lang.String content)
Writes a sequence to the file. |
void |
writeSeq(java.lang.String header,
java.lang.String string,
java.lang.Integer start,
java.lang.Integer stop)
Writes a portion of the sequence to the file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_LINE_LENGTH
| Constructor Detail |
|---|
public FastaWriter(java.lang.String file,
boolean append)
file - Filename of the file to openappend - true if sequences should be appended to this file, false if it should be replaced.
public FastaWriter(java.lang.String file,
boolean append,
int lineLength)
file - Filename of the file to openappend - true if sequences should be appended to this file, false if it should be replaced.lineLength - Allows the length of a sequence line to be set.
public FastaWriter(java.io.File file,
boolean append)
file - Filename of the file to openappend - true if sequences should be appended to this file, false if it should be replaced.
public FastaWriter(java.io.File file,
boolean append,
int lineLength)
file - Filename of the file to openappend - true if sequences should be appended to this file, false if it should be replaced.lineLength - Allows the length of a sequence line to be set.
public FastaWriter(java.io.Writer w,
int lineLength)
| Method Detail |
|---|
public void writeSeq(java.lang.String header,
java.lang.String content)
header - The fasta header for the sequence. Should not include '>'.content - The actual sequence. It will be broken up into lines based on linelength as it is written out.
public void writeSeq(java.lang.String header,
java.lang.String string,
java.lang.Integer start,
java.lang.Integer stop)
header - The fasta header for the sequence. Should not include '>'.content - The actual sequence. It will be broken up into lines based on linelength as it is written out.start - 1-based index of the first base to write. If null, writing will start from the beginning of the sequence.stop - 1-based index of the last base to write. If null, writing will continue until the end of the sequence.public void writeSeq(FastaSequence seq)
public void close()
public java.lang.String getFilename()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||