Skip to content

Instantly share code, notes, and snippets.

View jfeala's full-sized avatar

Jake Feala jfeala

View GitHub Profile
@jfeala
jfeala / cgquery.py
Last active August 29, 2015 14:25
Mounting and caching snippets of BAM files using GTFuse
import requests
import json
from os.path import join
CGHUB_API_ENDPOINT = 'https://cghub.ucsc.edu/cghub/metadata'
SAMPLE_MAPPING = {'tumor': ['0' + str(i) for i in range(1,10)],
'normal': ['1' + str(i) for i in range(5)]}
LIBRARY_MAPPING = {'dna': 'DNA-Seq', 'rna': 'RNA-Seq', 'mirna': 'miRNA-Seq'}
def cgquery(full_details=False, **query_dict):
@jfeala
jfeala / ecs.py
Created September 15, 2015 11:36
Luigi and Amazon EC2 Container Service (ECS)
import time
import logging
import boto3
import luigi
POLL_TIME = 2
client = boto3.client('ecs')
logger = logging.getLogger('luigi-interface')
@jfeala
jfeala / pipeline.py
Created February 7, 2017 02:48
Airtable API update from simple samtools command
import os
from subprocess import check_output
from tempfile import mkstemp
import sys
import boto3
import requests
s3 = boto3.client('s3')
@jfeala
jfeala / batch.py
Created April 18, 2017 12:33
AWS Batch wrapper for Luigi
"""
AWS Batch wrapper for Luigi
From the AWS website:
AWS Batch enables you to run batch computing workloads on the AWS Cloud.
Batch computing is a common way for developers, scientists, and engineers
to access large amounts of compute resources, and AWS Batch removes the
undifferentiated heavy lifting of configuring and managing the required