Permalink
Browse files

Fixes bug with pre.cluster (no groups)

  • Loading branch information...
1 parent 6885538 commit bc8649852f0059d576b38792223207afe0e02844 @mothur-westcott mothur-westcott committed Jan 30, 2017
Showing with 4 additions and 2 deletions.
  1. +4 −2 source/commands/preclustercommand.cpp
@@ -790,7 +790,8 @@ int PreClusterCommand::readFASTA(){
if (it == nameMap.end()) { m->mothurOut(seq.getName() + " is not in your names file, please correct."); m->mothurOutEndLine(); exit(1); }
else{
string second = it->second;
- seqPNode tempNode(m->getNumNames(second), seq, second);
+ int numReps = m->getNumNames(second);
+ seqPNode tempNode(numReps, seq, second);
alignSeqs.push_back(tempNode);
lengths.insert(seq.getAligned().length());
}
@@ -805,10 +806,11 @@ int PreClusterCommand::readFASTA(){
}
inFasta.close();
+ length = *(lengths.begin());
+
if (lengths.size() > 1) { method = "unaligned"; }
else if (lengths.size() == 1) { method = "aligned"; filterSeqs(); }
- length = *(lengths.begin());
return alignSeqs.size();
}

0 comments on commit bc86498

Please sign in to comment.