mirror of
https://github.com/lh3/minimap2.git
synced 2026-09-15 13:07:55 +08:00
added reverse complement
This commit is contained in:
@@ -101,4 +101,16 @@ static inline mm_reg1_t *mm_map_aux(const mm_idx_t *mi, const char *seq1, const
|
||||
}
|
||||
}
|
||||
|
||||
static inline uint8_t *mappy_revcomp(int len, uint8_t *seq)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < len>>1; ++i) {
|
||||
uint8_t t = seq_comp_table[seq[i]];
|
||||
seq[i] = seq_comp_table[seq[len - 1 - i]];
|
||||
seq[len - 1 - i] = t;
|
||||
}
|
||||
if (len&1) seq[len>>1] = seq_comp_table[seq[len>>1]];
|
||||
return seq;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user