X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimeracheckrdp.cpp;h=1840c382627f8a65ff9849919b5f95de4cf60db0;hb=257eaa172451ede9d63a0715f6cdb7336a52996b;hp=4c93c1b97c5c7edd2a583cb449cf34440be2a324;hpb=a61980e36d61937acccadc41be260165a1e389f4;p=mothur.git diff --git a/chimeracheckrdp.cpp b/chimeracheckrdp.cpp index 4c93c1b..1840c38 100644 --- a/chimeracheckrdp.cpp +++ b/chimeracheckrdp.cpp @@ -283,7 +283,7 @@ void ChimeraCheckRDP::readName(string namefile) { delete buffer; while(!iss.eof()) { - iss >> name; gobble(iss); + iss >> name; m->gobble(iss); names[name] = name; } @@ -292,10 +292,10 @@ void ChimeraCheckRDP::readName(string namefile) { #else ifstream in; - openInputFile(namefile, in); + m->openInputFile(namefile, in); while (!in.eof()) { - in >> name; gobble(in); + in >> name; m->gobble(in); names[name] = name; } in.close(); @@ -315,25 +315,26 @@ int ChimeraCheckRDP::calcKmers(map query, map subject) { try{ int common = 0; - map::iterator small; - map::iterator large; + map::iterator smallone; + map::iterator largeone; + if (query.size() < subject.size()) { - for (small = query.begin(); small != query.end(); small++) { - large = subject.find(small->first); + for (smallone = query.begin(); smallone != query.end(); smallone++) { + largeone = subject.find(smallone->first); //if you found it they have that kmer in common - if (large != subject.end()) { common++; } + if (largeone != subject.end()) { common++; } } }else { - for (small = subject.begin(); small != subject.end(); small++) { - large = query.find(small->first); + for (smallone = subject.begin(); smallone != subject.end(); smallone++) { + largeone = query.find(smallone->first); //if you found it they have that kmer in common - if (large != query.end()) { common++; } + if (largeone != query.end()) { common++; } } } @@ -431,7 +432,7 @@ void ChimeraCheckRDP::makeSVGpic(vector info) { string file = outputDir + querySeq->getName() + ".chimeracheck.svg"; ofstream outsvg; - openOutputFile(file, outsvg); + m->openOutputFile(file, outsvg); int width = (info.size()*5) + 150;