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 the
original text. Text encoding is done for both ascii and
utf-8 characters based on the strategy keyword argument.
The encoding scheme could be any combination of A, T, G, C.
Installation 📜
You can install the library via pip or conda.
Install with pip
pip install genespeak
Install with conda
conda install -c conda-forge genespeak
Quickstart ⚡
See the quickstart guide here.
| Service | Link/Badge |
|---|---|
| Colab | |
| Binder | |
| SageMaker StudioLab |
Demo App ✨
You can play around with GeneSpeak in this streamlit app: https://tinyurl.com/genespeak-demo
Usage ✋
import genespeak as gp
print(f'{gp.__name__} version: {gp.__version__}')
schema = "ATCG" # (1)
strategy = "ascii" # (2)
text = "Hello World!"
dna = gp.text_to_dna(text, schema=schema)
text_from_dna = gp.dna_to_text(dna, schema=schema)
print(f'Text: {text}\nEncoded DNA: {dna}\nDecoded Text: {text_from_dna}\nSuccess: {text == text_from_dna}')
Output
genespeak version: 0.0.5
Text: Hello World!
Encoded DNA: TACATCTTTCGATCGATCGGACAATTTGTCGGTGACTCGATCTAACAT
Text: Hello World!
Encoded DNA: TACATCTTTCGATCGATCGGACAATTTGTCGGTGACTCGATCTAACAT
Decoded Text: Hello World!
Documentation 📚
The genespeak docs are maintained here.
License 📑
The library is available under MIT license.
Citation 🔖
You may cite this library as follows.
@software{ray2022genespeak,
author = {Ray, Sugato},
title = {GeneSpeak - A library to encode text as DNA and decode DNA to text},
url = {https://github.com/sugatoray/genespeak},
doi = {10.5281/zenodo.5885777},
month = {1},
year = {2022}
}
GeneSpeak Thumb Print 👍
Let's have some fun! ✨ The following is a GeneSpeak thumbprint of genespeak itself.
| schema | strategy | thumbprint |
|---|---|---|
ATCG |
ascii |
TCTGTCTTTCGCTCTTTGAGTGAATCTTTCATTCCG |
Metadata
Release files for genespeak 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| genespeak-0.0.9.tar.gz | 12.5 kB | Without provenance | Details for genespeak-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| genespeak-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for genespeak-0.0.9-py3-none-any.whl |
Total release size: 22.4 kB
Release files / genespeak-0.0.9.tar.gz
| Download URL | genespeak-0.0.9.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
349bf672831c431c9201911c16fe80a820375fc8c1b7669f746ecc8905b1ca6d
|
|
BLAKE2b-256 checksum How to use checksums |
9da58ec8af5e8fa45735dde253d21bca035e8fe97bce86cfc8e2ef7599af4543
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / genespeak-0.0.9-py3-none-any.whl
| Download URL | genespeak-0.0.9-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aeef7240c6e4e8cedc5b3078e96383890838a9fecbb7d832ca6fd225160e9940
|
|
BLAKE2b-256 checksum How to use checksums |
a5a29371181544c8b6a82ba452a245ea94ce3c2f7db56d56b827b96f0894d713
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for genespeak 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.