outputFiles = (
"$(TARGET_BUILD_DIR)/$(INPUT_FILE_BASE).o",
);
- script = "gfortran -g -m64 -c ${PROJECT_DIR}/${INPUT_FILE_NAME} -o ${TARGET_BUILD_DIR}/${INPUT_FILE_BASE}.o";
+ script = "/usr/local/gfortran/bin/gfortran -g -m64 -c ${PROJECT_DIR}/${INPUT_FILE_NAME} -o ${TARGET_BUILD_DIR}/${INPUT_FILE_BASE}.o";
};
/* End PBXBuildRule section */
};
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Mothur" */;
compatibilityVersion = "Xcode 3.1";
- developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
pDataArray->count = pDataArray->end;
- AlignmentDB* templateDB = new AlignmentDB(templateFileName, pDataArray->search, pDataArray->kmerSize, pDataArray->gapOpen, pDataArray->gapExtend, pDataArray->match, pDataArray->misMatch, pDataArray->threadID);
+ AlignmentDB* templateDB = new AlignmentDB(pDataArray->templateFileName, pDataArray->search, pDataArray->kmerSize, pDataArray->gapOpen, pDataArray->gapExtend, pDataArray->match, pDataArray->misMatch, pDataArray->threadID);
//moved this into driver to avoid deep copies in windows paralellized version
Alignment* alignment;
try {
- pDataArray->outputFName = pDataArray->m->getFullPathName(outputFName);
- pDataArray->filename = pDataArray->m->getFullPathName(filename);
- pDataArray->alns = pDataArray->m->getFullPathName(alns);
+ pDataArray->outputFName = pDataArray->m->getFullPathName(pDataArray->outputFName);
+ pDataArray->filename = pDataArray->m->getFullPathName(pDataArray->filename);
+ pDataArray->alns = pDataArray->m->getFullPathName(pDataArray->alns);
//clears files
ofstream out, out1, out2;
cPara.push_back(tempIdsmoothwindow);
}
- /*if (useMinsmoothid) {
- char* tempminsmoothid = new char[14];
- //strcpy(tempminsmoothid, "--minsmoothid");
- *tempminsmoothid = '\0'; strncat(tempminsmoothid, "--minsmoothid", 13);
- cPara.push_back(tempminsmoothid);
- char* tempMinsmoothid = new char[minsmoothid.length()+1];
- *tempMinsmoothid = '\0'; strncat(tempMinsmoothid, minsmoothid.c_str(), minsmoothid.length());
- //strcpy(tempMinsmoothid, minsmoothid.c_str());
- cPara.push_back(tempMinsmoothid);
- }*/
-
if (pDataArray->useMaxp) {
char* tempmaxp = new char[7];
//strcpy(tempmaxp, "--maxp");
try {
- pDataArray->outputFName = pDataArray->m->getFullPathName(outputFName);
- pDataArray->filename = pDataArray->m->getFullPathName(filename);
- pDataArray->alns = pDataArray->m->getFullPathName(alns);
+ pDataArray->outputFName = pDataArray->m->getFullPathName(pDataArray->outputFName);
+ pDataArray->filename = pDataArray->m->getFullPathName(pDataArray->filename);
+ pDataArray->alns = pDataArray->m->getFullPathName(pDataArray->alns);
int totalSeqs = 0;
int numChimeras = 0;
try {
CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "none", "none",false,true); parameters.push_back(pfasta);
CommandParameter pgroups("groups", "String", "", "", "", "", "",false,false); parameters.push_back(pgroups);
+ CommandParameter poutput("output", "String", "", "", "", "", "",false,false); parameters.push_back(poutput);
CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir);
CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir);
//append output files
for(int i=0;i<processIDS.size();i++){
- newFName = m->getFullPathName(".\\" + newFName);
- newNName = m->getFullPathName(".\\" + newNName);
- cout << newFName << endl;
+ //newFName = m->getFullPathName(".\\" + newFName);
+ //newNName = m->getFullPathName(".\\" + newNName);
+
m->appendFiles((newFName + toString(processIDS[i]) + ".temp"), newFName);
m->mothurRemove((newFName + toString(processIDS[i]) + ".temp"));
individual newguy;
//read in first row since you know there is at least 1 group.
- f >> label >> groupN >> num;
+ //are we at the beginning of the file??
+ if (m->saveNextLabel == "") {
+ f >> label;
+
+ //is this a shared file that has headers
+ if (label == "label") {
+ //gets "group"
+ f >> label; m->gobble(f);
+
+ //gets "numOtus"
+ f >> label; m->gobble(f);
+
+ //eat rest of line
+ label = m->getline(f); m->gobble(f);
+
+ //parse labels to save
+ istringstream iStringStream(label);
+ m->binLabelsInFile.clear();
+ while(!iStringStream.eof()){
+ if (m->control_pressed) { break; }
+ string temp;
+ iStringStream >> temp; m->gobble(iStringStream);
+
+ m->binLabelsInFile.push_back(temp);
+ }
+
+ f >> label;
+ }
+ }else { label = m->saveNextLabel; }
+
+ //reset labels, currentLabels may have gotten changed as otus were eliminated because of group choices or sampling
+ m->currentBinLabels = m->binLabelsInFile;
+
+ //read in first row since you know there is at least 1 group.
+ f >> groupN >> num;
+
holdLabel = label;
+
vector<string> allGroups;
//save group in groupmap
allGroups.push_back(groupN);
m->gobble(f);
- if (f.eof() != true) { f >> nextLabel; }
+ if (!(f.eof())) { f >> nextLabel; }
//read the rest of the groups info in
while ((nextLabel == holdLabel) && (f.eof() != true)) {
}
- //put file pointer back since you are now at a new distance label
- for (int i = 0; i < nextLabel.length(); i++) { f.unget(); }
-
+ m->saveNextLabel = nextLabel;
+
groupmap->setNamesOfGroups(allGroups);
m->setAllGroups(allGroups);
//read in first row since you know there is at least 1 group.
f >> groupN >> num;
+
holdLabel = label;
//add new vector to lookup
void ShhherCommand::writeQualities(vector<int> otuCounts){
try {
- string qualityFileName = flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.qual";
+ string thisOutputDir = outputDir;
+ if (outputDir == "") { thisOutputDir += m->hasPath(flowFileName); }
+ string qualityFileName = thisOutputDir + flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.qual";
ofstream qualityFile;
m->openOutputFile(qualityFileName, qualityFile);
void ShhherCommand::writeSequences(vector<int> otuCounts){
try {
-
- string fastaFileName = flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.fasta";
+ string thisOutputDir = outputDir;
+ if (outputDir == "") { thisOutputDir += m->hasPath(flowFileName); }
+ string fastaFileName = thisOutputDir + flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.fasta";
ofstream fastaFile;
m->openOutputFile(fastaFileName, fastaFile);
void ShhherCommand::writeNames(vector<int> otuCounts){
try {
- string nameFileName = flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.names";
+ string thisOutputDir = outputDir;
+ if (outputDir == "") { thisOutputDir += m->hasPath(flowFileName); }
+ string nameFileName = thisOutputDir + flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.names";
ofstream nameFile;
m->openOutputFile(nameFileName, nameFile);
void ShhherCommand::writeGroups(){
try {
- string fileRoot = flowFileName.substr(0,flowFileName.find_last_of('.'));
+ string thisOutputDir = outputDir;
+ if (outputDir == "") { thisOutputDir += m->hasPath(flowFileName); }
+ string fileRoot = thisOutputDir + flowFileName.substr(0,flowFileName.find_last_of('.'));
string groupFileName = fileRoot + ".shhh.groups";
ofstream groupFile;
m->openOutputFile(groupFileName, groupFile);
void ShhherCommand::writeClusters(vector<int> otuCounts){
try {
- string otuCountsFileName = flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.counts";
+ string thisOutputDir = outputDir;
+ if (outputDir == "") { thisOutputDir += m->hasPath(flowFileName); }
+ string otuCountsFileName = thisOutputDir + flowFileName.substr(0,flowFileName.find_last_of('.')) + ".shhh.counts";
ofstream otuCountsFile;
m->openOutputFile(otuCountsFileName, otuCountsFile);