Closed smarco closed 2 years ago
Unfortunately that API does not exist right now. The C API only includes core features right now. Do you need this feature?
I would not say strictly "need", but I would like to benchmark your awesome library (speed/accuracy) using a Match/Mismatch penalty model.
This feature exists on the Rust side. I can probably easily expose some sort of API for match/mismatch penalties.
Added a basic interface for this for now: https://github.com/Daniel-Liu-c0deb0t/block-aligner/blob/main/src/ffi.rs#L32
Note that match scores must be positive and mismatch scores must be negative.
Awesome, thanks. Now, I need to solve how to properly use it. From the C interface perspective, AAMatrix is an incomplete type. For example:
AAMatrix m_matrix = block_new_simple_aamatrix(1,-4);
Gives a error: storage size of ‘m_matrix’ isn’t known
How can I resolve this without hacking into your lib?
Thank you very much,
Ah the binding generator library was not correctly generating the full struct declaration. I worked around this by allocating the struct on the heap. The same function can be used to create a pointer to an AAMatrix
, but it needs to be freed later: https://github.com/Daniel-Liu-c0deb0t/block-aligner/blob/main/src/ffi.rs#L32
Sorry for the delay in answering. I got to test it properly today and it works flawlessly. Thank you very much.
Hi,
I was wondering if it is possible to define a custom AAMatrix from C API?
Thanks,