Permalink
Browse files

Fixes bug where matrix format could be confused if sequence names wer…

…e all numeric

OptiCluster
  • Loading branch information...
1 parent bdac507 commit 4ec2078e79a9429ef8133d16dd65ab1794477c0e @mothur-westcott mothur-westcott committed Sep 28, 2016
@@ -3386,7 +3386,7 @@
ONLY_ACTIVE_ARCH = YES;
PRELINK_LIBS = "";
PRODUCT_NAME = mothur;
- SDKROOT = macosx10.11;
+ SDKROOT = macosx;
SKIP_INSTALL = NO;
};
name = Debug;
@@ -3420,7 +3420,7 @@
ONLY_ACTIVE_ARCH = YES;
PRELINK_LIBS = "";
PRODUCT_NAME = mothur;
- SDKROOT = macosx10.11;
+ SDKROOT = macosx;
SKIP_INSTALL = NO;
"VALID_ARCHS[sdk=*]" = "i386 x86_64";
};
@@ -3471,7 +3471,7 @@
"-lboost_iostreams",
"-lz",
);
- SDKROOT = macosx10.11;
+ SDKROOT = macosx;
SKIP_INSTALL = NO;
USER_HEADER_SEARCH_PATHS = /usr/local/include/;
};
@@ -3525,7 +3525,7 @@
"-lboost_iostreams",
"-lz",
);
- SDKROOT = macosx10.11;
+ SDKROOT = macosx;
SKIP_INSTALL = NO;
USER_HEADER_SEARCH_PATHS = /usr/local/include/;
};
@@ -3565,7 +3565,7 @@
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = macosx10.9;
+ SDKROOT = macosx;
};
name = Debug;
};
@@ -3602,7 +3602,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = macosx10.9;
+ SDKROOT = macosx;
};
name = Release;
};
@@ -856,7 +856,7 @@ int ClusterCommand::runOptiCluster(){
string distfile = columnfile;
if (format == "phylip") { distfile = phylipfile; }
- OptiMatrix matrix(distfile, thisNamefile, nameOrCount, cutoff, false);
+ OptiMatrix matrix(distfile, thisNamefile, nameOrCount, format, cutoff, false);
OptiCluster cluster(&matrix, metric, 0);
tag = cluster.getTag();
@@ -1393,7 +1393,7 @@ string ClusterSplitCommand::runOptiCluster(string thisDistFile, string thisNamef
string nameOrCount = "count";
if (namefile != "") { nameOrCount = "name"; }
- OptiMatrix matrix(thisDistFile, thisNamefile, nameOrCount, cutoff, false);
+ OptiMatrix matrix(thisDistFile, thisNamefile, nameOrCount, "column", cutoff, false);
OptiCluster cluster(&matrix, metric, numSingletons);
tag = cluster.getTag();
@@ -12,37 +12,32 @@
/***********************************************************************/
-OptiMatrix::OptiMatrix(string d, double c, bool s) : distFile(d), cutoff(c), sim(s) {
+OptiMatrix::OptiMatrix(string d, string df, double c, bool s) : distFile(d), distFormat(df), cutoff(c), sim(s) {
m = MothurOut::getInstance();
countfile = ""; namefile = "";
- distFormat = findDistFormat(distFile);
if (distFormat == "phylip") { readPhylip(); }
else { readColumn(); }
}
/***********************************************************************/
-OptiMatrix::OptiMatrix(string d, string nc, string f, double c, bool s) : distFile(d), format(f), cutoff(c), sim(s) {
+OptiMatrix::OptiMatrix(string d, string nc, string f, string df, double c, bool s) : distFile(d), distFormat(df), format(f), cutoff(c), sim(s) {
m = MothurOut::getInstance();
if (format == "name") { namefile = nc; countfile = ""; }
else if (format == "count") { countfile = nc; namefile = ""; }
else { countfile = ""; namefile = ""; }
- distFormat = findDistFormat(distFile);
-
if (distFormat == "phylip") { readPhylip(); }
else { readColumn(); }
}
/***********************************************************************/
-int OptiMatrix::readFile(string d, string nc, string f, double c, bool s) {
- distFile = d; format = f; cutoff = c; sim = s;
+int OptiMatrix::readFile(string d, string nc, string f, string df, double c, bool s) {
+ distFile = d; format = f; cutoff = c; sim = s; distFormat = df;
if (format == "name") { namefile = nc; countfile = ""; }
else if (format == "count") { countfile = nc; namefile = ""; }
else { countfile = ""; namefile = ""; }
- distFormat = findDistFormat(distFile);
-
if (distFormat == "phylip") { readPhylip(); }
else { readColumn(); }
@@ -21,8 +21,8 @@ class OptiMatrix {
public:
OptiMatrix() { m = MothurOut::getInstance(); }
- OptiMatrix(string, double, bool); //distfile, cutoff, sim
- OptiMatrix(string, string, string, double, bool); //distfile, name or count, format, cutoff, sim
+ OptiMatrix(string, string, double, bool); //distfile, distformat, cutoff, sim
+ OptiMatrix(string, string, string, string, double, bool); //distfile, name or count, format, distformat, cutoff, sim
~OptiMatrix(){ }
vector<int> getCloseSeqs(int i) { return closeness[i]; }
@@ -35,7 +35,7 @@ class OptiMatrix {
string getName(int); //name from nameMap index
ListVector* getListSingle();
long int print(ostream&);
- int readFile(string, string, string, double, bool); //distfile, name or count, format, cutoff, sim
+ int readFile(string, string, string, string, double, bool); //distfile, name or count, format, distformat, cutoff, sim
private:

0 comments on commit 4ec2078

Please sign in to comment.