Hello everyone, new to coding, my app (https://dnacolor.streamlit.app) encodes a DNA sequence into an RGB image. It uses a K-mer approach (default K=12) to convert chunks of the DNA sequence into a unique 24-bit color (RGB) and then arranges these colors into a visual representation.
Features
-
Generate Mode:
Upload or paste a FASTA-formatted DNA sequence and create a PNG image that encodes the sequence.
You can choose a scaling factor to enlarge the image for visualization, but decoding works best if scaling is kept at 1. -
Convert from PNG Mode:
Upload a previously generated PNG image to decode and recover the original DNA sequence.
If the image was scaled, the app uses embedded metadata to correctly downsample and decode.
How to Use
- Go to: https://dnacolor.streamlit.app
- Select Generate mode to encode a sequence into PNG:
- Paste a sequence or upload a
.fasta
/.fa
/.txt
file. - Adjust the scaling if desired (note that scaling > 1 complicates decoding).
- Click Submit to view and download the resulting PNG.
- Paste a sequence or upload a
- Select Convert from PNG mode to decode:
- Upload the encoded PNG.
- Click Decode to see and download the recovered DNA sequence.
Happy to hear feedback and comments, thank you for checking it out.