Permalink
Browse files

Removes alphasort in precluster

  • Loading branch information...
1 parent b029499 commit 2cd73cbd1baa4f599e0e069443bf0ea5fe244d4a @mothur-westcott mothur-westcott committed Sep 22, 2016
Showing with 4 additions and 8 deletions.
  1. +4 −0 source/commands/preclustercommand.cpp
  2. +0 −8 source/commands/preclustercommand.h
@@ -800,6 +800,8 @@ int PreClusterCommand::readFASTA(){
length = *(lengths.begin());
+ random_shuffle(alignSeqs.begin(), alignSeqs.end());
+
return alignSeqs.size();
}
@@ -862,6 +864,8 @@ int PreClusterCommand::loadSeqs(map<string, string>& thisName, vector<Sequence>&
if (error) { m->control_pressed = true; }
thisSeqs.clear();
+
+ random_shuffle(alignSeqs.begin(), alignSeqs.end());
return alignSeqs.size();
}
@@ -37,17 +37,11 @@ struct seqPNode {
/************************************************************/
inline bool comparePriorityTopDown(seqPNode first, seqPNode second) {
if (first.numIdentical > second.numIdentical) { return true; }
- else if (first.numIdentical == second.numIdentical) {
- if (first.seq.getName() > second.seq.getName()) { return true; }
- }
return false;
}
/************************************************************/
inline bool comparePriorityDownTop(seqPNode first, seqPNode second) {
if (first.numIdentical < second.numIdentical) { return true; }
- else if (first.numIdentical == second.numIdentical) {
- if (first.seq.getName() > second.seq.getName()) { return true; }
- }
return false;
}
//************************************************************/
@@ -86,12 +80,10 @@ class PreClusterCommand : public Command {
map<string, string> names; //represents the names file first column maps to second column
map<string, int> sizes; //this map a seq name to the number of identical seqs in the names file
map<string, int>::iterator itSize;
-// map<string, bool> active; //maps sequence name to whether it has already been merged or not.
vector<string> outputNames;
int readFASTA();
void readNameFile();
- //int readNamesFASTA();
int calcMisMatches(string, string);
void printData(string, string, string); //fasta filename, names file name
int process(string);

0 comments on commit 2cd73cb

Please sign in to comment.