Files
obitools4/cmd/test/main.go

36 lines
754 B
Go
Raw Normal View History

2022-01-13 23:27:39 +01:00
package main
import (
2024-09-24 16:36:59 +02:00
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obifp"
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obikmer"
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
2022-01-13 23:27:39 +01:00
log "github.com/sirupsen/logrus"
)
2022-01-13 23:27:39 +01:00
func main() {
2024-09-24 16:36:59 +02:00
one := obifp.OneUint[obifp.Uint128]()
a, b := obifp.OneUint[obifp.Uint64]().LeftShift64(66, 0)
log.Infof("one: %v, %v", a, b)
shift := one.LeftShift(66)
log.Infof("one: %v", shift)
2023-02-01 08:14:29 +01:00
2024-09-24 16:36:59 +02:00
seq := obiseq.NewBioSequence("test", []byte("atcgggttccaacc"), "")
2023-02-01 08:14:29 +01:00
2024-09-24 16:36:59 +02:00
kmermap := obikmer.NewKmerMap[obifp.Uint128](
obiseq.BioSequenceSlice{
seq,
},
7,
true,
)
2022-03-07 16:37:21 +01:00
2024-09-24 16:36:59 +02:00
kmers := kmermap.NormalizedKmerSlice(seq, nil)
2022-03-07 16:37:21 +01:00
2024-09-24 16:36:59 +02:00
for _, kmer := range kmers {
println(kmermap.KmerAsString(kmer))
}
2022-03-07 16:37:21 +01:00
2022-01-13 23:27:39 +01:00
}