{"id":25935595,"url":"https://github.com/hicsail/constellation-js","last_synced_at":"2025-03-04T01:38:37.341Z","repository":{"id":27322770,"uuid":"109418351","full_name":"hicsail/constellation-js","owner":"hicsail","description":"Library for combinatorially specifying, constraining, and exploring genetic design spaces.","archived":false,"fork":false,"pushed_at":"2022-12-10T16:10:03.000Z","size":3076,"stargazers_count":9,"open_issues_count":8,"forks_count":8,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-04-24T10:53:00.559Z","etag":null,"topics":["combinatorial-search","computational-biology","constraint-programming","genetic-design","graph","graph-algorithms","javascript","programming-languages","synthetic-biology","visualization"],"latest_commit_sha":null,"homepage":"http://constellationcad.org","language":"JavaScript","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/hicsail.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":"2017-11-03T16:29:27.000Z","updated_at":"2024-04-12T17:08:38.000Z","dependencies_parsed_at":"2023-01-14T06:29:04.625Z","dependency_job_id":null,"html_url":"https://github.com/hicsail/constellation-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hicsail%2Fconstellation-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hicsail%2Fconstellation-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hicsail%2Fconstellation-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hicsail%2Fconstellation-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hicsail","download_url":"https://codeload.github.com/hicsail/constellation-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241768377,"owners_count":20017117,"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":["combinatorial-search","computational-biology","constraint-programming","genetic-design","graph","graph-algorithms","javascript","programming-languages","synthetic-biology","visualization"],"created_at":"2025-03-04T01:38:36.750Z","updated_at":"2025-03-04T01:38:37.333Z","avatar_url":"https://github.com/hicsail.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# constellation-js\n\n[![Build Status](https://travis-ci.org/hicsail/constellation-js.svg?branch=master)](https://travis-ci.org/hicsail/constellation-js) [![npm version](https://badge.fury.io/js/constellation-js.svg)](https://badge.fury.io/js/constellation-js)[![Coverage Status](https://coveralls.io/repos/github/hicsail/constellation-js/badge.svg?branch=master)](https://coveralls.io/github/hicsail/constellation-js?branch=master)\n\n### Latest stable version available at [ConstellationCAD](http://constellationcad.org/)\n\n## Usage\n### Requirements\n\n[![node](https://user-images.githubusercontent.com/7750862/70819282-d5ad4a80-1da3-11ea-8f65-dcf2468c74ef.png)](https://nodejs.org/en/download/) [![python](https://user-images.githubusercontent.com/7750862/70819279-d3e38700-1da3-11ea-9321-309ec4d3cc51.png)](https://www.python.org/downloads/)\n\n### Local UI\n```shell\ngit clone git@github.com:hicsail/constellation-js.git\nnpm run build \u0026\u0026 npm run start\n```\nThen open `http://localhost:8082/` on browser\n\n### NPM Package\n\nThe package can be installed in the following way.\n```shell\nnpm install constellation-js\n```\nIt is possible to generate a collection of designs that match a specification using graph construction and traversals.\n```javascript\nconst constellation = require('constellation-js');\nlet goldbar = '{PT7_a then galK}';\nlet categories = {\n\t\"PT7_a\":{\n\t  \"promoter\": [\n\t    \"PT7_WTa\",\n\t    \"PT7_3a\",\n\t    \"PT7_1a\"\n\t    ]\n      },\n\t\"galK\":{\n\t  \"cds\": [\n\t    \"galK\"\n\t    ]\n      }\n}\nlet result = constellation.goldbar(goldbar, categories, {designName: 'my-first-design'});\n// result.stateGraph, result.designs, result.sbol, result.messages\n```\n|Optional parameters| Description|\n|--|--|\n|`designName`|Name of design space for SBOL output, defaults is \"constellation-design\"|\n|`numDesigns`|Max number of designs to enumerate, default is 20|\n|`maxCycles`|Cycle depth for -orMore operators, default is 0|\n|`representation`|Choose between `EDGE` or `NODE` based graph, default is EDGE|\n\n|Output|Description|\n|--|--|\n|`stateGraph`|See [Graph Data Structure](#Graph-Data-Structure)|\n|`designs`|List of enumerated designs|\n|`sbol`| See [Synthetic Biology Open Language](#Synthetic-Biology-Open-Language)|\n|`messages`| Errors or warnings, if applicable|\n\nIt is also possible to generate a collection of designs that match a specification using a purely symbolic approach (note that this approach supports only a tolerance of `0` for the AND operator and does not support the MERGE operator).\n```javascript\nlet result = constellation.symbolic(\n               \"(one-or-more a) then (one-or-more x)\", \n               {\"a\": {\"b\": [\"c\"]}, \"x\":{\"y\": [\"z1\", \"z2\", \"z3\"]}}, \n               {\"numDesigns\": 'all', \"maxCycles\":7});\n```\n\n## Case Studies\nGOLDBAR syntax for the case studies described in the manuscript are available [here](demos/static/use-cases) and can be demoed on Constellation's UI via the drop down menu.\n\n## Design Space Representations\nGenetic design spaces in Constellation are represented in three ways:\n1. GOLDBAR\n2. Directed cyclic graph\n3. SBOL\n\n### GOLDBAR Syntax\nThe supported GOLDBAR concrete syntax for genetic design spaces is presented below using extended BNF notation. Notice that `then` and `.` are equivalent, and the delimiters `(`...`)` and `{`...`}` are equivalent.\n```\n \u003cseq\u003e ::= \u003cexp\u003e then \u003cseq\u003e\n        |  \u003cexp\u003e . \u003cseq\u003e\n        |  \u003cexp\u003e\n\n \u003cexp\u003e ::= \u003cterm\u003e or \u003cexp\u003e\n        |  \u003cterm\u003e and0 \u003cexp\u003e\n        |  \u003cterm\u003e and1 \u003cexp\u003e\n        |  \u003cterm\u003e and2 \u003cexp\u003e\n        |  \u003cterm\u003e merge \u003cexp\u003e\n        |  \u003cterm\u003e\n\n\u003cterm\u003e ::= one-or-more \u003cterm\u003e\n        |  zero-or-more \u003cterm\u003e\n        |  zero-or-one \u003cterm\u003e\n        |  reverse-comp \u003cterm\u003e\n        |  ( \u003cseq\u003e )\n        |  { \u003cseq\u003e }\n        |  \u003catom\u003e\n\n\u003catom\u003e ::= ([A-Za-z0-9]|-|_)+\n```\nThe JSON schema for the GOLDBAR abstract syntax tree representation (parsed from the concrete syntax presented above) can be found in [`schemas/ast.schema.json`](schemas/ast.schema.json).\n\n### Graph Data Structure\nConstellation supports both NODE and EDGE based versions of a design space. Below are examples equivalent to the GOLDBAR specification `promoter then one-or-more CDS then terminator`\n\n|![node-graph](https://user-images.githubusercontent.com/7750862/70357131-21ac3c80-1844-11ea-901f-2a744ce65238.png) | ![edge-graph](https://user-images.githubusercontent.com/7750862/70357132-22dd6980-1844-11ea-8d70-73e28f70c39d.png)|\n| ------------- | ------------- |\nVisualization of node-based graph| Visualization of edge-based graph\n\nThe JSON schema for a design space graph can be found in [`schemas/graph.schema.json`](schemas/graph.schema.json). Below is an example of a node-based graph within a single node in JSON format.\n```\n{\n  \"604571a7-9e38-4647-afd0-9546399480b5\": {\n    \"id\": \"604571a7-9e38-4647-afd0-9546399480b5\",\n    \"text\": \"root\",\n    \"type\": \"root\",\n    \"edges\": [\n      \"b79407eb-95f0-4b78-99da-779f2c9cad46\",\n      \"7f6ca2fb-ef67-4687-924c-4285de896877\"\n    ],\n    \"operator\": [\"One\"]\n  }\n}\n```\n\n### Synthetic Biology Open Language\n[SBOL](https://sbolstandard.org/) is an open standard for the representation of *in silico* biological designs, and the icons used in this tool are provided by [SBOL Visual](https://sbolstandard.org/visual/glyphs/). Design spaces are expressed in SBOL via the `CombinatorialDerivation` extension and can be exported and stored in [Knox](https://github.com/CIDARLAB/knox). This third form of design space representation allows Constellation to be easily integrated in the synthetic biology [community](https://sbolstandard.org/applications/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhicsail%2Fconstellation-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhicsail%2Fconstellation-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhicsail%2Fconstellation-js/lists"}