Skip to content

Instantly share code, notes, and snippets.

@timoast
timoast / _output.yml
Created April 1, 2017 14:20
bookdown _output.yml file
bookdown::gitbook:
css: style.css
config:
toc:
before: |
<li><strong><a href="./">Lab notebook</a></strong></li>
edit:
link: https://github.com/timoast/notebook/edit/master/%s
text: "Edit"
search: yes
#! /bin/sh
usage="$(basename "$0") -- build bookdown book
-h show help and exit
-a upload book to aws"
amazon=false # check options
while getopts "ah" opt; do
case $opt in
#! /usr/bin/env python
import MySQLdb
from argparse import ArgumentParser
import gzip
def add_table(options):
link = MySQLdb.connect(options.host, options.user, options.password)
cursor = link.cursor()
#! /usr/bin/env python
"""
extract_reads.py
Created by Tim Stuart
"""
import pysam
@timoast
timoast / mean_size.py
Last active December 8, 2022 09:12
Calculate paired-end insert size mean and standard deviation, excluding outliers.
#! /usr/local/bin/python2.7
"""
mean_size.py
Created by Tim Stuart
"""
import numpy as np
def get_data(inp):