npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

constellation-js

v2.0.0

Published

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

Downloads

25

Readme

constellation-js

Build Status npm versionCoverage Status

Latest stable version available at ConstellationCAD

Usage

Requirements

node python

Local UI

git clone [email protected]: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 parameters| Description| |--|--| |designName|Name of design space for SBOL output, defaults is "constellation-design"| |numDesigns|Max number of designs to enumerate, default is 20| |maxCycles|Cycle depth for -orMore operators, default is 0| |representation|Choose between EDGE or NODE based graph, default is EDGE| |andTolerance|Choose between 0, 1, 2 for the AND operator, default is 0| |mergeTolerance|Choose between 0, 1, 2 for the MERGE operator, default is 0|

|Output|Description| |--|--| |stateGraph|See Graph Data Structure| |designs|List of enumerated designs| |sbol| See 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-graph | edge-graph| | ------------- | ------------- | Visualization of node-based graph| Visualization 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.