|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.upenn.gloDB.io.FASTASequence
public class FASTASequence
Import Sequence data from a FASTA file. The basic file format dictates a header line at the beginning of each sequence. There are no standards as to what the header line should contain or how it should be formatted, other than to stipulate that it begins with a ">". Thus this format sufficient for coding Sequence objects but not ideal for sequence annotations (Features). Since some sites, such as www.fruitfly.org, release annotations as FASTA files, some attempt has been made to parse the headers from specific sites. Users can use the FASTAParser interface to create their own header parsers as well.
Nested Class Summary | |
---|---|
private class |
FASTASequence.FASTAFilter
FASTA specific FileFilter. |
Field Summary | |
---|---|
private java.lang.String |
DESC
|
private java.lang.String[] |
EXT
|
private javax.swing.filechooser.FileFilter |
fileFilter
|
private int |
ID
|
Constructor Summary | |
---|---|
FASTASequence()
|
Method Summary | |
---|---|
java.lang.String |
getData(java.util.HashMap loaderArgs)
Return the Sequence data as a String. |
java.lang.String |
getDesc()
Get a description of the file type. |
java.lang.String[] |
getExt()
Get an array of file extensions. |
javax.swing.filechooser.FileFilter |
getFileFilter()
Get a FileFilter for use in the GUI. |
int |
getID()
Get the file ID. |
Sequence |
load(java.lang.String filename)
Load the first sequence in the FASTA file and return the resulting Sequence object. |
Sequence |
load(java.lang.String filename,
java.lang.String id)
Load the first sequence in the FASTA file and return the resulting Sequence object. |
Sequence |
load(java.lang.String filename,
java.lang.String id,
FASTAParser parser)
Load the first sequence in the FASTA file and return the resulting Sequence object. |
java.util.HashSet |
loadAll(java.lang.String filename)
Load all Sequences in the FASTA file and return a Set containing the resulting Sequence objects. |
java.util.HashSet |
loadAll(java.lang.String filename,
FASTAParser parser)
Load all Sequences in the FASTA file and return a set containing the resulting Sequence objects. |
void |
save(java.lang.String id)
Save the Seqeuence to a file based on it's ID. |
void |
save(java.lang.String id,
java.lang.String filename,
boolean overwrite)
Save the Sequence data. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final int ID
private final java.lang.String DESC
private final java.lang.String[] EXT
private final javax.swing.filechooser.FileFilter fileFilter
Constructor Detail |
---|
public FASTASequence()
Method Detail |
---|
public int getID()
DataFile
getID
in interface DataFile
public java.lang.String getDesc()
DataFile
getDesc
in interface DataFile
public java.lang.String[] getExt()
DataFile
getExt
in interface DataFile
public javax.swing.filechooser.FileFilter getFileFilter()
DataFile
getFileFilter
in interface DataFile
public java.lang.String getData(java.util.HashMap loaderArgs)
getData
in interface SequenceLoader
public Sequence load(java.lang.String filename)
load
in interface SequenceFile
public Sequence load(java.lang.String filename, java.lang.String id)
load
in interface SequenceFile
public Sequence load(java.lang.String filename, java.lang.String id, FASTAParser parser)
load
in interface SequenceFile
public java.util.HashSet loadAll(java.lang.String filename)
loadAll
in interface SequenceFile
public java.util.HashSet loadAll(java.lang.String filename, FASTAParser parser)
loadAll
in interface SequenceFile
public void save(java.lang.String id)
save
in interface SequenceFile
public void save(java.lang.String id, java.lang.String filename, boolean overwrite)
save
in interface SequenceFile
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |