View stocks.py
import html
import requests
from bs4 import BeautifulSoup
def boolify(s):
if s == 'True':
return True
if s == 'False':
return False
raise ValueError("huh?")
View packages
✔ Alignment | ✔ Anaconda
✔ ayu | ✔ Color Highlighter
✔ Gist | ✔ Git
✔ GitGutter | ✔ Jinja2
✔ LESS | ✔ MarkdownEditing
✔ Package Control | ✔ PackagesUI
✔ Pretty JSON | ✔ Python 3
✔ Python Improved | ✔ rainbow_csv
✔ Se
View gist:5add33abe559a89c4a53b6b19013a1de
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
sudo /usr/libexec/locate.updatedb
View pyenv.sublime-build
{
"cmd": ["/usr/local/var/pyenv/shims/python", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
View summarize_vcf.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Author: Daniel E. Cook
This script summarizes variation for samples.
"""
import sys
View rarefaction.R
library(tidyverse)
# bcftools query -f "[%GT\t]\n" WI.20170531.impute.vcf.gz | awk '{ gsub(":GT", "", $0); gsub("(# )?\[[0-9]+\]","",$0); print $0 }' | sed 's/0|0/0/g' | sed 's/1|1/1/g' | sed 's/0|1/NA/g' | sed 's/1|0/NA/g' | head -n 1000000 | gzip > ~/Desktop/impute_gts.test.tsv.gz
df_use <- tseries::read.matrix(gzfile("~/Desktop/impute_gts.tsv.gz"))
storage.mode(df_use) <- "logical"
# cols
View gist:a2061ea53a6f2fe1b5f1bec5286dccdc
# OUT PUT FILES::::
# elegans_transcript_WS258.bed ( COMES FROM /elegans_genes_WS258.bb )
# elegans_gene_WS258.bed (remember; comes from GFF3)
# FASTA! c_elegans.PRJNA13758.WS245.genomic.fa (ftp://ftp.wormbase.org/pub/wormbase/releases/WS258/species/c_elegans/PRJNA13758/)
# Download gene file
wget ftp://ftp.wormbase.org/pub/wormbase/releases/WS258/MULTI_SPECIES/hub/elegans/elegans_genes_WS258.bb
# Bit of a misnomer --> These are transcripts
BigBedToBed elegans_genes_WS258.bb elegans_transcripts_WS258.bed
View swot.py
import os
import shutil
import pickle
from subprocess import Popen, PIPE
from collections import defaultdict
out, err = Popen(['git','clone','https://github.com/leereilly/swot'],
stdout=PIPE,
stderr=PIPE).communicate()
school_directory = defaultdict()
View pyenv.sublime-build
{
"shell_cmd": "`pyenv which python` -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}