de.jstacs.data
Class DNADataSet
java.lang.Object
de.jstacs.data.DataSet
de.jstacs.data.DNADataSet
- All Implemented Interfaces:
- Iterable<Sequence>
public class DNADataSet
- extends DataSet
This class exist for convenience to allow the user an easy creation of DataSet
s of DNA Sequence
s.
- Author:
- Jan Grau, Jens Keilwagen
Constructor Summary |
DNADataSet(String fName)
Creates a new data set of DNA sequence from a FASTA file with file name fName . |
DNADataSet(String fName,
char ignore)
Creates a new data set of DNA sequence from a file with file name fName . |
DNADataSet(String fName,
char ignore,
SequenceAnnotationParser parser)
Creates a new data set of DNA sequence from a file with file name fName using the given parser . |
Methods inherited from class de.jstacs.data.DataSet |
diff, getAllElements, getAlphabetContainer, getAnnotation, getAnnotation, getAnnotationTypesAndIdentifier, getAverageElementLength, getCompositeDataSet, getElementAt, getElementLength, getInfixDataSet, getMaximalElementLength, getMinimalElementLength, getNumberOfElements, getNumberOfElementsWithLength, getNumberOfElementsWithLength, getPartialDataSet, getPartialDataSet, getReverseComplementaryDataSet, getSequenceAnnotationIndexMatrix, getSuffixDataSet, intersection, isDiscreteDataSet, isSimpleDataSet, iterator, partition, partition, partition, partition, resize, save, save, subSampling, subSampling, toString, union, union, union |
DNADataSet
public DNADataSet(String fName)
throws FileNotFoundException,
WrongAlphabetException,
EmptyDataSetException,
WrongLengthException,
IOException
- Creates a new data set of DNA sequence from a FASTA file with file name
fName
.
- Parameters:
fName
- the file name
- Throws:
IOException
- if the File
could not be read
FileNotFoundException
- if the File
could not be found
WrongAlphabetException
- if the DNA AlphabetContainer
is not suitable
EmptyDataSetException
- if the DataSet
would be empty
WrongLengthException
- never happens (forwarded from
DataSet.DataSet(AlphabetContainer, de.jstacs.io.AbstractStringExtractor, String, int)
)- See Also:
AbstractStringExtractor.FASTA
,
DNADataSet(String, char)
DNADataSet
public DNADataSet(String fName,
char ignore)
throws FileNotFoundException,
WrongAlphabetException,
EmptyDataSetException,
WrongLengthException,
IOException
- Creates a new data set of DNA sequence from a file with file name
fName
.
- Parameters:
fName
- the file nameignore
- the first character of lines that should be treated as comments
- Throws:
IOException
- if the File
could not be read
FileNotFoundException
- if the File
could not be found
WrongAlphabetException
- if the DNA AlphabetContainer
is not suitable
EmptyDataSetException
- if the DataSet
would be empty
WrongLengthException
- never happens (forwarded from
DataSet.DataSet(AlphabetContainer, de.jstacs.io.AbstractStringExtractor, String, int)
)- See Also:
SparseStringExtractor
,
AbstractStringExtractor.FASTA
,
AbstractStringExtractor.USUALLY
,
DNADataSet(String, char, SequenceAnnotationParser)
DNADataSet
public DNADataSet(String fName,
char ignore,
SequenceAnnotationParser parser)
throws FileNotFoundException,
WrongAlphabetException,
EmptyDataSetException,
WrongLengthException,
IOException
- Creates a new data set of DNA sequence from a file with file name
fName
using the given parser
.
- Parameters:
fName
- the file nameignore
- the first character of lines that should be treated as commentsparser
- the parser for the SequenceAnnotation
- Throws:
IOException
- if the File
could not be read
FileNotFoundException
- if the File
could not be found
WrongAlphabetException
- if the DNA AlphabetContainer
is not suitable
EmptyDataSetException
- if the DataSet
would be empty
WrongLengthException
- never happens (forwarded from
DataSet.DataSet(AlphabetContainer, de.jstacs.io.AbstractStringExtractor, String, int)
)- See Also:
SparseStringExtractor
,
AbstractStringExtractor.FASTA
,
AbstractStringExtractor.USUALLY
,
DataSet.DataSet(AlphabetContainer, de.jstacs.io.AbstractStringExtractor)