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

Function checkSeqContiguity

Assembly/AssemblyAlgorithms.h:79–109  ·  view source on GitHub ↗

Return the adjacency of this sequence. * @param considerMarks when true, treat a marked vertex as having * no edges */

Source from the content-addressed store, hash-verified

77 * no edges
78 */
79static inline
80SeqContiguity checkSeqContiguity(
81 const SequenceCollectionHash::value_type& seq,
82 extDirection& outDir, bool considerMarks = false)
83{
84 assert(!seq.second.deleted());
85 bool child = seq.second.hasExtension(SENSE)
86 && !(considerMarks && seq.second.marked(SENSE));
87 bool parent = seq.second.hasExtension(ANTISENSE)
88 && !(considerMarks && seq.second.marked(ANTISENSE));
89 if(!child && !parent)
90 {
91 //this sequence is completely isolated
92 return SC_ISLAND;
93 }
94 else if(!child)
95 {
96 outDir = ANTISENSE;
97 return SC_ENDPOINT;
98 }
99 else if(!parent)
100 {
101 outDir = SENSE;
102 return SC_ENDPOINT;
103 }
104 else
105 {
106 // sequence is contiguous
107 return SC_CONTIGUOUS;
108 }
109}
110
111/** Remove all marked k-mer.
112 * @return the number of removed k-mer

Callers 5

performNetworkTrimMethod · 0.85
erodeFunction · 0.85
assembleFunction · 0.85
trimSequencesFunction · 0.85

Calls 3

deletedMethod · 0.80
markedMethod · 0.80
hasExtensionMethod · 0.45

Tested by

no test coverage detected