{"id":31260004,"url":"https://github.com/project-aico/dna","last_synced_at":"2026-01-20T17:35:21.648Z","repository":{"id":313382725,"uuid":"1048814447","full_name":"project-aico/dna","owner":"project-aico","description":"Transcription between UTF-8 text and DNA bases.","archived":false,"fork":false,"pushed_at":"2025-09-16T05:05:11.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T06:30:08.840Z","etag":null,"topics":["bioinformatics","cryptography","dsl","python","yaml"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/dnadsl/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/project-aico.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-02T04:23:50.000Z","updated_at":"2025-09-16T04:43:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"0158d6a7-f862-4d86-a10e-b541c3834e8a","html_url":"https://github.com/project-aico/dna","commit_stats":null,"previous_names":["project-aico/dna"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/project-aico/dna","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-aico%2Fdna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-aico%2Fdna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-aico%2Fdna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-aico%2Fdna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/project-aico","download_url":"https://codeload.github.com/project-aico/dna/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-aico%2Fdna/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275756523,"owners_count":25522841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","cryptography","dsl","python","yaml"],"created_at":"2025-09-23T08:46:23.940Z","updated_at":"2025-09-23T08:46:25.377Z","avatar_url":"https://github.com/project-aico.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"logo\" src=\"https://github.com/project-aico/dna/raw/main/assets/logo.svg\"\n        width=\"160\" /\u003e\n\u003c/p\u003e\n\n# DNA\n\n[![GitHub Actions Workflow Status](https://github.com/project-aico/dna/actions/workflows/python-publish.yml/badge.svg)](https://github.com/project-aico/dna/blob/main/.github/workflows/python-publish.yml)\n[![GitHub last commit](https://img.shields.io/github/last-commit/project-aico/dna)](https://github.com/project-aico/dna/commits/main/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dnadsl)](https://pypi.org/project/dnadsl/)\n[![PyPI - Version](https://img.shields.io/pypi/v/dnadsl)](https://pypi.org/project/dnadsl/)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/dnadsl)](https://pypi.org/project/dnadsl/#files)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/dnadsl)](https://pypistats.org/packages/dnadsl)\n[![GitHub License](https://img.shields.io/github/license/project-aico/dna)](https://github.com/project-aico/dna/blob/main/LICENSE)\n\nA domain-specific language\n(transcription between UTF-8 text and DNA bases)\nbased on YAML.\n\n## Transcoding\n\nPlease refer to [coding.py](https://github.com/project-aico/dna/blob/main/dna/coding.py):\n\n```python\nDNA_TO_BIN = {\n    \"A\": \"00\",\n    \"C\": \"01\",\n    \"G\": \"10\",\n    \"T\": \"11\"\n}\n\nBIN_TO_DNA = {\n    v: k\n    for k, v in DNA_TO_BIN.items()\n}\n\nDNA_COMPLEMENT = {\n    \"A\": \"T\",\n    \"T\": \"A\",\n    \"C\": \"G\",\n    \"G\": \"C\"\n}\n```\n\n## Installation\n\nDNA can be installed\nfrom [PyPI](https://pypi.org/project/dnadsl/):\n\n```bash\npip install dnadsl\n```\n\nor download the repository and run:\n\n```bash\npip install .\n```\n\nas of the repository root folder.\n\n## Usage\n\nRun `dna --help` for help:\n\n```bash\n$ dna --help\nusage: dna [-h] [-m {encode,decode}] [-i INPUT_FILE] [-o OUTPUT_FILE] [-v]\n\n+--------------------------------------------------+\n|                        DNA                       |\n|            A domain-specific language            |\n| (transcription between UTF-8 text and DNA bases) |\n|                  based on YAML.                  |\n+--------------------------------------------------+\n\noptions:\n  -h, --help            show this help message and exit\n  -m {encode,decode}, --mode {encode,decode}\n                        Choose the mode of transcoding.\n                        encode: UTF-8 to bases; decode: bases to UTF-8.\n                        The default is: encode\n  -i INPUT_FILE, --input-file INPUT_FILE\n                        The path of the input YAML file.\n  -o OUTPUT_FILE, --output-file OUTPUT_FILE\n                        The path of the output YAML file.\n  -v, --version         Print the version number of dna and exit.\n```\n\n## Examples\n\n- Convert UTF-8 text to DNA bases, e.g., run `dna -m encode -i input_text.yml -o output_bases.yml`:\n\n  - [The input UTF-8 text](https://github.com/project-aico/dna/blob/main/examples/input_text.yml):\n\n      ```yaml\n      text_utf8: 😄😊\n      ```\n\n  - [The output DNA bases](https://github.com/project-aico/dna/blob/main/examples/output_bases.yml):\n\n      ```yaml\n      text_utf8: 😄😊\n      dna:\n      positive_strand:\n          sequence: TTAAGCTTGCGAGACATTAAGCTTGCGAGAGG\n          binary: 11110000 10011111 10011000 10000100 11110000 10011111 10011000 10001010\n          text: 😄😊\n      negative_strand:\n          sequence: AATTCGAACGCTCTGTAATTCGAACGCTCTCC\n          binary: 00001111 01100000 01100111 01111011 00001111 01100000 01100111 01110101\n          text: \"\\x0F`g{\\x0F`gu\"\n      ```\n\n- Convert DNA bases to UTF-8 text, e.g., run `dna -m decode -i input_bases.yml -o output_text.yml`:\n\n  - [The input DNA bases](https://github.com/project-aico/dna/blob/main/examples/input_bases.yml):\n\n      ```yaml\n      positive_strand: TGAGGCTCGGCATGTTGTGAGATTTTAAGCTTGCAAGTCG\n      ```\n\n  - [The output UTF-8 text](https://github.com/project-aico/dna/blob/main/examples/output_text.yml):\n\n      ```yaml\n      text_utf8: ❤️🐶\n      dna:\n      positive_strand:\n          sequence: TGAGGCTCGGCATGTTGTGAGATTTTAAGCTTGCAAGTCG\n          binary: 11100010 10011101 10100100 11101111 10111000 10001111 11110000 10011111\n          10010000 10110110\n          text: ❤️🐶\n      negative_strand:\n          sequence: ACTCCGAGCCGTACAACACTCTAAAATTCGAACGTTCAGC\n          binary: 00011101 01100010 01011011 00010000 01000111 01110000 00001111 01100000\n          01101111 01001001\n          text: \"\\x1Db[\\x10Gp\\x0F`oI\"\n      ```\n\n## Packaging\n\nThe binaries are created with\n[PyInstaller](https://github.com/pyinstaller/pyinstaller):\n\n```bash\n# Package it on Linux\npyinstaller --name DNA --onefile -p dna dna/__main__.py\n\n# Package it on Windows\npyinstaller --name DNA --onefile --icon python.ico -p dna dna/__main__.py\n```\n\n## Web Applications\n\nDeploy [DNA](https://dnadsl.vercel.app/)\non [Vercel](https://github.com/vercel/vercel).\n\n## Copyrights\n\nDNA is a free, open-source software package\n(distributed under the [GPLv3 license](./LICENSE)).\nThe logo used in [README.md](./README.md) is downloaded from\n[Wikimedia Commons](https://commons.wikimedia.org/wiki/File:DNA_small.svg).\nThe Python icon is downloaded from\n[python.ico](https://github.com/python/cpython/blob/main/PC/icons/python.ico).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-aico%2Fdna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproject-aico%2Fdna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-aico%2Fdna/lists"}