ohsu-comp-bio/tesseract

Name: tesseract

Owner: Oregon Health and Science University Computational Biology

Description: Python lib for remote code execution via the GA4GH TES API

Created: 2017-07-14 00:26:49.0

Updated: 2017-11-10 02:20:38.0

Pushed: 2017-11-22 22:18:28.0

Homepage:

Size: 65

Language: Python

GitHub Committers

UserMost Recent Commit# Commits
Kyle Ellrott2017-10-31 23:35:35.03
Adam Struck2018-01-16 21:41:06.043

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status Coverage Status License: MIT

tesseract

tesseract is a library that enables the remote execution of python code on systems implementing the GA4GH Task Execution API.

Quick Start
 __future__ import print_function

 tesseract import Tesseract, FileStore


identity(n):
return n


say_hello(a, b):
return "hello " + identity(a) + b


 FileStore("./test_store/")
Tesseract(fs, "http://localhost:8000")
th_resources(
cpu_cores=1, ram_gb=4, disk_gb=None, 
docker="python:2.7", libraries=["cloudpickle"]


re = r.run(say_hello, "world", b="!")
lt = future.result()
t(result)

 r.clone().with_resources(cpu_cores=4)
 r2.run(say_hello, "more", b="cpus!")
 f2.result()
t(r2)
Object store support

If you provide a swift, s3, or gs bucket url to your FileStore tesseract_ will attempt to automatically detect your credentials for each of these systems.

To setup your environment for this run the following commands:

Input files

If your function expects input files to be available at a given path then add:

th_input("s3://your-bucket/path/to/yourfile.txt", "/home/ubuntu/yourfile.txt")

The first argument specifies where the file is available, the second specifies where your function will expect to find the file.

Output files

If your function generates files during its run you can specify these files as shown below and tesseract will handle getting them uploaded to the designated bucket.

th_output("./relative/path/to/outputfile.txt")
Resources

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.