use of dr.evolution.io.FastaImporter in project beast-mcmc by beast-dev.
the class DataModelImporter method importFastaFile.
// FASTA
private void importFastaFile(File file, DateGuesser guesser, Map dataModel) throws IOException, ImportException {
try {
FileReader reader = new FileReader(file);
FastaImporter importer = new FastaImporter(reader, Nucleotides.INSTANCE);
Alignment alignment = importer.importAlignment();
reader.close();
setData(dataModel, guesser, file.getName(), alignment, null, alignment, null, null, null);
} catch (ImportException e) {
throw new ImportException(e.getMessage());
} catch (IOException e) {
throw new IOException(e.getMessage());
}
}
use of dr.evolution.io.FastaImporter in project beast-mcmc by beast-dev.
the class BEAUTiImporter method importFastaFile.
// FASTA
private void importFastaFile(File file) throws IOException, ImportException {
try {
FileReader reader = new FileReader(file);
FastaImporter importer = new FastaImporter(reader, Nucleotides.INSTANCE);
Alignment alignment = importer.importAlignment();
reader.close();
setData(file.getName(), alignment, alignment, null, null, null, null, null);
} catch (ImportException e) {
throw new ImportException(e.getMessage());
} catch (IOException e) {
throw new IOException(e.getMessage());
}
}
Aggregations