37AD4DBB0F28E2FE00AA2D49 /* tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37AD4DBA0F28E2FE00AA2D49 /* tree.cpp */; };
37AD4DCA0F28F3DD00AA2D49 /* readtree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37AD4DC90F28F3DD00AA2D49 /* readtree.cpp */; };
37AFC71F0F445386005F492D /* sharedsobscollectsummary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37AFC71E0F445386005F492D /* sharedsobscollectsummary.cpp */; };
- 37AFC7A30F44703E005F492D /* readsharedcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37AFC7A20F44703E005F492D /* readsharedcommand.cpp */; };
37B28F680F27590100808A62 /* deconvolutecommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37B28F670F27590100808A62 /* deconvolutecommand.cpp */; };
37D928550F21331F001D4494 /* ace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37D927B80F21331F001D4494 /* ace.cpp */; };
37D928560F21331F001D4494 /* averagelinkage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37D927BA0F21331F001D4494 /* averagelinkage.cpp */; };
37AD4DC90F28F3DD00AA2D49 /* readtree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readtree.cpp; sourceTree = "<group>"; };
37AFC71D0F445386005F492D /* sharedsobscollectsummary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sharedsobscollectsummary.h; sourceTree = "<group>"; };
37AFC71E0F445386005F492D /* sharedsobscollectsummary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sharedsobscollectsummary.cpp; sourceTree = "<group>"; };
- 37AFC7A10F44703E005F492D /* readsharedcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readsharedcommand.h; sourceTree = "<group>"; };
- 37AFC7A20F44703E005F492D /* readsharedcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readsharedcommand.cpp; sourceTree = "<group>"; };
37B28F660F27590100808A62 /* deconvolutecommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deconvolutecommand.h; sourceTree = "<group>"; };
37B28F670F27590100808A62 /* deconvolutecommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = deconvolutecommand.cpp; sourceTree = "<group>"; };
37D927B80F21331F001D4494 /* ace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ace.cpp; sourceTree = "<group>"; };
372E12950F263D5A0095CF7E /* readdistcommand.cpp */,
372E126E0F26365B0095CF7E /* readotucommand.h */,
372E126F0F26365B0095CF7E /* readotucommand.cpp */,
- 37AFC7A10F44703E005F492D /* readsharedcommand.h */,
- 37AFC7A20F44703E005F492D /* readsharedcommand.cpp */,
37E5F4900F2A3DA800F8D827 /* readtreecommand.h */,
37E5F4910F2A3DA800F8D827 /* readtreecommand.cpp */,
37D928270F21331F001D4494 /* sharedcommand.h */,
374610830F40652400460C57 /* unweighted.cpp in Sources */,
3746109D0F40657600460C57 /* unifracunweightedcommand.cpp in Sources */,
37AFC71F0F445386005F492D /* sharedsobscollectsummary.cpp in Sources */,
- 37AFC7A30F44703E005F492D /* readsharedcommand.cpp in Sources */,
A70B53AA0F4CD7AD0064797E /* getgroupcommand.cpp in Sources */,
A70B53AB0F4CD7AD0064797E /* getlabelcommand.cpp in Sources */,
A70B53AC0F4CD7AD0064797E /* getlinecommand.cpp in Sources */,
format = globaldata->getFormat();
validCalculator = new ValidCalculators();
- //set users groups
- setGroups();
-
int i;
for (i=0; i<globaldata->Estimators.size(); i++) {
if (validCalculator->isValidCalculator("shared", globaldata->Estimators[i]) == true) {
order = SharedList->getSharedOrderVector();
}
set<string> orderList;
+
+ //set users groups
+ setGroups();
while(order != NULL){
orderList.insert(order->getLabel());
#include "command.hpp"
#include "readdistcommand.h"
#include "readtreecommand.h"
-#include "readsharedcommand.h"
#include "readotucommand.h"
#include "clustercommand.h"
#include "parselistcommand.h"
if(commandName == "read.dist") { command = new ReadDistCommand(); }
else if(commandName == "read.otu") { command = new ReadOtuCommand(); }
else if(commandName == "read.tree") { command = new ReadTreeCommand(); }
- else if(commandName == "read.shared") { command = new ReadSharedCommand(); }
else if(commandName == "cluster") { command = new ClusterCommand(); }
else if(commandName == "deconvolute") { command = new DeconvoluteCommand(); }
else if(commandName == "parsimony") { command = new ParsimonyCommand(); }
//you want to do shared commands
if ((listfile != "") && (groupfile != "")) {
validateParseFiles(); //checks the listfile and groupfile parameters
- }else { //you want to do single commands
+ }else if (listfile != "") { //you want to do single commands
validateReadFiles();
validateReadPhil();
+ }else {//you are reading a shared file
+ validateReadFiles();
}
- }else if (commandName == "read.shared") {
- //you want to do shared commands with just the shared file
- validateReadFiles();
}else if (commandName == "read.tree") {
validateTreeFiles(); //checks the treefile and groupfile parameters
}else if (commandName == "deconvolute") {
reset();
//clears out data from previous read
- if ((commandName == "read.dist") || (commandName == "read.otu") || (commandName == "read.tree") || (commandName == "read.shared")) {
+ if ((commandName == "read.dist") || (commandName == "read.otu") || (commandName == "read.tree")) {
clear();
gGroupmap = NULL;
gTree.clear();
cout << "The list, rabund or sabund parameter is required, but you may only use one of them." << "\n";
cout << "The line and label parameters are optional but you may not use both the line and label parameters at the same time." << "\n";
cout << "The label and line parameters are used to read specific lines in your input." << "\n";
- cout << "The second way to use the read.otu command is to read a list and a group so you can use the collect.shared, rarefaction.shared or summary.shared commands." << "\n";
- cout << "In this case the read.otu command should be in the following format: read.otu(list=yourListFile, group=yourGroupFile, line=yourLines). " << "\n";
- cout << "The list parameter and group paramaters are required. When using the command the second way read.otu command parses the .list file" << "\n";
+ cout << "The second way to use the read.otu command is to read a list and a group, or a shared so you can use the collect.shared, rarefaction.shared or summary.shared commands." << "\n";
+ cout << "In this case the read.otu command should be in the following format: read.otu(list=yourListFile, group=yourGroupFile, line=yourLines) or read.otu(shared=yourSharedFile). " << "\n";
+ cout << "The list parameter and group paramaters or the shared paremeter is required. When using the command the second way with a list and group file read.otu command parses the .list file" << "\n";
cout << "and separates it into groups. It outputs a .shared file containing the OTU information for each group. The read.otu command also outputs a .list file for each group. " << "\n";
cout << "Note: No spaces between parameter labels (i.e. list), '=' and parameters (i.e.yourListfile)." << "\n" << "\n";
}else if (globaldata->helpRequest == "read.tree") {
cout << "The read.tree command should be in the following format: read.tree(tree=yourTreeFile, group=yourGroupFile)." << "\n";
cout << "The tree and group parameters are both required." << "\n";
cout << "Note: No spaces between parameter labels (i.e. tree), '=' and parameters (i.e.yourTreefile)." << "\n" << "\n";
- }else if (globaldata->helpRequest == "read.shared") {
- cout << "The read.shared must be run before you execute a collect.shared, rarefaction.shared or summary.shared command." << "\n";
- cout << "The read.shared command is used to read a shared file. The read.shared should be entered in the following format:" << "\n";
- cout << "read.shared(shared=yourSharedFile). The shared parameter is required." << "\n";
- cout << "Note: No spaces between parameter labels (i.e. shared), '=' and parameters (i.e.yourSharedfile)." << "\n" << "\n";
}else if (globaldata->helpRequest == "cluster") {
cout << "The cluster command can only be executed after a successful read.dist command." << "\n";
cout << "The cluster command parameter options are method, cuttoff and precision. No parameters are required." << "\n";
fileNameRoot = getRootName(globaldata->inputFileName);
format = globaldata->getFormat();
validCalculator = new ValidCalculators();
-
- setGroups();
int i;
for (i=0; i<globaldata->Estimators.size(); i++) {
order = SharedList->getSharedOrderVector();
}
+ //set users groups
+ setGroups();
+
while(order != NULL){
if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(order->getLabel()) == 1){
+++ /dev/null
-/*
- * readsharedcommand.cpp
- * Mothur
- *
- * Created by Sarah Westcott on 2/12/09.
- * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
- *
- */
-
-#include "readsharedcommand.h"
-
-//**********************************************************************************************************************
-ReadSharedCommand::ReadSharedCommand(){
- try {
- globaldata = GlobalData::getInstance();
- filename = globaldata->inputFileName;
- read = new ReadPhilFile(filename);
- }
- catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the ReadSharedCommand class Function ReadSharedCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
- catch(...) {
- cout << "An unknown error has occurred in the ReadSharedCommand class function ReadSharedCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
-}
-
-//**********************************************************************************************************************
-
-ReadSharedCommand::~ReadSharedCommand(){
- delete read;
-}
-
-//**********************************************************************************************************************
-
-int ReadSharedCommand::execute(){
- try {
- read->read(&*globaldata);
-
- return 0;
- }
- catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the ReadSharedCommand class Function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
- catch(...) {
- cout << "An unknown error has occurred in the ReadSharedCommand class function execute. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
-}
-//**********************************************************************************************************************
\ No newline at end of file
+++ /dev/null
-#ifndef READSHAREDCOMMAND_H
-#define READSHAREDCOMMAND_H
-/*
- * readsharedcommand.h
- * Mothur
- *
- * Created by Sarah Westcott on 2/12/09.
- * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
- *
- */
-
-#include "command.hpp"
-#include "readmatrix.hpp"
-#include "inputdata.h"
-
-/* The read.shared must be run before you execute a collect.shared, rarefaction.shared or summary.shared command.
-The read.shared command is used to read a shared file. The read.shared should be entered in the following format:
-read.shared(shared=yourSharedFile). The shared parameter is required. */
-
-class GlobalData;
-
-class ReadSharedCommand : public Command {
-public:
- ReadSharedCommand();
- ~ReadSharedCommand();
- int execute();
-
-private:
- GlobalData* globaldata;
- ReadMatrix* read;
- InputData* input;
- string filename;
-};
-
-#endif
-
-
-
-
format = globaldata->getFormat();
validCalculator = new ValidCalculators();
- //set users groups
- setGroups();
-
int i;
for (i=0; i<globaldata->Estimators.size(); i++) {
if (validCalculator->isValidCalculator("sharedsummary", globaldata->Estimators[i]) == true) {
outputFileHandle << '\t' << sumCalculators[i]->getName();
}
outputFileHandle << endl;
+
+ //set users groups
+ setGroups();
while(order != NULL){
commands["read.dist"] = "read.dist";
commands["read.otu"] = "read.otu";
commands["read.tree"] = "read.tree";
- commands["read.shared"] = "read.shared";
commands["cluster"] = "cluster";
commands["deconvolute"] = "deconvolute";
commands["parsimony"] = "parsimony";