de.jstacs.data
Class DNASample
java.lang.Object
de.jstacs.data.Sample
de.jstacs.data.DNASample
- All Implemented Interfaces:
- Iterable<Sequence>
public class DNASample
- extends Sample
This class exist for convenience to allow the user an easy creation of Samples of DNA Sequences.
- Author:
- Jan Grau, Jens Keilwagen
|
Constructor Summary |
DNASample(String fName)
Creates a new sample of DNA sequence from a FASTA file with file name fName. |
DNASample(String fName,
char ignore)
Creates a new sample of DNA sequence from a file with file name fName. |
DNASample(String fName,
char ignore,
SequenceAnnotationParser parser)
Creates a new sample of DNA sequence from a file with file name fName using the given parser. |
| Methods inherited from class de.jstacs.data.Sample |
diff, getAllElements, getAlphabetContainer, getAnnotation, getAnnotation, getAnnotationTypesAndIdentifier, getCompositeSample, getElementAt, getElementLength, getInfixSample, getMaximalElementLength, getMinimalElementLength, getNumberOfElements, getNumberOfElementsWithLength, getNumberOfElementsWithLength, getReverseComplementarySample, getSequenceAnnotationIndexMatrix, getSuffixSample, intersection, isDiscreteSample, isSimpleSample, iterator, partition, partition, partition, partition, partition, save, save, subSampling, toString, union, union, union, union |
DNASample
public DNASample(String fName)
throws FileNotFoundException,
WrongAlphabetException,
EmptySampleException,
WrongLengthException,
IOException
- Creates a new sample 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
EmptySampleException - if the Sample would be empty
WrongLengthException - never happens (forwarded from
Sample.Sample(AlphabetContainer, de.jstacs.io.AbstractStringExtractor, String, int)
)- See Also:
AbstractStringExtractor.FASTA,
DNASample(String, char)
DNASample
public DNASample(String fName,
char ignore)
throws FileNotFoundException,
WrongAlphabetException,
EmptySampleException,
WrongLengthException,
IOException
- Creates a new sample 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
EmptySampleException - if the Sample would be empty
WrongLengthException - never happens (forwarded from
Sample.Sample(AlphabetContainer, de.jstacs.io.AbstractStringExtractor, String, int)
)- See Also:
SparseStringExtractor,
AbstractStringExtractor.FASTA,
AbstractStringExtractor.USUALLY,
DNASample(String, char, SequenceAnnotationParser)
DNASample
public DNASample(String fName,
char ignore,
SequenceAnnotationParser parser)
throws FileNotFoundException,
WrongAlphabetException,
EmptySampleException,
WrongLengthException,
IOException
- Creates a new sample 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
EmptySampleException - if the Sample would be empty
WrongLengthException - never happens (forwarded from
Sample.Sample(AlphabetContainer, de.jstacs.io.AbstractStringExtractor, String, int)
)- See Also:
SparseStringExtractor,
AbstractStringExtractor.FASTA,
AbstractStringExtractor.USUALLY,
Sample.Sample(AlphabetContainer, de.jstacs.io.AbstractStringExtractor)