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

Fa test #286

Merged
merged 4 commits into from
Apr 6, 2024
Merged

Fa test #286

merged 4 commits into from
Apr 6, 2024

Conversation

cjw85
Copy link
Contributor

@cjw85 cjw85 commented Mar 25, 2024

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.

@cjw85
Copy link
Contributor Author

cjw85 commented Mar 25, 2024

  • added code that clean's up htslib resources.
  • added a dubious change to realign_read() to give alt one more byte. I don't know if this is correct.

@aquaskyline
Copy link
Member

Got it, testing out.

@aquaskyline
Copy link
Member

@zhengzhenxian tested the PR and found no problem. Will merge and release in v1.0.7.

@zhengzhenxian zhengzhenxian merged commit 3afa8d0 into HKU-BAL:main Apr 6, 2024
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 this pull request may close these issues.

3 participants