This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include <getopt.h> | |
#include <unistd.h> | |
#include <inttypes.h> | |
#include <htslib/vcf.h> | |
#include "bcftools.h" | |
#include "version.c" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hts | |
import docopt | |
from sequtils import toSeq | |
from strutils import parseInt, join | |
let doc = """ | |
Bin and tabulate FORMAT data for each VCF record. | |
Usage: | |
tabulate_fmt (-h | --help) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_samstats <- function(file) { | |
max.col <- max(count.fields(file, sep = "\t")) | |
stats.prefixes <- read.table(file, col.names = seq(max.col), | |
colClasses=c("character", rep("NULL", max.col-1)), | |
fill=TRUE) | |
stats.nrows <- table(stats.prefixes)[unique(stats.prefixes)[,1]] | |
stopifnot(unlist( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
""" | |
A simple HTTP server for downloading MOBI files from Instapaper | |
In addition to username, password, a list of folder names and ids | |
must be provided to access Instapaper folders. These IDs may be | |
found in instapaper folder URLs, e.g. | |
https://www.instapaper.com/u/folder/(id)/(name) | |
Leave the id to `None` to reach the home Instapaper folder | |
USAGE: kinstapaper.py [-h] USERNAME PASSWORD ... | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
hi_color=$(tput setaf 4) #blue | |
bold=$(tput bold) | |
underline=$(tput smul) | |
normal=$(tput sgr0) | |
read -r -d '' usage << DOC | |
Prints out a table of tmux sessons, windows, and panels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
""" | |
A simple Burrows-Wheeler transform function in python. | |
Algorithm presented in: | |
Burrows M, Wheeler DJ: A Block Sorting Lossless Data Compression Algorithm. | |
Technical Report 124. Palo Alto, CA: Digital Equipment Corporation; 1994. | |
USAGE: bwt.py [-h] [-i INDEX] STRING | |
""" |