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

cwl-svg

Package Overview
Dependencies
Maintainers
4
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cwl-svg

A library for generating an interactive SVG visualization of CWL workflows

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
235
decreased by-50.73%
Maintainers
4
Weekly downloads
 
Created
Source

CWL-SVG

CWL-SVG is a Typescript library for visualization of Common Workflow Language workflows

Usage

// If you need the bundled theme
import "./assets/styles/style.scss";

// Visualizer uses the data model from CWL-TS library, which is a dependency
import {WorkflowFactory} from "cwlts/models";

// Import the CWL-SVG workflow renderer 
import {Workflow} from "./graph/workflow";

const wf = WorkflowFactory.from({
    label: "Whole Genome Analysis",
    class: "Workflow",
    outputs: ...
    inputs: ...
    steps: ...
});

// We need an SVG dom element inside which we should draw the workflow
const svgRoot      = document.getElementById("svg") as SVGSVGElement;

// Draw
const workflow     = new Workflow(svgRoot, wf);

// You can scale the drawing to adjust it to fit the available viewport 
workflow.fitToViewport();

// You can also auto-arrange graph nodes spatially in case there's no information about node positions inside the CWL document
workflow.arrange();

Todo

  • Create a CLI interface for generating images from CWL files directly
  • Compile a bundle usable without module loaders
  • Make it more theming-friendly

Preview

Overview

Arranged and scaled BCBio workflow

Selection

Selection and Highlighting

Movement

Movement

Connection

Connecting Nodesd

FAQs

Package last updated on 22 Dec 2017

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