Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
""" | |
Reads a FastQ file from stdin and writes a file with unique records to sdout | |
usage: | |
%s < in.fastq > out.unique.fastq | |
see: http://hackmap.blogspot.com/2010/10/bloom-filter-ing-repeated-reads.html | |
""" | |
from bloomfaster import Elf | |
import collections | |
import sys |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg | |
$ sudo chown -R `whoami` /usr/local/texlive | |
$ tlmgr update --self | |
$ tlmgr install ucs | |
$ tlmgr install etoolbox | |
# Install pandoc view homebrew |
##################### | |
# R function for downloading plain-text data from GitHub | |
# Christopher Gandrud | |
# 7 January 2013 | |
##################### | |
# source_GitHubData is directly based on source_url from the Hadley Wickham's devtools package | |
source_GitHubData <-function(url, sep = ",", header = TRUE) | |
{ |
#!/usr/local/bin/perl | |
# | |
# | |
# Perl script find_closest_worm_paralogs4.pl | |
# Written by Avril Coghlan ([email protected]) | |
# 16-Feb-09. | |
# | |
# This perl script finds the bootstrap value for the | |
# clade containing a pair of C. elegans paralogs in a family (where | |
# there is no other gene in that clade, ie. they are each other's |