MCPcopy Create free account
hub / github.com/BirolLab/abyss / setDeletedKey

Method setDeletedKey

Assembly/DBG.h:137–157  ·  view source on GitHub ↗

sparse_hash_set requires that set_deleted_key() * is called before calling erase(). This key cannot * be an existing kmer in m_data. This function sets * the deleted key and should be called after all * data has been loaded. */

Source from the content-addressed store, hash-verified

135 * data has been loaded.
136 */
137void setDeletedKey()
138{
139#if HAVE_GOOGLE_SPARSE_HASH_MAP
140 for (SequenceDataHash::iterator it = m_data.begin();
141 it != m_data.end(); it++) {
142 key_type rc(reverseComplement(it->first));
143 bool isrc;
144 SequenceDataHash::iterator search = find(rc, isrc);
145 // If this is false, we should have a palindrome or we're
146 // doing a SS assembly.
147 if (isrc || search == m_data.end()) {
148 m_data.set_deleted_key(rc);
149 return;
150 }
151 }
152 logger(1) << "error: unable to set deleted key.\n";
153 exit(EXIT_FAILURE);
154#else
155 return;
156#endif
157}
158
159/** Add the specified k-mer to this collection. */
160void add(const key_type& seq, unsigned coverage = 1)

Callers 3

runMethod · 0.80
runControlMethod · 0.80
assembleFunction · 0.80

Calls 4

findFunction · 0.85
reverseComplementFunction · 0.70
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected