MCPcopy Create free account
hub / github.com/arq5x/bedtools2 / GetAntiMode

Method GetAntiMode

src/utils/VectorOps/VectorOps.cpp:194–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192
193
194string VectorOps::GetAntiMode(void)
195{
196 string antimode;
197 int min_count = INT_MAX;
198 int curr_count = 0;
199
200 sort(_vecs.begin(), _vecs.end());
201
202 string prev = "";
203 vector<string>::const_iterator it = _vecs.begin();
204 while (it != _vecs.end())
205 {
206 if (*it != prev && prev != "")
207 {
208 if (curr_count < min_count)
209 {
210 min_count = curr_count;
211 antimode = prev;
212 }
213 curr_count = 1;
214 }
215 else { curr_count++; }
216 prev = *it;
217 ++it;
218 }
219 if (curr_count < min_count)
220 antimode = prev;
221 return antimode;
222}
223
224uint32_t VectorOps::GetCount(void)
225{

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected