New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

constellation-js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

constellation-js

Constellation is a tool for parsing a language specifying genetic parts and their relationships

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

constellation-js

Build Status npm versionCoverage Status

Latest stable version available at ConstellationCAD

Usage

Requirements

node python

Local UI

git clone git@github.com:hicsail/constellation-js.git
npm run build && npm run start

Then open http://localhost:8082/ on browser

NPM Package

The package can be installed in the following way.

npm install constellation-js

It is possible to generate a collection of designs that match a specification using graph construction and traversals.

const constellation = require('constellation-js');
let goldbar = '{PT7_a then galK}';
let categories = {
	"PT7_a":{
	  "promoter": [
	    "PT7_WTa",
	    "PT7_3a",
	    "PT7_1a"
	    ]
      },
	"galK":{
	  "cds": [
	    "galK"
	    ]
      }
}
let result = constellation.goldbar(goldbar, categories, {designName: 'my-first-design'});
// result.stateGraph, result.designs, result.sbol
Optional parametersDescription
designNameName of design space for SBOL output, defaults is "constellation-design"
numDesignsMax number of designs to enumerate, default is 20
maxCyclesCycle depth for -orMore operators, default is 0
representationChoose between EDGE or NODE based graph, default is EDGE
andToleranceChoose between 0, 1, 2 for the AND operator, default is 0
mergeToleranceChoose between 0, 1, 2 for the MERGE operator, default is 0
OutputDescription
stateGraphSee Graph Data Structure
designsList of enumerated designs
sbolSee Synthetic Biology Open Language

It 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).

let result = constellation.symbolic(
               "(one-or-more a) then (one-or-more x)", 
               {"a": {"b": ["c"]}, "x":{"y": ["z1", "z2", "z3"]}}, 
               {"numDesigns": 'all', "maxCycles":7});

Case Studies

GOLDBAR syntax for the case studies described in the manuscript are available here and can be demoed on Constellation's UI via the drop down menu.

Design Space Representations

Genetic design spaces in Constellation are represented in three ways:

  1. GOLDBAR
  2. Directed cyclic graph
  3. SBOL

GOLDBAR Syntax

The 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.

 <seq> ::= <exp> then <seq>
        |  <exp> . <seq>
        |  <exp>

 <exp> ::= <term> or <exp>
        |  <term> and <exp>
        |  <term> merge <exp>
        |  <term>

<term> ::= one-or-more <term>
        |  zero-or-more <term>
        |  zero-or-one <term>
        |  reverse-comp <term>
        |  ( <seq> )
        |  { <seq> }
        |  <atom>

<atom> ::= ([A-Za-z0-9]|-|_)+

The JSON schema for the GOLDBAR abstract syntax tree representation (parsed from the concrete syntax presented above) can be found in schemas/ast.schema.json.

Graph Data Structure

Constellation 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

node-graphedge-graph
Visualization of node-based graphVisualization of edge-based graph

The JSON schema for a design space graph can be found in schemas/graph.schema.json. Below is an example of a node-based graph within a single node in JSON format.

{
  "604571a7-9e38-4647-afd0-9546399480b5": {
    "id": "604571a7-9e38-4647-afd0-9546399480b5",
    "text": "root",
    "type": "root",
    "edges": [
      "b79407eb-95f0-4b78-99da-779f2c9cad46",
      "7f6ca2fb-ef67-4687-924c-4285de896877"
    ],
    "operator": ["One"]
  }
}

Synthetic Biology Open Language

SBOL is an open standard for the representation of in silico biological designs, and the icons used in this tool are provided by SBOL Visual. Design spaces are expressed in SBOL via the CombinatorialDerivation extension and can be exported and stored in Knox. This third form of design space representation allows Constellation to be easily integrated in the synthetic biology community.

Keywords

FAQs

Package last updated on 24 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc