Giter Site home page Giter Site logo

broadinstitute / cromwell-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from notestaff/cromwell-client

0.0 2.0 0.0 940 KB

Client for the Cromwell workflow engine

License: Mozilla Public License 2.0

Scala 99.43% WDL 0.13% Shell 0.12% Dockerfile 0.31%

cromwell-client's Introduction

This repository contains two projects:

  • cromwell-client - a client library that interacts with Cromwell workflow engine from Java or browser
  • _cromwell-web _ - a simple UI for running Cromwell workflows in the browser

Cromwell-Web

Cromwell-web subproject is a simple UI for accessing cromwell REST API. To run it open sbt console and go to CromwellWebJVM subproject and type

reStart

It is also published as a Docker container. You can run it as:

docker run -p 8001:8001 quay.io/comp-bio-aging/cromwell-web:0.3.1

Screenshot

Services

You can start cromwell, mysql and cromwell-client altogether by starting a docker stack:

cd services
stack deploy -c docker-compose.yml cromwell

Make sure that you have docker swarm initialized ( https://docs.docker.com/engine/reference/commandline/swarm_init/ ) on your machine before deploying the stack You can also use docker-compose instead of docker swarm.

cromwell-client

Scala/ScalaJS Client for the Cromwell workflow engine. This is a work-in-progress, not all methods have been implemented and no tests yet.

Adding to dependencies

add the following to you build.sbt

resolvers += sbt.Resolver.bintrayRepo("comp-bio-aging", "main")
libraryDependencies += "group.research.aging" %%% "cromwell-client" % "0.3.0"

Usage

Here are examples of the usage.

Get all metadataabout existing workflows:

import group.research.aging.cromwell.client._
val client = CromwellClient.localhost //or put with url of the cromwell server
val workflowsInfo: IO[List[Metadata]] = client.getAllMetadata()
//if you want to get as a Future
val workflowsInfoAsFuture: Future[List[Metadata]] = workflowsInfo.unsafeToFuture()
//if you want to get as a plain result (blocking)
val workflowsInfoBlocking: Seq[Metadata] = workflowsInfo.unsafeRunSync()

Note: in many methods IO monad is returned that can be easily turned into Future or plain (blocking) result.

Run workflow and get its status:

import java.io.{File => JFile}
import better.files._
import group.research.aging.cromwell.client._
import scala.concurrent.Future

val client = CromwellClient.localhost

val workflow = File("/data/sources/rna-seq/pipelines/quantification/quantification.wdl")
val inputs = File("/data/sources/rna-seq/pipelines/quantification/inputs/worms.json")
val result = client.postWorkflowFiles(workflow, inputs)

Get the outputs by the id:

import group.research.aging.cromwell.client._
val client = CromwellClient.localhost
val id = "548a191d-deaf-4ad8-9c9c-9083b6ecbff8"
val outputs = client.getOutputs(id)

CromwellWeb REST API

Cromwell Web also allows has some REST API to run bioinformatic workflows. It is similar to cromwell and call cromwell server underneath /api/ shows swagger interface with docs.

http://localhost:8001/api/all
http://localhost:8001/api/run/<workflows_name>/

cromwell-client's People

Contributors

antonkulaga avatar

Watchers

James Cloos avatar  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.