void ThreeColumnFile::initFile(string label){
try {
if(counter != 0){
- openOutputFile(outName, outFile);
- openInputFile(inName, inFile);
+ m->openOutputFile(outName, outFile);
+ m->openInputFile(inName, inFile);
string inputBuffer;
- inputBuffer = getline(inFile);
+ inputBuffer = m->getline(inFile);
outFile << inputBuffer << '\t' << label << "\tlci\thci" << endl;
}
else{
- openOutputFile(outName, outFile);
+ m->openOutputFile(outName, outFile);
outFile << "numsampled\t" << label << "\tlci\thci" << endl;
}
outFile.setf(ios::showpoint);
}
catch(exception& e) {
- errorOut(e, "ThreeColumnFile", "initFile");
+ m->errorOut(e, "ThreeColumnFile", "initFile");
exit(1);
}
}
try {
if(counter != 0){
string inputBuffer;
- inputBuffer = getline(inFile);
+ inputBuffer = m->getline(inFile);
outFile << inputBuffer << setprecision(4) << '\t' << data[0] << '\t' << data[1] << '\t' << data[2] << endl;
}
}
}
catch(exception& e) {
- errorOut(e, "ThreeColumnFile", "output");
+ m->errorOut(e, "ThreeColumnFile", "output");
exit(1);
}
}
//checks to make sure user was able to rename and remove successfully
if ((renameOk != 0)) {
- mothurOut("Unable to rename " + outName); mothurOutEndLine();
+ m->mothurOut("Unable to rename " + outName); m->mothurOutEndLine();
perror(" : ");
}
}
catch(exception& e) {
- errorOut(e, "ThreeColumnFile", "resetFile");
+ m->errorOut(e, "ThreeColumnFile", "resetFile");
exit(1);
}
}
void ColumnFile::initFile(string label, vector<string> tags){
try {
if(counter != 0){
- openOutputFile(outName, outFile);
- openInputFile(inName, inFile);
+ m->openOutputFile(outName, outFile);
+ m->openInputFile(inName, inFile);
string inputBuffer;
- inputBuffer = getline(inFile);
+ inputBuffer = m->getline(inFile);
outFile << inputBuffer << '\t';
for(int i = 0; i < tags.size(); i++) {
outFile << endl;
}
else{
- openOutputFile(outName, outFile);
+ m->openOutputFile(outName, outFile);
for(int i = 0; i < tags.size(); i++) {
outFile << label + tags[i] << '\t';
}
outFile.setf(ios::showpoint);
}
catch(exception& e) {
- errorOut(e, "ColumnFile", "initFile");
+ m->errorOut(e, "ColumnFile", "initFile");
exit(1);
}
}
if(counter != 0){
string inputBuffer;
- inputBuffer = getline(inFile);
+ inputBuffer = m->getline(inFile);
outFile << inputBuffer << '\t' << setprecision(6) << data[0] << setprecision(iters.length());
for (int i = 1; i< data.size(); i++) {
}
catch(exception& e) {
- errorOut(e, "ColumnFile", "output");
+ m->errorOut(e, "ColumnFile", "output");
exit(1);
}
}
//checks to make sure user was able to rename and remove successfully
if ((renameOk != 0)) {
- mothurOut("Unable to rename " + outName); mothurOutEndLine();
+ m->mothurOut("Unable to rename " + outName); m->mothurOutEndLine();
perror(" : ");
}
}
catch(exception& e) {
- errorOut(e, "ColumnFile", "resetFile");
+ m->errorOut(e, "ColumnFile", "resetFile");
exit(1);
}
}
void SharedThreeColumnFile::initFile(string label){
try {
if(counter != 0){
- openOutputFile(outName, outFile);
- openInputFile(inName, inFile);
+ m->openOutputFile(outName, outFile);
+ m->openInputFile(inName, inFile);
string inputBuffer;
- inputBuffer = getline(inFile);
+ inputBuffer = m->getline(inFile);
outFile << inputBuffer << '\t' << label << "\tlci\thci" << endl;
}
else{
- openOutputFile(outName, outFile);
+ m->openOutputFile(outName, outFile);
outFile << "numsampled\t" << groupLabel << '\t' << label << "\tlci\thci" << endl;
}
outFile.setf(ios::showpoint);
}
catch(exception& e) {
- errorOut(e, "SharedThreeColumnFile", "initFile");
+ m->errorOut(e, "SharedThreeColumnFile", "initFile");
exit(1);
}
}
try {
if(counter != 0){
string inputBuffer;
- inputBuffer = getline(inFile);
+ inputBuffer = m->getline(inFile);
outFile << inputBuffer << setprecision(4) << '\t' << data[0] << '\t' << data[1] << '\t' << data[2] << endl;
}
}
}
catch(exception& e) {
- errorOut(e, "SharedThreeColumnFile", "output");
+ m->errorOut(e, "SharedThreeColumnFile", "output");
exit(1);
}
}
//checks to make sure user was able to rename and remove successfully
if ((renameOk != 0)) {
- mothurOut("Unable to rename " + outName); mothurOutEndLine();
+ m->mothurOut("Unable to rename " + outName); m->mothurOutEndLine();
perror(" : ");
}
}
catch(exception& e) {
- errorOut(e, "SharedThreeColumnFile", "resetFile");
+ m->errorOut(e, "SharedThreeColumnFile", "resetFile");
exit(1);
}
}
void OneColumnFile::initFile(string label){
try {
if(counter != 0){
- openOutputFile(outName, outFile);
- openInputFile(inName, inFile);
+ m->openOutputFile(outName, outFile);
+ m->openInputFile(inName, inFile);
string inputBuffer;
- inputBuffer = getline(inFile);
+ inputBuffer = m->getline(inFile);
outFile << inputBuffer << '\t' << label << endl;
}
else{
- openOutputFile(outName, outFile);
+ m->openOutputFile(outName, outFile);
outFile << "numsampled\t" << label << endl;
}
outFile.setf(ios::showpoint);
}
catch(exception& e) {
- errorOut(e, "OneColumnFile", "initFile");
+ m->errorOut(e, "OneColumnFile", "initFile");
exit(1);
}
}
try {
if(counter != 0){
string inputBuffer;
- inputBuffer = getline(inFile);
+ inputBuffer = m->getline(inFile);
outFile << inputBuffer << setprecision(4) << '\t' << data[0] << endl;
}
}
}
catch(exception& e) {
- errorOut(e, "OneColumnFile", "output");
+ m->errorOut(e, "OneColumnFile", "output");
exit(1);
}
}
//checks to make sure user was able to rename and remove successfully
if ((renameOk != 0)) {
- mothurOut("Unable to rename " + outName); mothurOutEndLine();
+ m->mothurOut("Unable to rename " + outName); m->mothurOutEndLine();
perror(" : ");
}
}
catch(exception& e) {
- errorOut(e, "OneColumnFile", "resetFile");
+ m->errorOut(e, "OneColumnFile", "resetFile");
exit(1);
}
}
void SharedOneColumnFile::initFile(string label){
try {
if(counter != 0){
- openOutputFile(outName, outFile);
- openInputFile(inName, inFile);
+ m->openOutputFile(outName, outFile);
+ m->openInputFile(inName, inFile);
string inputBuffer;
- inputBuffer = getline(inFile);
+ inputBuffer = m->getline(inFile);
outFile << inputBuffer << '\t' << label << endl;
}
else{
- openOutputFile(outName, outFile);
+ m->openOutputFile(outName, outFile);
outFile << "sampled\t" << label << endl;
}
outFile.setf(ios::showpoint);
}
catch(exception& e) {
- errorOut(e, "SharedOneColumnFile", "initFile");
+ m->errorOut(e, "SharedOneColumnFile", "initFile");
exit(1);
}
}
}
if(counter != 0){
string inputBuffer;
- inputBuffer = getline(inFile);
+ inputBuffer = m->getline(inFile);
outFile << inputBuffer << setprecision(2) << '\t' << dataOutput << endl;
}
}
}
catch(exception& e) {
- errorOut(e, "SharedOneColumnFile", "output");
+ m->errorOut(e, "SharedOneColumnFile", "output");
exit(1);
}
}
//checks to make sure user was able to rename and remove successfully
if ((renameOk != 0)) {
- mothurOut("Unable to rename " + outName); mothurOutEndLine();
+ m->mothurOut("Unable to rename " + outName); m->mothurOutEndLine();
perror(" : ");
}
}
catch(exception& e) {
- errorOut(e, "SharedOneColumnFile", "resetFile");
+ m->errorOut(e, "SharedOneColumnFile", "resetFile");
exit(1);
}
}