Return the adjacency of this sequence. * @param considerMarks when true, treat a marked vertex as having * no edges */
| 77 | * no edges |
| 78 | */ |
| 79 | static inline |
| 80 | SeqContiguity 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 |
no test coverage detected