*/
#include "chimeracheckcommand.h"
-#include "chimeracheckrdp.h"
//***************************************************************************************************************
OptionParser parser(option);
map<string,string> parameters = parser.getParameters();
- ValidParameters validParameter;
+ ValidParameters validParameter("chimera.check");
map<string,string>::iterator it;
//check to make sure all parameters are valid for command
if (pid == 0) {
#endif
- ableToOpen = openInputFile(fastaFileNames[i], in);
+ ableToOpen = openInputFile(fastaFileNames[i], in, "noerror");
+
+ //if you can't open it, try default location
+ if (ableToOpen == 1) {
+ if (m->getDefaultPath() != "") { //default path is set
+ string tryPath = m->getDefaultPath() + getSimpleName(fastaFileNames[i]);
+ m->mothurOut("Unable to open " + fastaFileNames[i] + ". Trying default " + tryPath); m->mothurOutEndLine();
+ ableToOpen = openInputFile(tryPath, in, "noerror");
+ fastaFileNames[i] = tryPath;
+ }
+ }
in.close();
#ifdef USE_MPI
#endif
if (ableToOpen == 1) {
- m->mothurOut(fastaFileNames[i] + " will be disregarded."); m->mothurOutEndLine();
+ m->mothurOut("Unable to open " + fastaFileNames[i] +". It will be disregarded."); m->mothurOutEndLine();
//erase from file list
fastaFileNames.erase(fastaFileNames.begin()+i);
i--;
if (pid == 0) {
#endif
- ableToOpen = openInputFile(nameFileNames[i], in);
+ ableToOpen = openInputFile(nameFileNames[i], in, "noerror");
+
+ //if you can't open it, try default location
+ if (ableToOpen == 1) {
+ if (m->getDefaultPath() != "") { //default path is set
+ string tryPath = m->getDefaultPath() + getSimpleName(nameFileNames[i]);
+ m->mothurOut("Unable to open " + nameFileNames[i] + ". Trying default " + tryPath); m->mothurOutEndLine();
+ ableToOpen = openInputFile(tryPath, in, "noerror");
+ nameFileNames[i] = tryPath;
+ }
+ }
in.close();
#ifdef USE_MPI
#endif
if (ableToOpen == 1) {
- m->mothurOut(nameFileNames[i] + " will be disregarded."); m->mothurOutEndLine();
+ m->mothurOut("Unable to open " + nameFileNames[i] + ". It will be disregarded."); m->mothurOutEndLine();
//erase from file list
nameFileNames.erase(nameFileNames.begin()+i);
i--;
int pid, end, numSeqsPerProcessor;
int tag = 2001;
- vector<long> MPIPos;
+ vector<unsigned long int> MPIPos;
MPI_Status status;
MPI_Comm_rank(MPI_COMM_WORLD, &pid); //find out who we are
}
//**********************************************************************************************************************
#ifdef USE_MPI
-int ChimeraCheckCommand::driverMPI(int start, int num, MPI_File& inMPI, MPI_File& outMPI, vector<long>& MPIPos){
+int ChimeraCheckCommand::driverMPI(int start, int num, MPI_File& inMPI, MPI_File& outMPI, vector<unsigned long int>& MPIPos){
try {
MPI_File outAccMPI;
MPI_Status status;