mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-11-09 17:24:41 +00:00
Feature: Implement constrained k-mer generation and clique search
This commit introduces core functionality for oligonucleotide family tagging, constrained k-mer generation, and clique finding. It also includes updates to the Go language version and refactors the logic for k-mer dissimilarity metrics.
This commit is contained in:
1 parent
f76e7f03c6
commit
3087c70daa
17 files changed
+1791
-13
No files matched your search
@@ -26,3 +26,16 @@ func SameIUPACNuc(a, b byte) bool {
|
||||
}
|
||||
return a == b
|
||||
}
|
||||
|
||||
// IUPACNucMask returns the set of nucleotides denoted by the IUPAC code b
|
||||
// (case insensitive, U is read as T) as a 4 bits mask: bit 0 is A, bit 1 is C,
|
||||
// bit 2 is G and bit 3 is T. It returns 0 if b is not an IUPAC nucleotide code.
|
||||
func IUPACNucMask(b byte) byte {
|
||||
if (b >= 'A') && (b <= 'Z') {
|
||||
b |= 32
|
||||
}
|
||||
if (b < 'a') || (b > 'z') {
|
||||
return 0
|
||||
}
|
||||
return _iupac[b-'a']
|
||||
}
|
||||
Reference in new issue
Block a user