Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpacedKmer bug for 2bit sequences #34

Open
cjprybol opened this issue Aug 18, 2023 · 0 comments · May be fixed by #35
Open

SpacedKmer bug for 2bit sequences #34

cjprybol opened this issue Aug 18, 2023 · 0 comments · May be fixed by #35

Comments

@cjprybol
Copy link
Contributor

# generate random 4bit sequence
randseq_4bit = BioSequences.randdnaseq(300)
@assert typeof(randseq_4bit) == BioSequences.LongDNA{4}

# convert sequence to 2bit
randseq_2bit = BioSequences.LongDNA{2}(randseq_4bit)
@assert typeof(randseq_2bit) == BioSequences.LongDNA{2}

@assert randseq_2bit == randseq_4bit

# compare taking every 3rd every-mer against spaced kmers of stride 3
# returns true
collect(Kmers.EveryKmer{Kmers.DNACodon}(randseq_4bit))[1:3:end] == collect(Kmers.SpacedKmers{Kmers.DNACodon}(randseq_4bit, 3))

# returns false
collect(Kmers.EveryKmer{Kmers.DNACodon}(randseq_2bit))[1:3:end] == collect(Kmers.SpacedKmers{Kmers.DNACodon}(randseq_2bit, 3))
@jakobnissen jakobnissen linked a pull request Dec 30, 2023 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant