de.jstacs.data
Class DNADataSet

java.lang.Object
  extended by de.jstacs.data.DataSet
      extended by 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 DataSets of DNA Sequences.

Author:
Jan Grau, Jens Keilwagen

Nested Class Summary
 
Nested classes/interfaces inherited from class de.jstacs.data.DataSet
DataSet.ElementEnumerator, DataSet.PartitionMethod, DataSet.WeightedDataSetFactory
 
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.
 
Method Summary
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 name
ignore - 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 name
ignore - the first character of lines that should be treated as comments
parser - 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)