{"id":18258210,"url":"https://github.com/ginkgobioworks/gen","last_synced_at":"2026-01-26T19:27:02.558Z","repository":{"id":247442634,"uuid":"824711265","full_name":"ginkgobioworks/gen","owner":"ginkgobioworks","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-29T18:52:15.000Z","size":78001,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-29T19:15:54.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ginkgobioworks.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}},"created_at":"2024-07-05T18:49:08.000Z","updated_at":"2024-10-29T01:15:05.000Z","dependencies_parsed_at":"2024-11-05T19:51:38.416Z","dependency_job_id":null,"html_url":"https://github.com/ginkgobioworks/gen","commit_stats":null,"previous_names":["ginkgobioworks/gen"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginkgobioworks%2Fgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginkgobioworks%2Fgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginkgobioworks%2Fgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ginkgobioworks%2Fgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ginkgobioworks","download_url":"https://codeload.github.com/ginkgobioworks/gen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238887455,"owners_count":19547255,"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":[],"created_at":"2024-11-05T10:29:37.498Z","updated_at":"2025-10-29T20:30:57.934Z","avatar_url":"https://github.com/ginkgobioworks.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gen\nGen is a version control system for genetic sequences. It efficiently stores genome-length sequences and sequence\nvariations, with native support for polyploid genomes and pooled genotypes. Each project is organized into a repository,\nwhere collections of sequences and associated data are stored and tracked over time. Within a repository, branches can\nbe created to explore different modifications or variations without affecting the main project. These branches can later\nbe merged to integrate results from different experiments or collaborators.\n\nThe gen client can import standard sequence file formats from sources like NCBI and genetic design tools. The sequence\nmodel takes the form of a graph structure as shown in the figure below. Each molecule is made up out of a network of\n_nodes_ that represent sequence fragments, and _edges_ that define how sequence fragments are connected. Multiple\nmolecules are organized into _collections_ that could represent the different chromosomes in a reference genome,\nproteins in a proteome, or pieces of DNA in a cloning reaction mixture. Molecules generally start out as a node that\nholds the reference sequence, and new edges and nodes are added for every sequence variant that is designed or observed.\nTo reconstitute a linear sequence, the client walks from node to node along a defined _path_. This data model allows the\nrepresentation of a wide range of biological complexity -- from a single molecule to complex cultivars and cell lines,\nincluding any naturally occurring variation in addition to intended engineering.\n\n![Figure 1](docs/figures/figure_1.svg)\n\n**_Figure 1_**: _Block graph model representation of a sequence variant where two nucleotides AT are replaced by TG;\nthe modified sequence (shown in bold) is stored as a path over a list of edges that address specific coordinates._\n\nThe block graph model is designed to be additive: new sequence variants only add to the graph, existing nodes are stable\nand do not have to be split to accomodate the new topology. This is different from the more commonly used segment graph \nmodel shown in Figure 2, and gen automatically converts between formats as needed. \n\n![Figure 2](docs/figures/figure_2.svg)\n\n**_Figure 2_**: _Segment graph model corresponding to the sequence variant in Figure 1. The original sequence was\nsplit into 3 parts; the modified sequence path is defined by a list of nodes that refer to these segments. Nodes are\nlabeled by their parent ID and starting coordinate, new edges internal to the reference are shown as dashed arrows._ \n\nIndividual chromosomes or contigs are stored as _block groups_ that refer to a specific grouping of edges from the main\ngraph. Block groups are adressed on three facets: name, sample, and collection. The name is an identifier like\n\"chromosome II\", and the sample could refer to a real individual or a virtual outcome of an experiment. The meaning of a\ncollection is flexible, and for example could refer to the type of data (genomic, protein, ...) or experiment.\n\n## Prebuilt binaries\n\nPrebuilt binaries exist for various platforms and architectures on the [Release page](https://github.com/ginkgobioworks/gen/releases). The latest version can be found\n[here](https://github.com/ginkgobioworks/gen/releases/tag/nightly).\n\n## Installing from Source\nMake sure you have a Rust compiler installed on your system. You can install the Rust toolset using the [rustup\ninstaller](https://rustup.rs/).\n\n\n1. Clone the [source](https://github.com/ginkgobioworks/gen) with `git`:\n\n   ```sh\n   git clone https://github.com/ginkgobioworks/gen.git\n   cd rust\n   ```\n\n2. Compile the gen package and its dependencies:\n\n    ```\n    cargo build --release\n    ```\n\n3. You can find the gen executable in ./target/release/ or execute it via cargo:\n\n    ```\n    cargo run -- \u003carguments\u003e\n    ```\n\nTo cross-compile gen to run on a different architecture, you need to first add a target to the Rust toolchain and\ninstall a linker. For macOS to Linux this can be done as follows:\n\n    ```\n    rustup target add x86_64-unknown-linux-gnu\n    brew install SergioBenitez/osxct/x86_64-unknown-linux-gnu\n    cargo build --release --target=x86_64-unknown-linux-gnu\n    ```\n\nThe executable will be placed in ./target/x86_64-unknown-linux-gnu/release/\n\n## Usage\nGen is a command line tool with multiple subcommands that each have their own flags and arguments. The currently\navailable commands are listed below and described in more detail [here](docs/commands.md) or built-in help pages (`gen\n[COMMAND] --help`).\n\n```\nUsage: gen [OPTIONS] [COMMAND]\n\nCommands:\n  import      Import a new sequence collection\n  update      Update a sequence collection with new data\n  init        Initialize a gen repository\n  branch      Manage and create branches\n  checkout    Migrate a database to a given operation\n  reset       \n  operations  View operations carried out against a database\n  apply       \n  export      Export a sequence collection\n  defaults    Set a default database and collection to use\n  help        Print this message or the help of the given subcommand(s)\n\nOptions:\n  -d, --db \u003cDB\u003e  The path to the database you wish to utilize\n  -h, --help     Print help\n  -V, --version  Print version\n```\nTypical workflows are illustrated in these example workflows:\n\n- [Mapping reads to the human genome, taking into account all known variants](examples/human_variation_aware_alignment/Analysis.ipynb)\n- [Design and analysis of a combinatorial plasmid library constructed via one-pot cloning](examples/combinatorial_plasmid_design/combinatorial_design.md)\n- [Modeling a cross between two yeast strains starting from variant calls or genome assemblies](examples/yeast_crosses/Analysis.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fginkgobioworks%2Fgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fginkgobioworks%2Fgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fginkgobioworks%2Fgen/lists"}