Coder Social home page Coder Social logo

trellixvulnteam / sevenbridges-cwl_uxmp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sbg/sevenbridges-cwl

0.0 0.0 0.0 1.34 MB

Seven Bridges Python library for programatic generation of CWL workflows.

License: Other

Shell 0.05% JavaScript 0.52% Python 99.43%

sevenbridges-cwl_uxmp's Introduction

SevenBridges CWL

Table of contents

  1. Overview
  2. Install
  3. Docs
  4. Run tests
  5. Examples

Overview

SevenBridges CWL package provides python bindings for Common Workflow Language. It is intended for developers who want to use python code to generate CWL documents. If creating a document through the GUI is preferable, then look at the Rabix Composer.

Install

Official releases

Official releases are available via pip install sevenbridges-cwl (This is the pypi entry for this project)

Development versions

To obtain unreleased versions:

  • git clone this repository
  • cd sevenbridges-cwl && pip install .

The master branch is for more stable code while develop is for cutting edge features being currently worked on

Docs

Complete documentation can be found here.

If you are interested in reviewing this documentation locally, clone this repository, position yourself in the docs directory and after installing requirements-dev.txt, invoke:

make html

Run Tests

In order to run tests clone this repository, position yourself in the root of the cloned project and, after installing requirements-dev.txt, invoke:

pytest

Examples

The following code will give a brief overview of what this package can offer through simple examples.

A Complete list of all examples can be found here.

Run workflow on a SevenBridges platform

from sbg import cwl


# First node
@cwl.to_tool(
    inputs=dict(x=cwl.String()),
    outputs=dict(out=cwl.Float(required=True)),
    docker='images.sbgenomics.com/filip_tubic/ubuntu1604py'
)
def to_float(x):
    return dict(out=float(x))


# Second node
@cwl.to_tool(
    inputs=dict(x=cwl.Float(), n=cwl.Int()),
    outputs=dict(out=cwl.Float()),
    docker='images.sbgenomics.com/filip_tubic/ubuntu1604py'
)
def times_n(x, n=10):
    return dict(out=x * n)


wf = cwl.Workflow()

# create tools
t1 = to_float()
t2 = times_n()

# steps
wf.add_step(t1, expose=['x'])
wf.add_step(t2, expose=['n', 'out'])

# add connections
wf.add_connection(f'{t1.id}.out', f'{t2.id}.x')

# Session on a SBG platform
session = cwl.Session(profile='<your_profile>')

session.run('<your_project>', wf, inputs={'x': '10.2'})

sevenbridges-cwl_uxmp's People

Contributors

filiptubic avatar trellixvulnteam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.