+
+ //compare fasta, name, qual and taxonomy if given to make sure they contain the same seqs
+ if (fastafile != "") {
+ if (namefile != "") { //compare with fasta
+ if (sanity["fasta"] != sanity["name"]) { //create mismatch file
+ createMisMatchFile(out, fastafile, namefile, sanity["fasta"], sanity["name"]);
+ }
+ }
+ if (qualfile != "") {
+ if (sanity["fasta"] != sanity["qual"]) { //create mismatch file
+ createMisMatchFile(out, fastafile, qualfile, sanity["fasta"], sanity["qual"]);
+ }
+ }
+ if (taxfile != "") {
+ if (sanity["fasta"] != sanity["tax"]) { //create mismatch file
+ createMisMatchFile(out, fastafile, taxfile, sanity["fasta"], sanity["tax"]);
+ }
+ }
+ }
+
+ //compare dupnames, groups and list if given to make sure they match
+ if (namefile != "") {
+ if (groupfile != "") {
+ if (sanity["dupname"] != sanity["group"]) { //create mismatch file
+ createMisMatchFile(out, namefile, groupfile, sanity["dupname"], sanity["group"]);
+ }
+ }
+ if (listfile != "") {
+ if (sanity["dupname"] != sanity["list"]) { //create mismatch file
+ createMisMatchFile(out, namefile, listfile, sanity["dupname"], sanity["list"]);
+ }
+ }
+ }else{
+
+ if ((groupfile != "") && (fastafile != "")) {
+ if (sanity["fasta"] != sanity["group"]) { //create mismatch file
+ createMisMatchFile(out, fastafile, groupfile, sanity["fasta"], sanity["group"]);
+ }
+ }
+ }
+
+ out.close();
+
+ if (m->isBlank(filename)) { m->mothurRemove(filename); }
+ else { m->mothurOut("\n[DEBUG]: " + filename + " contains the file mismatches.\n");outputNames.push_back(filename); outputTypes["debug"].push_back(filename); }
+
+ return 0;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "GetSeqsCommand", "runSanityCheck");
+ exit(1);