{"id":20371919,"url":"https://github.com/biosustain/co","last_synced_at":"2026-06-11T09:31:51.524Z","repository":{"id":13717790,"uuid":"16411861","full_name":"biosustain/co","owner":"biosustain","description":"Make mutated copies of DNA components in BioPython","archived":false,"fork":false,"pushed_at":"2022-08-25T14:34:55.000Z","size":8401,"stargazers_count":1,"open_issues_count":10,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-05T01:41:47.199Z","etag":null,"topics":["biopython","genomics","microbial-genomics","python"],"latest_commit_sha":null,"homepage":"http://co.readthedocs.org/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"yankuistart/my-bbb","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/biosustain.png","metadata":{"files":{"readme":"README.rst","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":"2014-01-31T15:31:34.000Z","updated_at":"2019-10-17T12:51:18.000Z","dependencies_parsed_at":"2022-07-30T16:08:54.896Z","dependency_job_id":null,"html_url":"https://github.com/biosustain/co","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/biosustain/co","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biosustain%2Fco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biosustain%2Fco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biosustain%2Fco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biosustain%2Fco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/biosustain","download_url":"https://codeload.github.com/biosustain/co/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biosustain%2Fco/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34192870,"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-11T02:00:06.485Z","response_time":57,"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":["biopython","genomics","microbial-genomics","python"],"created_at":"2024-11-15T01:10:37.788Z","updated_at":"2026-06-11T09:31:51.507Z","avatar_url":"https://github.com/biosustain.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. |travis| image:: https://travis-ci.org/biosustain/co.svg\n.. _travis: https://travis-ci.org/biosustain/co\n\nCo\n==\n\n|travis|_\n\n**Co** is a Python library for altering annotated DNA sequences. It keeps track of components and lifts\nover feature annotations when a component is \"mutated\" by applying a series of mutations. With ``co`` you can\nbuild new consensus sequences for cloned organisms and trace changes to features within a lineage.\n\nFor more information, check out the `Documentation \u003chttp://co.readthedocs.org/en/latest/\u003e`_.\n\nHello Co!\n---------\n\n::\n\n    \u003e\u003e\u003e from co import Component\n    \u003e\u003e\u003e from co.mutation import *\n    \u003e\u003e\u003e hello = Component('Hello X!')\n    \u003e\u003e\u003e hello.seq\n    Seq('Hello X!', Alphabet())\n    \u003e\u003e\u003e hello_world = hello.mutate([Mutation(6, 1, 'world')])\n    \u003e\u003e\u003e hello_world.seq\n    Seq('Hello world!', Alphabet())\n\n\n\nWorking with Feature Annotations\n--------------------------------\n\nComponents are modeled after BioPython's ``SeqRecord`` -- they have both a sequence, and features:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from Bio.SeqFeature import *\n    \u003e\u003e\u003e slogan = Component('CoPy is for DNA components', features=[\n    ...                 SeqFeature(FeatureLocation(0, 4), type='name'),\n    ...                 SeqFeature(FeatureLocation(12, 15), id='DNA')])\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e # features are bound to components -- and you can always access their DNA sequence\n    ...\n    \u003e\u003e\u003e slogan.features.add(FeatureLocation(16, 26)).seq\n    Seq('components', Alphabet())\n    \u003e\u003e\u003e [f.seq for f in slogan.features]\n    [Seq('CoPy', Alphabet()), Seq('DNA', Alphabet()), Seq('components', Alphabet())]\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e # New Components are made through series of mutations\n    ... # You not only get the new sequence but a mutated component: Features are translated to the\n    ... # new sequence as well.\n    ...\n    \u003e\u003e\u003e new_slogan = slogan.mutate([DEL(2, 2), DEL(12, 4)])\n    \u003e\u003e\u003e new_slogan.seq\n    Seq('Co is for components', Alphabet())\n    \u003e\u003e\u003e new_slogan.features\n    ComponentFeatureSet([Feature(FeatureLocation(ExactPosition(0), ExactPosition(2)), type='name'),\n                         Feature(FeatureLocation(ExactPosition(10), ExactPosition(20)))])\n    \u003e\u003e\u003e [f.seq for f in new_slogan.features]\n    [Seq('Co', Alphabet()), Seq('components', Alphabet())]\n    \u003e\u003e\u003e list(new_slogan.features.find(type='name'))  # features can be filtered by type, id, strand, position, and qualifiers\n    [Feature(FeatureLocation(ExactPosition(0), ExactPosition(2)), type='name')]\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e # Using Component.fdiff you can get a summary of what features where affected by mutation. (Unchanged features\n    ... # that have a new coordinate -- e.g. the 'components' feature in this example -- are not included).\n    ...\n    \u003e\u003e\u003e slogan.fdiff(new_slogan)\n    Diff(added=(Feature(FeatureLocation(ExactPosition(12), ExactPosition(15)), id='DNA'),\n                Feature(FeatureLocation(ExactPosition(0), ExactPosition(4)), type='name')),\n         removed=(Feature(FeatureLocation(ExactPosition(0), ExactPosition(2)), type='name'),))\n\n\nAuthors\n=======\n\n`Lars Schöning \u003chttps://github.com/lyschoening\u003e`_ has created Co. Contributions are very welcome.\nContact the main author for bigger changes.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiosustain%2Fco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiosustain%2Fco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiosustain%2Fco/lists"}