{"id":21466704,"url":"https://github.com/edinburgh-genome-foundry/zymp","last_synced_at":"2025-07-15T05:30:51.854Z","repository":{"id":57478660,"uuid":"166257840","full_name":"Edinburgh-Genome-Foundry/zymp","owner":"Edinburgh-Genome-Foundry","description":":scissors: Design compact restriction sites arrays (python utility)","archived":false,"fork":false,"pushed_at":"2022-05-07T21:03:29.000Z","size":141,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-17T03:10:36.782Z","etag":null,"topics":["dna-assembly","restriction-sites","sequence-design","synthetic-biology"],"latest_commit_sha":null,"homepage":"https://cuba.genomefoundry.org/design-sites-arrays","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/Edinburgh-Genome-Foundry.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-17T16:25:59.000Z","updated_at":"2023-11-17T03:41:58.000Z","dependencies_parsed_at":"2022-08-30T09:52:16.992Z","dependency_job_id":null,"html_url":"https://github.com/Edinburgh-Genome-Foundry/zymp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edinburgh-Genome-Foundry%2Fzymp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edinburgh-Genome-Foundry%2Fzymp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edinburgh-Genome-Foundry%2Fzymp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edinburgh-Genome-Foundry%2Fzymp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Edinburgh-Genome-Foundry","download_url":"https://codeload.github.com/Edinburgh-Genome-Foundry/zymp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226017166,"owners_count":17560466,"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","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":["dna-assembly","restriction-sites","sequence-design","synthetic-biology"],"created_at":"2024-11-23T08:15:00.251Z","updated_at":"2025-07-15T05:30:51.834Z","avatar_url":"https://github.com/Edinburgh-Genome-Foundry.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. raw:: html\n\n    \u003cp align=\"center\"\u003e\n    \u003cimg alt=\"Zymp\" title=\"Zymp\" src=\"https://raw.githubusercontent.com/Edinburgh-Genome-Foundry/zymp/master/docs/_static/images/title.png\" width=\"300\"\u003e\n    \u003cbr /\u003e\n    \u003c/p\u003e\n\n\n.. image:: https://github.com/Edinburgh-Genome-Foundry/zymp/actions/workflows/build.yml/badge.svg\n    :target: https://github.com/Edinburgh-Genome-Foundry/zymp/actions/workflows/build.yml\n    :alt: GitHub CI build status\n\n.. image:: https://coveralls.io/repos/github/Edinburgh-Genome-Foundry/zymp/badge.svg?branch=master\n   :target: https://coveralls.io/github/Edinburgh-Genome-Foundry/zymp?branch=master\n\n**Zymp** is a Python library to produce small sequences of DNA packed with enzyme\nrestriction sites. You specify the enzymes you want, the ones you don't want,\nwhether you want the sites to be unique, or any other condition, and Zymp will\nattempt to find a compact sequence verifying all of this (it really focuses on\nsequence shortness).\n\n**Warning:** Zymp is implemented with a \"whatever works well enough\"\nphilosophy. It has a lot of \"whatever\" but it generally works \"well enough\".\nThe algorithm is greedy with many simplifications so don't expect perfect solutions.\n\nExamples\n--------\n\nHere is how you design a sequence\n\n.. code:: python\n\n    from zymp import (stacked_sites_array, plot_sequence_sites,\n                  annotate_enzymes_sites, write_record)\n\n    enzymes_names = [\n        'AccI', 'AclI', 'AflII', 'AflIII', 'AgeI', 'ApaLI', 'AseI',\n        'AvaI', 'BamHI', 'BanII', 'BlnI', 'BmtI', 'BsmI', 'BssHII',\n        'DdeI', 'DraI', 'Eco47III', 'EcoRI', 'EcoRV', 'HindII',\n        'HindIII', 'HinfI', 'HpaI', 'KpnI', 'MfeI', 'MluI',\n        'MspA1I', 'MunI', 'NaeI', 'NcoI', 'NdeI', 'NheI', 'NotI',\n        'NsiI', 'NspI', 'PstI', 'PvuI', 'PvuII', 'SacI', 'SacII',\n        'SalI', 'ScaI', 'SfaNI', 'SnaBI', 'SpeI', 'SphI', 'SspI',\n        'StyI', 'VspI', 'XhoI', 'XmaI', 'ZraI'\n    ]\n\n    forbidden_enzymes=['BsmBI', 'BsaI']\n\n    # DESIGN AN OPTIMIZED SEQUENCE WITH ZYMP\n    seq, sites_in_seq, leftover = stacked_sites_array(\n            enzymes_names, forbidden_enzymes=forbidden_enzymes,\n            unique_sites=True, tries=100)\n\n    print (\"Sequence length:\", len(seq),\n        \"\\nRestriction sites:\", len(sites_in_seq),\n        \"\\nSites not included: \", leftover)\n                    \n    # PLOT A SUMMARY\n    ax = plot_sequence_sites(seq, enzymes_names)\n    ax.figure.savefig(\"stacked_array.pdf\", bbox_inches='tight')\n                    \n    # WRITE THE SEQUENCE AND SITE ANNOTATIONS AS A RECORD\n    record = annotate_enzymes_sites(\n        seq, enzymes_names, forbidden_enzymes=forbidden_enzymes)\n    write_record(record, 'stacked_site_array.gb')\n\n**Plot output:**\n\n.. raw:: html\n\n    \u003cp align=\"center\"\u003e\n    \u003cimg alt=\"stacked array\" title=\"stacked array\" src=\"https://raw.githubusercontent.com/Edinburgh-Genome-Foundry/zymp/master/docs/_static/images/example_array.png\" width=\"800\"\u003e\n    \u003cbr /\u003e\n    \u003c/p\u003e\n\n\n**Console output:**\n\n.. code:: bash\n\n    Sequence length: 159\n    Restriction sites: 49\n    Sites not included:  {'NcoI', 'HpaI', 'SacII'}\n\nZymp has created a 159-nucleotide sequence with 49 of the 52 restriction sites\nwe specified, that's only ~3 nucleotides per site ! and the sequence is free\nof BsaI or HpaI sites, so it is compatible with Golden Gate assembly.\n\nIf NcoI and HpaI are your favorite enzymes, you may be disappointed that they\nare not in the final sequence. Zymp allows you to add validity conditions\nfor the result:\n\n.. code:: python\n\n    from zymp import stacked_sites_array\n\n    def success_condition(seq, sites_in_seq, leftover):\n        return {'NcoI', 'HpaI'}.issubset(sites_in_seq)\n\n    seq, sites_in_seq, leftover = stacked_sites_array(\n            enzymes_names, forbidden_enzymes=forbidden_enzymes,\n            tries=100, success_condition=success_condition)\n\n    print (\"Sequence length:\", len(seq),\n        \"\\nRestriction sites:\", len(sites_in_seq),\n        \"\\nSites not included: \", leftover)\n\n**New console output:**\n\n.. code:: bash\n\n    Sequence length: 158 \n    Restriction sites: 47 \n    Sites not included:  {'SacII', 'SacI', 'XhoI', 'BlnI', 'XmaI'}\n\n\nInstallation\n------------\n\nYou can install zymp through PIP:\n\n.. code::\n\n    pip install zymp\n\nAlternatively, you can unzip the sources in a folder and type:\n\n.. code::\n\n    python setup.py install\n\nLicense = MIT\n-------------\n\nZymp is an open-source software originally written at the\n`Edinburgh Genome Foundry \u003chttp://genomefoundry.org\u003e`_ by\n`Zulko \u003chttps://github.com/Zulko\u003e`_ and\n`released on Github \u003chttps://github.com/Edinburgh-Genome-Foundry/zymp\u003e`_\nunder the MIT licence (Copyright 2018 Edinburgh Genome Foundry, University of Edinburgh).\n\nEveryone is welcome to contribute!\n\nMore biology software\n---------------------\n\n.. image:: https://raw.githubusercontent.com/Edinburgh-Genome-Foundry/Edinburgh-Genome-Foundry.github.io/master/static/imgs/logos/egf-codon-horizontal.png\n  :target: https://edinburgh-genome-foundry.github.io/\n\nZymp is part of the `EGF Codons \u003chttps://edinburgh-genome-foundry.github.io/\u003e`_\nsynthetic biology software suite for DNA design, manufacturing and validation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedinburgh-genome-foundry%2Fzymp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedinburgh-genome-foundry%2Fzymp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedinburgh-genome-foundry%2Fzymp/lists"}