Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a test program for
calculate_clair3_full_alignment()
for the purposes of debugging any potential memory issues in the function.Using valgrind with the full Python entrypoint throws lots of noise that can be difficult to filter: its simpler and easier to write a standalone C program to inspect errors. The program does nothing more than read inputs and run the function. I produced sample inputs but dumping the contents of the CFFI pointer to file immediately before the function call in Python. There are some hardcoded values in the C program which I believe are universal.
I quick test shows some invalid reads triggered in the Levenshtein distance code. I haven't yet looked entirely at the cause of all of these: a few I believe are caused when the read has a deletion at the location of the variant. I could certainly reduce the number of invalid reads by adding some guards to the calling of the function.