Skip to content

Instantly share code, notes, and snippets.

View stephenturner's full-sized avatar

Stephen Turner stephenturner

View GitHub Profile
library(tidyverse)
d <- tibble::tribble(
~disease, ~gene, ~chr, ~inheritance,
"flu", "x", 1L, "infectious",
"flu", "y", 2L, "infectious",
"flu", "z", 3L, "infectious",
"aids", "x", 1L, "st",
"aids", "p", 4L, "st"
) %>% print()
// ==UserScript==
// @name Use My Amazon Affiliate Code
// @namespace http://www.lysator.liu.se/~jhs/userscript
// @description Puts your own Amazon affiliate ID in Amazon links
// @include http://*
// @include https://*
// ==/UserScript==
// leave intact to sponsor my scripting, or set to your own:
const affiliate = 'gettgenedone-20';

This list is outdated. This post has a list of bioinformatics/genomics/genetics workshops and training materials that I haven't updated since 2015.


In-person courses

Note that many of the courses shown below also have course materials from past years publicly available online.

Cold Spring Harbor Courses:

conda create -n gdc python=2.7 libxml2 libxslt libffi gcc progressbar
source activate gdc
git clone https://github.com/NCI-GDC/gdc-client
cd gdc-client
python setup.py install
This file has been truncated, but you can view the full file.
SNP CHR BP P
rs3094315 1 752566 0.5571
rs3131972 1 752721 0.4664
rs12562034 1 768448 0.7376
rs12124819 1 776546 0.6662
rs11240777 1 798959 0.9756
rs6681049 1 800007 0.9759
rs4970383 1 838555 0.2906
rs4475691 1 846808 0.07047
rs7537756 1 854250 0.04206
#!/usr/bin/python
import sys
header=True
for line in sys.stdin:
if line.startswith('##'):
if header:
print line.strip()
continue
@stephenturner
stephenturner / keybindings.json
Created May 31, 2017 21:04
VSCode keybindings to replicate my most commonly used RStudio shortcuts (Mac)
// Place your key bindings in this file to overwrite the defaults
[
// RStudio: Copy lines up/down with alt+cmd+up/down
{
"key": "alt+cmd+down",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+down",
@stephenturner
stephenturner / sublime-keybindings.txt
Last active February 14, 2017 15:07
keybindings for sublime text 3
[
// Auto-pair backticks
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[`a-zA-Z0-9_]$", "match_all": true },
{ "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true }
]
@stephenturner
stephenturner / clickable-imgs.js
Created September 29, 2016 15:06 — forked from bearloga/clickable-imgs.js
Make the figures click-able in your RMarkdown=>HTML reports.
<script language="JavaScript">
$(function() {
/* Lets the user click on the images to view them in full resolution. */
$("div.figure img").wrap(function() {
var link = $('<a/>');
link.attr('href', $(this).attr('src'));
link.attr('title', $(this).attr('alt'));
link.attr('target', '_blank');
return link;
});
## devtools::install_github("stephenturner/msigdf")
library(msigdf)
library(dplyr)
library(clusterProfiler)
c2 <- msigdf.human %>%
filter(collection == "c2") %>% select(geneset, entrez) %>% as.data.frame
data(geneList)
de <- names(geneList)[1:100]