attributes = {
ORGANIZATIONNAME = "Schloss Lab";
};
- buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Mothur" */;
+ buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "mothur" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Mothur" */ = {
+ 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "mothur" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB928A08733DD80010E9CD /* Debug */,
//print headers
out << "label\tgroupsCompared\tRValue\tpValue" << endl;
- m->mothurOut("label\tgroupsCompared\tRValue\tpValue"); m->mothurOutEndLine();
+ m->mothurOut("\nlabel\tgroupsCompared\tRValue\tpValue"); m->mothurOutEndLine();
out.close();
}
//print headers
out << "groupsCompared\tRValue\tpValue" << endl;
- m->mothurOut("groupsCompared\tRValue\tpValue"); m->mothurOutEndLine();
+ m->mothurOut("\ngroupsCompared\tRValue\tpValue"); m->mothurOutEndLine();
out.close();
ReadPhylipVector readMatrix(phylipfile);
groupMap = new GroupMap(groupfile);
groupMap->readMap();
- //get groups you want to remove
+ //get groups you want to get
if (accnosfile != "") { readAccnos(); }
//make sure groups are valid
m->mothurOut("The output parameter allows you to output the list of names without the group and bin number added. \n");
m->mothurOut("With this option you can use the names file as an input in get.seqs and remove.seqs commands. To do this enter output=accnos. \n");
m->mothurOut("The get.sharedseqs command outputs a .names file for each distance level containing a list of sequences in the OTUs shared by the groups specified.\n");
- m->mothurOut("The get.sharedseqs command should be in the following format: get.sabund(label=yourLabels, groups=yourGroups, fasta=yourFastafile, output=yourOutput).\n");
+ m->mothurOut("The get.sharedseqs command should be in the following format: get.sharedseqs(label=yourLabels, groups=yourGroups, fasta=yourFastafile, output=yourOutput).\n");
m->mothurOut("Example get.sharedseqs(list=amazon.fn.list, label=unique-0.01, group=forest-pasture, fasta=amazon.fasta, output=accnos).\n");
m->mothurOut("The output to the screen is the distance and the number of otus at that distance for the groups you specified.\n");
m->mothurOut("The default value for label is all labels in your inputfile. The default for groups is all groups in your file.\n");
bool done = false;
int myrand;
while (!done) {
- myrand = (int)((float)(rand()) / (RAND_MAX / (thisSize-1) + 1));
+ myrand = int((float)(thisSize) * (float)(rand()) / ((float)RAND_MAX+1.0));
if (subset.count(names[myrand]) == 0) {
}
}
}else {
+
//randomly select a subset of those names to include in the subsample
for (int j = 0; j < size; j++) {
bool done = false;
int myrand;
while (!done) {
- myrand = (int)((float)(rand()) / (RAND_MAX / (thisSize-1) + 1));
+ myrand = int((float)(thisSize) * (float)(rand()) / ((float)RAND_MAX+1.0));
if (subset.count(names[myrand]) == 0) {
if (m->control_pressed) { delete order; return 0; }
//get random number to sample from order between 0 and thisSize-1.
- int myrand = (int)((float)(rand()) / (RAND_MAX / (thisSize-1) + 1));
+ int myrand = int((float)(thisSize) * (float)(rand()) / ((float)RAND_MAX+1.0));
int bin = order->get(myrand);
bool done = false;
int myrand;
while (!done) {
- myrand = (int)((float)(rand()) / (RAND_MAX / (names.size()-1) + 1));
+ myrand = int((float)(names.size()) * (float)(rand()) / ((float)RAND_MAX+1.0));
if (subset.count(names[myrand]) == 0) { //you are not already added
if (groupMap->getGroup(names[myrand]) == Groups[i]) { subset.insert(names[myrand]); break; }
bool done = false;
int myrand;
while (!done) {
- myrand = (int)((float)(rand()) / (RAND_MAX / (names.size()-1) + 1));
+ myrand = int((float)(names.size()) * (float)(rand()) / ((float)RAND_MAX+1.0));
if (subset.count(names[myrand]) == 0) { subset.insert(names[myrand]); break; }
}
if (m->control_pressed) { delete order; return 0; }
//get random number to sample from order between 0 and thisSize-1.
- int myrand = (int)((float)(rand()) / (RAND_MAX / (thisSize-1) + 1));
+ int myrand = int((float)(thisSize) * (float)(rand()) / ((float)RAND_MAX+1.0));
int bin = order->get(myrand);
if (m->control_pressed) { delete order; return 0; }
//get random number to sample from order between 0 and thisSize-1.
- int myrand = (int)((float)(rand()) / (RAND_MAX / (thisSize-1) + 1));
+ int myrand = int((float)(thisSize) * (float)(rand()) / ((float)RAND_MAX+1.0));
int bin = order->get(myrand);
randomData.resize(numComp,0); //data[0] = unweightedscore
//create new tree with same num nodes and leaves as users
+ if (numComp < processors) { processors = numComp; }
+
outSum << "Tree#" << '\t' << "Groups" << '\t' << "UWScore" <<'\t' << "UWSig" << endl;
m->mothurOut("Tree#\tGroups\tUWScore\tUWSig"); m->mothurOutEndLine();
//get weighted for users tree
userData.resize(numComp,0); //data[0] = weightedscore AB, data[1] = weightedscore AC...
randomData.resize(numComp,0); //data[0] = weightedscore AB, data[1] = weightedscore AC...
+
+ if (numComp < processors) { processors = numComp; }
//get weighted scores for users trees
for (int i = 0; i < T.size(); i++) {
lines.push_back(linePair(startPos, numPairsPerProcessor));
}
-
data = createProcesses(t, namesOfGroupCombos);
lines.clear();
}
}
lines.push_back(linePair(startPos, numPairsPerProcessor));
}
-
+
data = createProcesses(t, namesOfGroupCombos, true);
lines.clear();
if (!in.eof()) {
int num;
in >> num; m->gobble(in);
-
+
if (m->control_pressed) { break; }
double w;
for (int j = 0; j < num; j++) {
in >> w;
+
results.push_back(w);
}
m->gobble(in);