2 * readdistphylipfilecommand.cpp
5 * Created by Sarah Westcott on 1/2/09.
6 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10 #include "readdistphylipfilecommand.h"
12 //**********************************************************************************************************************
14 ReadDistPhylipFileCommand::ReadDistPhylipFileCommand(){
16 globaldata = GlobalData::getInstance();
18 filename = globaldata->inputFileName;
20 format = globaldata->getFormat();
21 read = new ReadPhylipMatrix(filename);
23 if(globaldata->getPrecision() != ""){
24 convert(globaldata->getPrecision(), precision);
27 if(globaldata->getCutOff() != ""){
28 convert(globaldata->getCutOff(), cutoff);
29 cutoff += (5 / (precision * 10.0));
31 read->setCutoff(cutoff);
33 if(globaldata->getNameFile() != ""){
34 nameMap = new NameAssignment(globaldata->getNameFile());
35 nameMap->readMap(1,2);
42 cout << "Standard Error: " << e.what() << " has occurred in the ReadDistPhylipFileCommand class Function ReadDistPhylipFileCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
46 cout << "An unknown error has occurred in the ReadDistPhylipFileCommand class function ReadDistPhylipFileCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
51 //**********************************************************************************************************************
53 ReadDistPhylipFileCommand::~ReadDistPhylipFileCommand(){
58 //**********************************************************************************************************************
60 int ReadDistPhylipFileCommand::execute(){
63 globaldata->setListVector(read->getListVector());
64 globaldata->setSparseMatrix(read->getMatrix());
68 cout << "Standard Error: " << e.what() << " has occurred in the ReadDistPhylipFileCommand class Function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
72 cout << "An unknown error has occurred in the ReadDistPhylipFileCommand class function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";