HKU-BAL / Clair3

Clair3 - Symphonizing pileup and full-alignment for high-performance long-read variant calling
246 stars 27 forks source link

Fa test #286

Closed cjw85 closed 7 months ago

cjw85 commented 8 months ago

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 commented 8 months ago
aquaskyline commented 7 months ago

Got it, testing out.

aquaskyline commented 7 months ago

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