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

Runtime error index out of range for Lexicmap search #9

Open
andhamel opened this issue Oct 30, 2024 · 5 comments
Open

Runtime error index out of range for Lexicmap search #9

andhamel opened this issue Oct 30, 2024 · 5 comments

Comments

@andhamel
Copy link

Hi all,

I was running lexicmap search with the parameters recommended in the tutorial, and for one fasta I received this error message

Panic: runtime error index of out range [X] with length X

where X is the length of my aligned length with my query. I think this is due to the gap size as when I lowered - -align-min-gap the software ran successfully. Has this been encountered before? Also, this error only happens when I have the -a option, which leads me to think it has to do with writing the output potentially for the cigar string.

@shenwei356
Copy link
Owner

Hi, thanks for reporting this. Please paste the whole error information, which show the line number of the code which panic. Or please provide the query sequence and index information.

@andhamel
Copy link
Author

Here is the full error message:

panic: runtime error: index out of range [237] with length 237

goroutine 10872 [running]:
github.com/shenwei356/wfa.(*AlignmentResult).AlignmentText(0xc0439c9e00, 0xc03399ee00, 0xc03399ede8)
	/home/shenwei/go/pkg/mod/github.com/shenwei356/wfa@v0.3.0/wfa_cigar.go:240 +0x3ff
github.com/shenwei356/LexicMap/lexicmap/cmd.(*Index).Search.func7(0xc00e2c1c20)
	/home/shenwei/go/src/github.com/shenwei356/LexicMap/lexicmap/cmd/lib-index-search.go:1731 +0x28dd
created by github.com/shenwei356/LexicMap/lexicmap/cmd.(*Index).Search in goroutine 9602
	/home/shenwei/go/src/github.com/shenwei356/LexicMap/lexicmap/cmd/lib-index-search.go:1182 +0xdec

I hope this helps! Thank you for the response.

@shenwei356
Copy link
Owner

Emm, it's not sufficient for debug. It would help if you provide the query seq and a few target seqs/genomes (you said it works without -a). You can send them via email ( shenwei356@gmail.com ) if you want to keep them private. I'll try to fix them tomorrow.

shenwei356 added a commit that referenced this issue Oct 31, 2024
@shenwei356
Copy link
Owner

shenwei356 commented Oct 31, 2024

According to the sequences provided by @andhamel , I confirm it's a bug in the alignment output steps, which happens for queries with highly repetitive sequences in flanking regions.

It's fixed now, please test it: #10 (comment)

@shenwei356
Copy link
Owner

Today, I used another way to fix this. Please try it: #10 (comment)

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