Skip to content

Instantly share code, notes, and snippets.

View p7k's full-sized avatar
🏠
Working from home

Pavel Katsev p7k

🏠
Working from home
View GitHub Profile
@p7k
p7k / __init__.py
Last active February 12, 2017 23:07
recipe as script simple sketch
import argparse
import functools
import inspect
import json
import sys
def recipe_inputs(schema, kw='inputs'):
def decorator(recipe_func):
@functools.wraps(recipe_func)
@p7k
p7k / voluptuous.xor.py
Created May 23, 2018 04:56
xor gate in voluptuous
def xor(fields, group_name):
"""Creates an Exclusive OR (XOR) logical gate voluptuous schema.
see https://github.com/alecthomas/voluptuous/issues/126
:param fields: fields comprising the exclusive group.
:type fields: Dict[str, Schema]
:param group_name: exclusive group identifier.
:type group_name: str
:returns: XOR gated voluptuous schema.
"""Translate a Tandem Repeat Finder file into a bed file containing
annotated repeat intervals.
> This file is a text file which contains the same information, in the same
order, as the summary table file, plus consensus pattern and repeat sequences
http://tandem.bu.edu/trf/trf.definitions.html#table
"""
from __future__ import division