ostnam / rust-wfa

MIT License
11 stars 1 forks source link

Verify that the algorithm is valid. #1

Closed ostnam closed 2 years ago

ostnam commented 2 years ago

Randomly generate strings and penalties, then verify that the alignment matches one from an approved algorithm, taking into account that multiple alignments can (most of the time) be generated with the same score.

ostnam commented 2 years ago

I implemented a naive gap-affine alignment algorithm in src/reference.rs.

I will now write the validation module. I will first compare the two algorithms I already wrote.

After that, I guess I could try to learn about the C FFI in Rust and try to integrate the original implementattion in the validation code!

ostnam commented 2 years ago

I have written the validation module this afternoon, as well as a concurrent version of it. It initially reported differences between my wavefront alignment implementation and the reference one. This lead me to correct multiple bugs in the wavefront alignment implementation.

I have reached almost ~3400 random sequences (up to 1000 chars long) validated (same score between the 2 algos) before the process gets killed (apparently due to running out of memory?).

I think the next step should be to rewrite the 2 validation modules to take CLI parameters like the length of sequences, insertions/deletion/substitutions rate, etc.

ostnam commented 2 years ago

I finished rewriting the 2 validation binary targets into a single file that takes command-line arguments.

ostnam commented 2 years ago

I added a validation module that checks that the score can be recomputed from the alignment.