Java
Java copied to clipboard
Add Nussinov Algorithm for RNA Secondary Structure Prediction
Description: This pull request introduces the implementation of the Nussinov algorithm, which predicts the secondary structure of RNA by maximizing base-pair compatibility. The algorithm uses dynamic programming to compute an optimal structure based on RNA sequence input.
Changes:
-
Added
Nussinovclass: Implements the Nussinov algorithm with methods for:- Checking base-pair compatibility.
- Constructing the dynamic programming matrix to predict secondary structures.
- Reconstructing the optimal folding structure from the computed matrix.
- Evaluating the accuracy of predictions based on paired bases.
-
Test file:
estRNAFolding- Tests base-pair compatibility with various pairs.
- Verifies correct secondary structure prediction for short RNA sequences.
Files Added:
-
Nussinov.java: Contains the main algorithm. -
TestRNAFolding.java: Includes unit tests to verify functionality and accuracy.
Additional Notes:
- The implementation follows standard dynamic programming principles and is optimized for clarity.
- Future improvements could involve more complex test cases and compatibility with additional nucleotide pairs.
Testing:
All tests included in TestRNAFolding have been successfully run, covering both base-pair compatibility and basic structure prediction. A library it needed, link on the Nussinov.java file.
This addition should be a valuable resource for bioinformatics and computational biology algorithms in the repository.