Thank you for your interest in contributing to our DNA data storage codec evaluation tool! We welcome contributions that enhance the functionality and expand the range of coding schemes (codecs). Below are the guidelines on how to contribute your own DNA codec.
- Start by forking the repository on GitHub. This creates a personal copy of the project where you can make changes.
- Create a new branch for your feature or fix. Use a descriptive name for your branch:
git checkout -b feature/my-new-codec
-
Your codec should be implemented in Python or as a Python wrapper. Please add your codec files in a separate directory under the following root directory of the project: Source/Encodings/
-
The structure of your code should include two main functions:
Encode Function
- Function Name:
encode(file_path, bool_array) - Parameters:
file_path: Path to the file or a NumPy boolean array representing binary data.bool_array: A NumPy boolean array (optional if using file_path, but preferred).
- Returns: A list of DNA strings representing the encoded sequence, where each character is from the alphabet {A, C, G, T}.
Decode Function
- Function Name:
decode(file_path, list_of_dna_strings) - Parameters:
file_path: Path to the file or a list of DNA strings.list_of_dna_strings: A list of DNA strings (optional if using file_path, but preferred).
- Returns: A NumPy boolean array reconstructing the original binary data.
- Function Name:
- When implementing file handling, please use OS-agnostic file management functions (e.g.,
os.pathfor paths andopen()for file operations) to ensure compatibility across different operating systems.
- Ensure that you write tests for your encoding and decoding functions. This helps maintain code quality and ensures that your contributions work as expected.
- Once you are satisfied with your changes, commit them with a clear message:
git add . git commit -m "Added: Added new codec named ->method name here<-"
- Push your changes to your forked repository:
git push origin feature/my-new-codec
- Navigate to the original repository and create a pull request from your branch. Provide a clear description of what you have implemented and why it should be merged.
- Please ensure that your code adheres to the project's coding standards.
- Review existing codingg schemes in the repository for reference.
- Engage with other contributors in discussions regarding your pull request.
We appreciate your contributions and look forward to seeing your innovative coding schemes!