isa = XCBuildConfiguration;
buildSettings = {
GCC_OPTIMIZATION_LEVEL = 3;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
+ GCC_WARN_PEDANTIC = NO;
GCC_WARN_UNUSED_VARIABLE = YES;
+ OTHER_CPLUSPLUSFLAGS = "";
PREBINDING = NO;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ WARNING_CFLAGS = "";
};
name = Debug;
};
i386,
);
GCC_OPTIMIZATION_LEVEL = 3;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
+ GCC_WARN_PEDANTIC = NO;
GCC_WARN_UNUSED_VARIABLE = YES;
+ OTHER_CPLUSPLUSFLAGS = "";
PREBINDING = NO;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ WARNING_CFLAGS = "";
};
name = Release;
};
while(!inFASTA.eof()){
char c = inFASTA.get();
- if(c == '>'){ positions.push_back(inFASTA.tellg()); }
+ if(c == '>'){ int pos = inFASTA.tellg(); positions.push_back(pos-1); }
while (!inFASTA.eof()) { c = inFASTA.get(); if (c == 10 || c == 13){ break; } } // get rest of line if there's any crap there
}
inFASTA.close();
void AlignCommand::appendAlignFiles(string temp, string filename) {
try{
- //open output file in append mode
ofstream output;
- openOutputFileAppend(filename, output);
-
- //open temp file for reading
ifstream input;
+ openOutputFileAppend(filename, output);
openInputFile(temp, input);
- string line;
- //read input file and write to output file
- while(input.eof() != true) {
- getline(input, line); //getline removes the newline char
- if (line != "") {
- output << line << endl; // Appending back newline char
- }
- }
+ while(char c = input.get()){
+ if(input.eof()) { break; }
+ else { output << c; }
+ }
input.close();
output.close();
void AlignCommand::appendReportFiles(string temp, string filename) {
try{
- //open output file in append mode
ofstream output;
- openOutputFileAppend(filename, output);
-
- //open temp file for reading
ifstream input;
+ openOutputFileAppend(filename, output);
openInputFile(temp, input);
+
while (!input.eof()) { char c = input.get(); if (c == 10 || c == 13){ break; } } // get header line
-
- string line;
- //read input file and write to output file
- while(input.eof() != true) {
- getline(input, line); //getline removes the newline char
- if (line != "") {
- output << line << endl; // Appending back newline char
- }
- }
+
+ while(char c = input.get()){
+ if(input.eof()) { break; }
+ else { output << c; }
+ }
input.close();
output.close();
else if (groupfile == "not found") { groupfile = ""; }
if (abort == false) {
- openInputFile(fastafile, in);
+// openInputFile(fastafile, in);
fasta = new FastaMap();
if (groupfile != "") {
groupMap = new GroupMap(groupfile);
int error = 0;
//read fastafile
- fasta->readFastaFile(in);
+ fasta->readFastaFile(fastafile);
- in.close();
//set format to list so input can get listvector
// globaldata->setFormat("list");
}
-/**************************************************************************************/
\ No newline at end of file
+/**************************************************************************************/
}
/***********************************************************/
-
else {
//valid paramters for this command
- string Array[] = {"fasta"};
+ string Array[] = {"fasta", "name"};
vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
OptionParser parser(option);
}
//check for required parameters
- filename = validParameter.validFile(parameters, "fasta", true);
- if (filename == "not open") { abort = true; }
- else if (filename == "not found") { filename = ""; cout << "fasta is a required parameter for the unique.seqs command." << endl; abort = true; }
+ inFastaName = validParameter.validFile(parameters, "fasta", true);
+ if (inFastaName == "not open") { abort = true; }
+ else if (inFastaName == "not found") { inFastaName = ""; cout << "fasta is a required parameter for the unique.seqs command." << endl; abort = true; }
+ oldNameMapFName = validParameter.validFile(parameters, "name", true);
+ if (oldNameMapFName == "not open") { abort = true; }
+ else if (oldNameMapFName == "not found"){ oldNameMapFName = ""; }
}
}
try {
if (abort == true) { return 0; }
-
+
//prepare filenames and open files
- outputFileName = (getRootName(filename) + "names");
- outFastafile = (getRootName(filename) + "unique.fasta");
+ string outNameFile = (getRootName(inFastaName) + "names");
+ string outFastaFile = (getRootName(inFastaName) + "unique" + getExtension(inFastaName));
- openInputFile(filename, in);
- openOutputFile(outputFileName, out);
- openOutputFile(outFastafile, outFasta);
-
- //constructor reads in file and store internally
- fastamap = new FastaMap();
+ FastaMap fastamap;
- //two columns separated by tabs sequence name and then sequence
- fastamap->readFastaFile(in);
+ if(oldNameMapFName == "") { fastamap.readFastaFile(inFastaName); }
+ else { fastamap.readFastaFile(inFastaName, oldNameMapFName); }
- //print out new names file
- //file contains 2 columns separated by tabs. the first column is the groupname(name of first sequence found.
- //the second column is the list of names of identical sequences separated by ','.
- fastamap->printNamesFile(out);
- fastamap->printCondensedFasta(outFasta);
+ fastamap.printCondensedFasta(outFastaFile);
+ fastamap.printNamesFile(outNameFile);
- in.close();
- out.close();
- outFasta.close();
-
return 0;
}
catch(exception& e) {
public:
DeconvoluteCommand(string);
- ~DeconvoluteCommand() { delete fastamap; };
+ ~DeconvoluteCommand() { };
int execute();
void help();
private:
- FastaMap* fastamap;
- ifstream in;
- ofstream out, outFasta;
- string filename, outputFileName, outFastafile;
+ string inFastaName, oldNameMapFName;
bool abort;
};
/**************************************************************************************************/
-#endif
\ No newline at end of file
+#endif
//open output file in append mode
openOutputFileAppend(filename, output);
-
- //open temp file for reading
openInputFile(temp, input);
- string line;
- //read input file and write to output file
- while(input.eof() != true) {
- getline(input, line); //getline removes the newline char
- if (line != "") {
- output << line << endl; // Appending back newline char
- }
- }
+ while(char c = input.get()){
+ if(input.eof()) { break; }
+ else { output << c; }
+ }
input.close();
output.close();
exit(1);
}
}
-/**************************************************************************************************/
\ No newline at end of file
+/**************************************************************************************************/
exit(1);
}
}
-/***********************************************************************/
\ No newline at end of file
+/***********************************************************************/
/*******************************************************************************/
-void FastaMap::readFastaFile(ifstream& in) {
+void FastaMap::readFastaFile(string inFileName) {
try {
+ ifstream in;
+ openInputFile(inFileName, in);
string name, sequence, line;
sequence = "";
-// int c;
string temp;
-
-
- //read through file
-// while ((c = in.get()) != EOF) {
-// name = ""; sequence = "";
-// //is this a name
-// if (c == '>') {
-// name = readName(in);
-// sequence = readSequence(in);
-// }else { cout << "Error fasta in your file. Please correct." << endl; }
-
- //store info in map
- //input sequence info into map
+
while(!in.eof()){
Sequence currSeq(in);
name = currSeq.getName();
- sequence = currSeq.getUnaligned();
+
+ if(currSeq.getIsAligned()) { sequence = currSeq.getAligned(); }
+ else { sequence = currSeq.getUnaligned(); }
+
seqmap[name] = sequence;
- it = data.find(sequence);
+ map<string,group>::iterator it = data.find(sequence);
if (it == data.end()) { //it's unique.
data[sequence].groupname = name; //group name will be the name of the first duplicate sequence found.
- data[sequence].groupnumber = 1;
+// data[sequence].groupnumber = 1;
data[sequence].names = name;
}else { // its a duplicate.
data[sequence].names += "," + name;
- data[sequence].groupnumber++;
+// data[sequence].groupnumber++;
}
gobble(in);
}
-
+ in.close();
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the FastaMap class Function readFastaFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
/*******************************************************************************/
-string FastaMap::getGroupName(string seq) { //pass a sequence name get its group
- return data[seq].groupname;
+void FastaMap::readFastaFile(string inFastaFile, string oldNameFileName){ //prints data
+
+ ifstream oldNameFile;
+ openInputFile(oldNameFileName, oldNameFile);
+
+ map<string,string> oldNameMap;
+ string name, list;
+ while(!oldNameFile.eof()){
+ oldNameFile >> name >> list;
+ oldNameMap[name] = list;
+ gobble(oldNameFile);
+ }
+ oldNameFile.close();
+
+ ifstream inFASTA;
+ openInputFile(inFastaFile, inFASTA);
+ string sequence;
+ while(!inFASTA.eof()){
+ Sequence currSeq(inFASTA);
+ name = currSeq.getName();
+
+ if(currSeq.getIsAligned()) { sequence = currSeq.getAligned(); }
+ else { sequence = currSeq.getUnaligned(); }
+
+ seqmap[name] = sequence;
+ map<string,group>::iterator it = data.find(sequence);
+ if (it == data.end()) { //it's unique.
+ data[sequence].groupname = name; //group name will be the name of the first duplicate sequence found.
+// data[sequence].groupnumber = 1;
+ data[sequence].names = oldNameMap[name];
+ }else { // its a duplicate.
+ data[sequence].names += "," + oldNameMap[name];
+// data[sequence].groupnumber++;
+ }
+
+ gobble(inFASTA);
+ }
+
+
+ inFASTA.close();
}
/*******************************************************************************/
-string FastaMap::getNames(string seq) { //pass a sequence get the string of names in the group separated by ','s.
- return data[seq].names;
+string FastaMap::getGroupName(string seq) { //pass a sequence name get its group
+ return data[seq].groupname;
}
/*******************************************************************************/
-int FastaMap::getGroupNumber(string seq) { //pass a sequence get the number of identical sequences.
- return data[seq].groupnumber;
+string FastaMap::getNames(string seq) { //pass a sequence get the string of names in the group separated by ','s.
+ return data[seq].names;
}
/*******************************************************************************/
string FastaMap::getSequence(string name) {
- it2 = seqmap.find(name);
- if (it2 == seqmap.end()) { //it's not found
- return "not found";
- }else { // found it
- return it2->second;
- }
+
+ map<string,string>::iterator it = seqmap.find(name);
+ if (it == seqmap.end()) { return "not found"; }
+ else { return it->second; }
+
}
/*******************************************************************************/
void FastaMap::push_back(string name, string seq) {
- it = data.find(seq);
+
+ map<string,group>::iterator it = data.find(seq);
if (it == data.end()) { //it's unique.
data[seq].groupname = name; //group name will be the name of the first duplicate sequence found.
- data[seq].groupnumber = 1;
data[seq].names = name;
}else { // its a duplicate.
data[seq].names += "," + name;
- data[seq].groupnumber++;
}
-
seqmap[name] = seq;
}
/*******************************************************************************/
-void FastaMap::printNamesFile(ostream& out){ //prints data
+void FastaMap::printNamesFile(string outFileName){ //prints data
try {
+ ofstream outFile;
+ openOutputFile(outFileName, outFile);
+
// two column file created with groupname and them list of identical sequence names
- for (it = data.begin(); it != data.end(); it++) {
- out << it->second.groupname << '\t' << it->second.names << endl;
+ for (map<string,group>::iterator it = data.begin(); it != data.end(); it++) {
+ outFile << it->second.groupname << '\t' << it->second.names << endl;
}
+ outFile.close();
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the FastaMap class Function print. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
/*******************************************************************************/
-void FastaMap::printCondensedFasta(ostream& out){ //prints data
+void FastaMap::printCondensedFasta(string outFileName){ //prints data
try {
+ ofstream out;
+ openOutputFile(outFileName, out);
//creates a fasta file
- for (it = data.begin(); it != data.end(); it++) {
+ for (map<string,group>::iterator it = data.begin(); it != data.end(); it++) {
out << ">" << it->second.groupname << endl;
out << it->first << endl;
}
+ out.close();
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the FastaMap class Function print. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
~FastaMap() {};
string getGroupName(string); //pass a sequence name get its group
- int getGroupNumber(string); //pass a sequence name get number of sequence in its group
string getNames(string); //pass a sequence get the string of names in the group separated by ','s.
void push_back(string, string); //sequencename, sequence
int sizeUnique(); //returns number of unique sequences
- void printNamesFile(ostream&); //produces a 2 column file with the groupname in the first column and the names in the second column - a names file.
- void printCondensedFasta(ostream&); //produces a fasta file.
- void readFastaFile(ifstream&);
+ void printNamesFile(string); //produces a 2 column file with the groupname in the first column and the names in the second column - a names file.
+ void printCondensedFasta(string); //produces a fasta file.
+ void readFastaFile(string);
+ void readFastaFile(string, string);
string getSequence(string); //pass it a name of a sequence, it returns the sequence.
private:
struct group {
string groupname; //the group name for identical sequences, will be set to the first sequence found.
- int groupnumber; //the number of sequence names with the same sequence.
string names; //the names of the sequence separated by ','.
};
map<string, group> data; //sequence, groupinfo - condensed representation of file
map<string, string> seqmap; //name, sequence - uncondensed representation of file
- map<string, group>::iterator it;
- map<string, string>::iterator it2;
-
- string readName(ifstream&);
- string readSequence(ifstream&);
};
#endif
GlobalData* globaldata;
};
-#endif
\ No newline at end of file
+#endif
bool abort;
};
-#endif
\ No newline at end of file
+#endif
}
}else { cout << "error, no listvector." << endl; }
- openInputFile(fastafile, in);
+// openInputFile(fastafile, in);
fasta = new FastaMap();
}
int error;
//read fastafile
- fasta->readFastaFile(in);
+ fasta->readFastaFile(fastafile);
in.close();
#ifndef MOTHUR_H
#define MOTHUR_H
-using namespace std;
/*
#include <cmath>
#include <math.h>
#include <algorithm>
+
+//misc
+#include <cerrno>
#include <ctime>
+#include <limits>
+
+using namespace std;
#ifdef _WIN32
#define exp(x) (exp((double) x))
#define sqrt(x) (sqrt((double) x))
#define log10(x) (log10((double) x))
#define log2(x) (log10(x)/log10(2))
+ #define isnan(x) ((x) != (x))
+ #define isinf(x) (fabs(x) == std::numeric_limits<double>::infinity())
+#else
+ #include <sys/wait.h>
+ #include <unistd.h>
#endif
//**********************************************************************************************************************
-void NameAssignment::readMap(int colA, int colB){
+void NameAssignment::readMap(){
try{
string firstCol, secondCol, skip;
// int index = 0;
- int skipNCols = colB-colA-1;
-
- map<string, string> data;
+// map<string, string> data;
+ int rowIndex = 0;
+
while(fileHandle){
fileHandle >> firstCol; //read from first column
-
- for(int i=0;i<skipNCols;i++){ //allows for anticipated file format
- fileHandle >> skip;
- }
-
fileHandle >> secondCol; //read from second column
-
- data[firstCol] = secondCol; //store data in map
-
+
+// data[firstCol] = secondCol; //store data in map
+
+ list.push_back(secondCol); //adds data's value to list
+ (*this)[firstCol] = rowIndex++;
gobble(fileHandle);
}
fileHandle.close();
- int rowIndex = 0;
- map<string, string>::iterator it = data.begin();
- for(it;it!=data.end();it++){
- list.push_back(it->second); //adds data's value to list
- (*this)[it->first] = rowIndex;
- rowIndex++;
- }
+// map<string, string>::iterator it = data.begin();
+// for(it;it!=data.end();it++){
+// cout << it->first << endl;
+// (*this)[it->first] = rowIndex;
+// rowIndex++;
+// }
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the NameAssignment class Function readMap. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
class NameAssignment : public map<string,int> {
public:
NameAssignment(string);
- void readMap(int, int);
+ void readMap();
ListVector getListVector();
int get(string);
void print();
cout << "An unknown error has occurred in the ParseListCommand class function process. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
exit(1);
}
-}
\ No newline at end of file
+}
};
/***********************************************************************/
-#endif
\ No newline at end of file
+
+#endif
void ReadColumnMatrix::read(NameAssignment* nameMap){
try {
+
+ string firstName, secondName;
+ float distance;
+ int nseqs = nameMap->size();
+
+ list = new ListVector(nameMap->getListVector());
- string firstName, secondName;
- float distance;
- int nseqs = nameMap->size();
+ Progress* reading = new Progress("Reading matrix: ", nseqs * nseqs);
- list = new ListVector(nameMap->getListVector());
-
- Progress* reading = new Progress("Reading matrix: ", nseqs * nseqs);
+ int lt = 1;
+ int refRow = 0; //we'll keep track of one cell - Cell(refRow,refCol) - and see if it's transpose
+ int refCol = 0; //shows up later - Cell(refCol,refRow). If it does, then its a square matrix
+
+ //need to see if this is a square or a triangular matrix...
- int lt = 1;
- int refRow = 0; //we'll keep track of one cell - Cell(refRow,refCol) - and see if it's transpose
- int refCol = 0; //shows up later - Cell(refCol,refRow). If it does, then its a square matrix
+ while(fileHandle && lt == 1){ //let's assume it's a triangular matrix...
+
+ fileHandle >> firstName >> secondName >> distance; // get the row and column names and distance
- //need to see if this is a square or a triangular matrix...
- while(fileHandle && lt == 1){ //let's assume it's a triangular matrix...
+ map<string,int>::iterator itA = nameMap->find(firstName);
+ map<string,int>::iterator itB = nameMap->find(secondName);
- fileHandle >> firstName >> secondName >> distance; // get the row and column names and distance
-
- if(nameMap->count(firstName)==0){
- cerr << "AError: Sequence '" << firstName << "' was not found in the names file, please correct\n";
- }
- if(nameMap->count(secondName)==0){
- cerr << "AError: Sequence '" << secondName << "' was not found in the names file, please correct\n";
- }
-
- if (distance == -1) { distance = 1000000; }
-
- if(distance < cutoff && nameMap->get(firstName) != nameMap->get(secondName)){
- if(nameMap->get(firstName) > nameMap->get(secondName)){
- PCell value(nameMap->get(firstName), nameMap->get(secondName), distance);
-
- if(refRow == refCol){ // in other words, if we haven't loaded refRow and refCol...
- refRow = nameMap->get(firstName);
- refCol = nameMap->get(secondName);
- D->addCell(value);
- }
- else if(refRow == nameMap->get(firstName) && refCol == nameMap->get(secondName)){
- lt = 0;
- }
- else{
- D->addCell(value);
- }
- }
- else if(nameMap->get(firstName) < nameMap->get(secondName)){
- PCell value(nameMap->get(secondName), nameMap->get(firstName), distance);
-
- if(refRow == refCol){ // in other words, if we haven't loaded refRow and refCol...
- refRow = nameMap->get(firstName);
- refCol = nameMap->get(secondName);
- D->addCell(value);
- }
- else if(refRow == nameMap->get(secondName) && refCol == nameMap->get(firstName)){
- lt = 0;
- }
- else{
- D->addCell(value);
- }
- }
- reading->update(nameMap->get(firstName) * nseqs);
- }
- gobble(fileHandle);
+ if(itA == nameMap->end()){
+ cerr << "AAError: Sequence '" << firstName << "' was not found in the names file, please correct\n";
+ }
+ if(itB == nameMap->end()){
+ cerr << "ABError: Sequence '" << secondName << "' was not found in the names file, please correct\n";
}
- if(lt == 0){ // oops, it was square
- fileHandle.close(); //let's start over
- D->clear(); //let's start over
-
- openInputFile(distFile, fileHandle); //let's start over
-
- while(fileHandle){
- fileHandle >> firstName >> secondName >> distance;
+ if (distance == -1) { distance = 1000000; }
+
+ if(distance < cutoff && itA != itB){
+ if(itA->second > itB->second){
+ PCell value(itA->second, itB->second, distance);
- if(nameMap->count(firstName)==0){
- cerr << "BError: Sequence '" << firstName << "' was not found in the names file, please correct\n";
+ if(refRow == refCol){ // in other words, if we haven't loaded refRow and refCol...
+ refRow = itA->second;
+ refCol = itB->second;
+ D->addCell(value);
}
- if(nameMap->count(secondName)==0){
- cerr << "BError: Sequence '" << secondName << "' was not found in the names file, please correct\n";
+ else if(refRow == itA->second && refCol == itB->second){
+ lt = 0;
}
-
- if (distance == -1) { distance = 1000000; }
-
- if(distance < cutoff && nameMap->get(firstName) > nameMap->get(secondName)){
- PCell value(nameMap->get(firstName), nameMap->get(secondName), distance);
+ else{
D->addCell(value);
- reading->update(nameMap->get(firstName) * nseqs);
}
+ }
+ else if(itA->second < itB->second){
+ PCell value(itB->second, itA->second, distance);
- gobble(fileHandle);
+ if(refRow == refCol){ // in other words, if we haven't loaded refRow and refCol...
+ refRow = itA->second;
+ refCol = itB->second;
+ D->addCell(value);
+ }
+ else if(refRow == itB->second && refCol == itA->second){
+ lt = 0;
+ }
+ else{
+ D->addCell(value);
+ }
}
+ reading->update(itA->second * nseqs);
}
- // else if(lt == 0){
- // while(fileHandle){
- // fileHandle >> firstName >> secondName >> distance;
- //
- // if(nameMap->count(firstName)==0){
- // cerr << "CError: Sequence '" << firstName << "' was not found in the names file, please correct\n";
- // }
- // if(nameMap->count(secondName)==0){
- // cerr << "CError: Sequence '" << secondName << "' was not found in the names file, please correct\n";
- // }
- // if (distance == -1) { distance = 1000000; }
+ gobble(fileHandle);
+ }
+
+ if(lt == 0){ // oops, it was square
+ fileHandle.close(); //let's start over
+ D->clear(); //let's start over
+
+ openInputFile(distFile, fileHandle); //let's start over
+
+ while(fileHandle){
+ fileHandle >> firstName >> secondName >> distance;
- // if(distance < cutoff && (*nameMap)[firstName].second < (*nameMap)[secondName].second){
- //// cout << (*nameMap)[secondName] << ' ' << (*nameMap)[firstName] << ' ' << distance << endl;
- // D->addCell(Cell((*nameMap)[secondName].second, (*nameMap)[firstName].second, distance));
- // reading->update((*nameMap)[secondName].second * nseqs);
- // }
- //
- // gobble(fileHandle);
- // }
- // }
- reading->finish();
- fileHandle.close();
-
- list->setLabel("0");
-
+ map<string,int>::iterator itA = nameMap->find(firstName);
+ map<string,int>::iterator itB = nameMap->find(secondName);
+
+ if(itA == nameMap->end()){
+ cerr << "BError: Sequence '" << firstName << "' was not found in the names file, please correct\n";
+ }
+ if(itB == nameMap->end()){
+ cerr << "BError: Sequence '" << secondName << "' was not found in the names file, please correct\n";
+ }
+
+ if (distance == -1) { distance = 1000000; }
+
+ if(distance < cutoff && itA->second > itB->second){
+ PCell value(itA->second, itB->second, distance);
+ D->addCell(value);
+ reading->update(itA->second * nseqs);
+ }
+
+ gobble(fileHandle);
+ }
+ }
+
+ reading->finish();
+ fileHandle.close();
+
+ list->setLabel("0");
+
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the ReadColumnMatrix class Function read. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
/******************************************************/
-#endif
\ No newline at end of file
+#endif
if (namefile == "not open") { abort = true; }
else if (namefile == "not found") { namefile = ""; }
else { globaldata->setNameFile(namefile); }
-
//you are doing a list and group shared
if ((phylipfile != "") && (groupfile != "")) {
if(namefile != ""){
nameMap = new NameAssignment(namefile);
- nameMap->readMap(1,2);
+ nameMap->readMap();
}else{
nameMap = NULL;
}
};
-#endif
\ No newline at end of file
+#endif
/******************************************************/
-#endif
\ No newline at end of file
+#endif
}
gobble(inFASTA);
}
- if(namefile != "") { screenNameGroupFile(badSeqNames); }
- if(groupfile != "") { screenGroupFile(badSeqNames); }
- if(alignreport != "") { screenAlignReport(badSeqNames); }
+ if(namefile != "" && groupfile != "") { screenNameGroupFile(badSeqNames); } // this screens both names and groups
+ else if(groupfile != "") { screenGroupFile(badSeqNames); } // this screens just the groups
+ if(alignreport != "") { screenAlignReport(badSeqNames); }
goodSeqOut.close();
badSeqOut.close();
/***********************************************************************/
-
-
-#endif
\ No newline at end of file
+#endif
/***********************************************************************/
-
-
-#endif
\ No newline at end of file
+#endif
/***********************************************************************/
-
-
-#endif
\ No newline at end of file
+#endif
/***********************************************************************/
-
-
-#endif
\ No newline at end of file
+#endif
/***********************************************************************/
-#endif
\ No newline at end of file
+#endif
}
}
-/***********************************************************************/
\ No newline at end of file
+/***********************************************************************/
/***********************************************************************/
-#endif
\ No newline at end of file
+#endif
if (globaldata->gGroupmap == NULL) { groupmap = new GroupMap(); }
- int num, inputData, pos, count;
+ int num, inputData, count;
count = 0; numSeqs = 0;
string holdLabel, nextLabel, groupN;
individual newguy;
}
}
-/***********************************************************************/
\ No newline at end of file
+/***********************************************************************/
/**************************************************************************************************/
-
-
-#endif
\ No newline at end of file
+#endif
}
}
-/***********************************************************/
\ No newline at end of file
+/***********************************************************/
/***********************************************************************/
-#endif
\ No newline at end of file
+#endif
if(namefile != ""){
nameMap = new NameAssignment(namefile);
- nameMap->readMap(1,2);
+ nameMap->readMap();
}
else{
nameMap = NULL;
};
-
-
-#endif
\ No newline at end of file
+#endif
/***********************************************************************/
-
-
-#endif
\ No newline at end of file
+#endif
}
}
-//**********************************************************************************************************************
\ No newline at end of file
+//**********************************************************************************************************************
-#endif
\ No newline at end of file
+#endif
/***********************************************************************/
-#endif
\ No newline at end of file
+#endif
}
}
-/***********************************************************************/
\ No newline at end of file
+/***********************************************************************/
/***********************************************************************/
-#endif
\ No newline at end of file
+#endif