A library to encode text as DNA and decode DNA to text.
Project description
GeneSpeak
A library to encode text as DNA and decode DNA to text.
GeneSpeak allows you to encode regular text as DNA using base-pairs (A, T, G, C) and convert back to text. The coding scheme could be any combination of A, T, G, C.
Example
import genespeak as gp
print(f'{gp.__name__} version: {gp.__version__}')
schema = "ATCG"
text = "Hello World!"
dna = gp.text_to_dna(text, schema=schema)
print(f'Text: {text}\nEncoded DNA: {dna}\n')
text_from_dna = gp.dna_to_text(dna, schema=schema)
print(f'Text: {text}\nEncoded DNA: {dna}\nDecoded Text: {text_from_dna}\n')
Output
genespeak version: 0.0.3
Text: Hello World!
Encoded DNA: TACATCTTTCGATCGATCGGACAATTTGTCGGTGACTCGATCTAACAT
Text: Hello World!
Encoded DNA: TACATCTTTCGATCGATCGGACAATTTGTCGGTGACTCGATCTAACAT
Decoded Text: Hello World!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
genespeak-0.0.4.tar.gz
(8.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genespeak-0.0.4.tar.gz.
File metadata
- Download URL: genespeak-0.0.4.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2caa7c16863a94baa4ec6f444baa3e2b6052b36a1602314c22d8d79fbb69446
|
|
| MD5 |
dc32e4269e9e74fe95207fc213af3fed
|
|
| BLAKE2b-256 |
b9be4026de3fb0c59cb47256bab6924a493d67ba0cb4bc0c927a625eeb17d832
|
File details
Details for the file genespeak-0.0.4-py3-none-any.whl.
File metadata
- Download URL: genespeak-0.0.4-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0483bd7727c0f4a1947ddcb5782f5d6105e5f24ec5653cdeaaef7e42f7435000
|
|
| MD5 |
ec1527c5dc1e1052d5b7ae8c9faf8297
|
|
| BLAKE2b-256 |
305e40c3cef57cd82be32245a0e4bd7839d7a95e17d410b85d7a80d3c2ac948f
|