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

Error: slice out of bounds #1

Open
beatrizvm opened this issue Sep 19, 2024 · 2 comments
Open

Error: slice out of bounds #1

beatrizvm opened this issue Sep 19, 2024 · 2 comments

Comments

@beatrizvm
Copy link

Hi,

I was trying to run KEC version 1.1 on an example database. However, the kec exclude command seems to run into an error whenever there is more than one target sequence.

Attached is the small example that failed to run.
data.zip

Here is a summary of the error:

./kec-linux-x64 e -t targets/ -n neighbors/ -o kecE.fasta
Reading NONTARGET file: "n1.fasta" took 1.75674ms
Reading TARGET file: "t2.fasta" took 1.309807ms
Reading TARGET file: "t1.fasta" took 1.240869ms
panic: runtime error: slice bounds out of range [4519:0]

goroutine 1 [running]:
github.com/berybox/KEC/pkg/maps/mmapbasic.(*MaskMap).Unmask(0xc00010cb10?, {0xc0002f79a7, 0xc}, {{0xc000015589?, 0xc00010cb10?}, 0xc000341b00?})
        c:/Users/pavel/Documents/Go-Projects/KEC/pkg/maps/mmapbasic/maskmap.go:35 +0xd4
github.com/berybox/KEC/pkg/keccore/kecoriginal.(*Excluder).Run.func2({0xc0002f79a7?, 0x1e0000c00021f688?}, {{0xc000015589?, 0x40d0c5?}, 0x5f7508?})
    ....

@berybox
Copy link
Owner

berybox commented Sep 19, 2024

I'll take a look at the problem and if I can, I'll release a fixed version. In the meantime, I recommend simply merging the "target" files into one (for example, by using: cat seq1.fasta seq2.fasta > seqall.fasta)

@beatrizvm
Copy link
Author

Thank you for the answer.

I hadn't understood that if the inclusion step is performed before the exclusion then the input consists of a single target sequence.
If that is the case, then KEC runs without any other issues.

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

No branches or pull requests

2 participants