@@ -95,7 +95,6 @@ vector<Pair*> Cluster::clusterByUMI(int umiDiffThreshold, Stats* preStats, Stats
95
95
// if(mPairs.size()>0 || subClusters.size()>0)
96
96
// cerr << "UMI " << topUMI<< " " << topCount << "/" << c->mPairs.size() << endl;
97
97
subClusters.push_back (c);
98
- preStats->addMolecule (c->mPairs .size (), isPE);
99
98
umiCount[topUMI] = 0 ;
100
99
}
101
100
@@ -133,6 +132,7 @@ vector<Pair*> Cluster::clusterByUMI(int umiDiffThreshold, Stats* preStats, Stats
133
132
// merge p2 to p1
134
133
int diff = duplexMerge (p1, p2);
135
134
// cerr << " diff " << diff << endl;
135
+ preStats->addMolecule (p1->mMergeReads + p2->mMergeReads , p1->mLeft && p1->mRight );
136
136
if (diff <= mOptions ->duplexMismatchThreshold ) {
137
137
if (p1->mMergeReads + p2->mMergeReads >= mOptions ->clusterSizeReq ) {
138
138
duplexConsensusCount++;
@@ -154,6 +154,7 @@ vector<Pair*> Cluster::clusterByUMI(int umiDiffThreshold, Stats* preStats, Stats
154
154
}
155
155
// no duplex found, treat it as sscs
156
156
if (!foundDuplex) {
157
+ preStats->addMolecule (p1->mMergeReads , p1->mLeft && p1->mRight );
157
158
if (!mOptions ->duplexOnly && p1->mMergeReads >= mOptions ->clusterSizeReq ) {
158
159
singleConsesusCount++;
159
160
p1->writeSscsDcsTag ();
@@ -168,6 +169,7 @@ vector<Pair*> Cluster::clusterByUMI(int umiDiffThreshold, Stats* preStats, Stats
168
169
// no umi, no duplex
169
170
for (int i=0 ;i<singleConsensusPairs.size (); i++) {
170
171
Pair* p = singleConsensusPairs[i];
172
+ preStats->addMolecule (p->mMergeReads , p->mLeft && p->mRight );
171
173
if (!mOptions ->duplexOnly && p->mMergeReads >= mOptions ->clusterSizeReq ) {
172
174
singleConsesusCount++;
173
175
p->writeSscsDcsTag ();
0 commit comments