+int SRACommand::readFile(vector<string>& files){
+ try {
+
+ return 0;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SRACommand", "readFile");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+int SRACommand::parseSffFile(vector<string>& files){
+ try {
+ //run sffinfo to parse sff file into individual sampled sff files
+ string commandString = "sff=" + sfffile;
+ if (groupfile != "") { commandString += ", group=" + groupfile; }
+ else if (oligosfile != "") {
+ commandString += ", oligos=" + oligosfile;
+ //add in pdiffs, bdiffs, ldiffs, sdiffs, tdiffs
+ if (pdiffs != 0) { commandString += ", pdiffs=" + toString(pdiffs); }
+ if (bdiffs != 0) { commandString += ", bdiffs=" + toString(bdiffs); }
+ if (ldiffs != 0) { commandString += ", ldiffs=" + toString(ldiffs); }
+ if (sdiffs != 0) { commandString += ", sdiffs=" + toString(sdiffs); }
+ if (tdiffs != 0) { commandString += ", tdiffs=" + toString(tdiffs); }
+ }
+ m->mothurOutEndLine();
+ m->mothurOut("/******************************************/"); m->mothurOutEndLine();
+ m->mothurOut("Running command: sffinfo(" + commandString + ")"); m->mothurOutEndLine();
+ m->mothurCalling = true;
+
+ Command* sffinfoCommand = new SffInfoCommand(commandString);
+ sffinfoCommand->execute();
+
+ map<string, vector<string> > filenames = sffinfoCommand->getOutputFiles();
+ map<string, vector<string> >::iterator it = filenames.find("sff");
+ if (it != filenames.end()) { files = it->second; }
+ else { m->control_pressed = true; } // error in sffinfo
+
+ delete sffinfoCommand;
+ m->mothurCalling = false;
+ m->mothurOut("/******************************************/"); m->mothurOutEndLine();
+
+ return 0;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SRACommand", "readFile");
+ exit(1);
+ }
+}
+
+//**********************************************************************************************************************
+int SRACommand::parseFastqFile(vector<string>& files){
+ try {
+
+ //run sffinfo to parse sff file into individual sampled sff files
+ string commandString = "fastq=" + fastqfile;
+ if (groupfile != "") { commandString += ", group=" + groupfile; }
+ else if (oligosfile != "") {
+ commandString += ", oligos=" + oligosfile;
+ //add in pdiffs, bdiffs, ldiffs, sdiffs, tdiffs
+ if (pdiffs != 0) { commandString += ", pdiffs=" + toString(pdiffs); }
+ if (bdiffs != 0) { commandString += ", bdiffs=" + toString(bdiffs); }
+ if (ldiffs != 0) { commandString += ", ldiffs=" + toString(ldiffs); }
+ if (sdiffs != 0) { commandString += ", sdiffs=" + toString(sdiffs); }
+ if (tdiffs != 0) { commandString += ", tdiffs=" + toString(tdiffs); }
+ }
+ m->mothurOutEndLine();
+ m->mothurOut("/******************************************/"); m->mothurOutEndLine();
+ m->mothurOut("Running command: fastq.info(" + commandString + ")"); m->mothurOutEndLine();
+ m->mothurCalling = true;
+
+ Command* fastqinfoCommand = new ParseFastaQCommand(commandString);
+ fastqinfoCommand->execute();
+
+ map<string, vector<string> > filenames = fastqinfoCommand->getOutputFiles();
+ map<string, vector<string> >::iterator it = filenames.find("fastq");
+ if (it != filenames.end()) { files = it->second; }
+ else { m->control_pressed = true; } // error in sffinfo
+
+ delete fastqinfoCommand;
+ m->mothurCalling = false;
+ m->mothurOut("/******************************************/"); m->mothurOutEndLine();
+
+ return 0;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SRACommand", "readFile");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************