{"id":51237038,"url":"https://github.com/dabane-ghassan/dnazip","last_synced_at":"2026-06-28T21:09:53.022Z","repository":{"id":57423076,"uuid":"330229937","full_name":"dabane-ghassan/dnazip","owner":"dabane-ghassan","description":"A Python implementation of The Burrows-Wheeler Transform alongside Huffman coding on DNA sequences.","archived":false,"fork":false,"pushed_at":"2021-03-17T18:22:02.000Z","size":7694,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-30T14:22:28.066Z","etag":null,"topics":["algorithms","burrows-wheeler-transform","bwt","compression","data-structures","dna-sequences","gui","huffman","python","tkinter-gui"],"latest_commit_sha":null,"homepage":"https://dabane-ghassan.github.io/dnazip/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dabane-ghassan.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}},"created_at":"2021-01-16T18:31:51.000Z","updated_at":"2023-05-30T09:16:28.000Z","dependencies_parsed_at":"2022-09-05T10:41:38.042Z","dependency_job_id":null,"html_url":"https://github.com/dabane-ghassan/dnazip","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dabane-ghassan/dnazip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabane-ghassan%2Fdnazip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabane-ghassan%2Fdnazip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabane-ghassan%2Fdnazip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabane-ghassan%2Fdnazip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dabane-ghassan","download_url":"https://codeload.github.com/dabane-ghassan/dnazip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabane-ghassan%2Fdnazip/sbom","scorecard":{"id":316220,"data":{"date":"2025-08-11","repo":{"name":"github.com/dabane-ghassan/dnazip","commit":"08ea951782fb3d4bfe50adc23485c88c7f0a6f10"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T00:14:11.578Z","repository_id":57423076,"created_at":"2025-08-18T00:14:11.578Z","updated_at":"2025-08-18T00:14:11.578Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34903911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"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":["algorithms","burrows-wheeler-transform","bwt","compression","data-structures","dna-sequences","gui","huffman","python","tkinter-gui"],"created_at":"2026-06-28T21:09:52.261Z","updated_at":"2026-06-28T21:09:53.015Z","avatar_url":"https://github.com/dabane-ghassan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dnazip\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dnazip-bioinfo?color=green)\n![PyPI](https://img.shields.io/pypi/v/dnazip-bioinfo?color=green)\n\n[![ForTheBadge built-with-science](http://ForTheBadge.com/images/badges/built-with-science.svg)](https://GitHub.com/Naereen/)\n[![forthebadge](https://forthebadge.com/images/badges/powered-by-coffee.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/powered-by-black-magic.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/uses-brains.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/built-with-grammas-recipe.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/ctrl-c-ctrl-v.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/winter-is-coming.svg)](https://forthebadge.com)\n\n- A Python implementation of ***The Burrows-Wheeler Transform (BWT)*** alongside ***Huffman compression*** on DNA sequences.\n- Hosted on [GitHub](https://github.com/dabane-ghassan/dnazip)\n- Documentation? [**here**](https://dabane-ghassan.github.io/dnazip/)\n\n\n## Architecture\n\n### Scripts\n![pkgs](photos/packages.png)\n\n### UML\n![mvc](photos/classes.png)\n\n## Installation\n\n- You can install the package either from pip or from the source code hosted on github.\n\n### With pip\n\n```bash\npip install dnazip-bioinfo\n```\n\n### From source\n\n```bash\ngit clone https://github.com/dabane-ghassan/dnazip.git\ncd dnazip\nsudo python3 setup.py install\n```\n\n## Getting started\n\n### GUI\n\n- After installing the package from source or using pip, the interface can be launched simply from the command line:\n```\ndnazip\n```\n- If problems occur with the installation, an interface instance can be imported and launched:\n```python\nfrom dnazip.interface import Interface\ngui = Interface()\ngui.main()\n```\n\n### Using the library\n\n#### Generating a random DNA sequence\n\n- A random DNA sequence with an alphabet of ATCGN can be generated for any given length specified in the parameter.\n\n```python\nfrom dnazip.sequence import Sequence\nrandseq = Sequence.generate(length=5000)\nSequence('/path/to/new/seq').write(randseq)\n```\n#### Encoding a DNA sequence with Burrows-Wheeler + Huffman Coding\n\n- To encode a DNA sequence using BWT and Huffman coding, you can use a FullEncoder object that will save two files to the same directory as the sequence, the Burrows-Wheeler transform and the UTF-8 zipped format of the sequence: \n```python\nfrom dnazip.encoder import FullEncoder\nencode = FullEncoder('/path/to/seq')\nencode.full_zip()\n```\n- The attributes of the object can be accessed to see intermediary results:\n```python\nencode.bw_encoder.rotations # a matrix of string rotations from a sequence\nencode.bw_encoder.bwm # The Burrows-Wheeler Matrix\nencode.bw_encoder.bwt # The Burrows-Wheeler Transform\n\nencode.huff_encoder.header # The header of the zip file that contains Huffman codes for each character as well as the sequence binary padding\nencode.huff_encoder.binary # The binary sequence of the BW transform\nencode.huff_encoder.unicode # 8-bits encoded binary sequence\n```\n- ***A random sequence of size 1kB was compressed efficiently to 549 bytes.***\n\n#### Decoding a DNA sequence with Huffman decoding + Reversing Burrows-Wheeler transform\n\n- To decode a zipped DNA sequence using Huffman decoding and the inverse of BWT, you can use a FullDecoder object that will work in the same manner as the FullEncoder object:\n```python\nfrom dnazip.decoder import FullDecoder\ndecode = FullDecoder('path/to/seq')\ndecode.full_unzip()\n```\n- The attributes can also be accessed to see intermediary results:\n```python\ndecode.huff_decoder.header # The header of the zip file that contains Huffman codes for each character as well as the sequence binary padding that where saved when the Huffman tree was created\ndecode.huff_decoder.unicode # 8-bits encoded sequence\ndecode.huff_decoder.binary # The binary sequence\n\ndecode.bw_decoder.bwm # The Burrows-Wheeler reconstructed matrix\ndecode.bw_decoder.original # The original sequence\n```\n#### Building the Burrows-Wheeler transform using the advanced algorithm\n\n- The BWT can be constructed using a Suffix Array (SA) based algorithm that has a better time and space complexities:\n\n```python\nfrom dnazip.sequence import Sequence\nfrom dnazip.burros_wheeler import BurrosWheeler\n\nseq = Sequence('/path/to/seq').read()\nBurrosWheeler.bwt_advanced(seq)\n```\n\n## Documentation\n\nDetailed documentation on the architecture can be found [here](https://dabane-ghassan.github.io/dnazip/)\n\n## About\n\n### :scroll: License \n**MIT Licensed** © [Ghassan Dabane](https://github.com/dabane-ghassan), 2021.\n\n[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)\n[![forthebadge](https://forthebadge.com/images/badges/made-with-markdown.svg)](https://forthebadge.com)\n[![ForTheBadge uses-git](http://ForTheBadge.com/images/badges/uses-git.svg)](https://GitHub.com/)\n[![ForTheBadge uses-badges](http://ForTheBadge.com/images/badges/uses-badges.svg)](http://ForTheBadge.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdabane-ghassan%2Fdnazip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdabane-ghassan%2Fdnazip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdabane-ghassan%2Fdnazip/lists"}