Skip to content

Instantly share code, notes, and snippets.

View slowkow's full-sized avatar
🐄
moooooo

Kamil Slowikowski slowkow

🐄
moooooo
View GitHub Profile
@slowkow
slowkow / hg19.rRNA.interval_list
Last active April 9, 2023 14:56
Make a ribosomal RNA interval_list for Picard Tools CollectRnaSeqMetrics
@SQ SN:chrM LN:16571
@SQ SN:chr1 LN:249250621
@SQ SN:chr2 LN:243199373
@SQ SN:chr3 LN:198022430
@SQ SN:chr4 LN:191154276
@SQ SN:chr5 LN:180915260
@SQ SN:chr6 LN:171115067
@SQ SN:chr7 LN:159138663
@SQ SN:chr8 LN:146364022
@SQ SN:chr9 LN:141213431
@slowkow
slowkow / bash-cheatsheet.md
Last active January 19, 2022 10:47
Bash cheatsheet

Regular expression matching:

a=foobar
[[ "$a" =~ "^foo" ]] && echo "matches ^foo"

Array from a glob:

@slowkow
slowkow / fix_alleles.py
Last active July 27, 2016 13:27
Join multiple PLINK dosage files into one file.
#!/usr/bin/env python
"""
Kamil Slowikowski
fix_alleles.py
==============
Change the alleles in a dosage file to match the alleles specified in
a separate reference file. If a variant is not present in the reference file,
then it will not be changed.
@slowkow
slowkow / mygene.html
Last active August 29, 2015 14:07
Autocomplete genes with mygene.info and typeahead.js http://slowkow.com/2014/10/05/geneinfo-typeahead/
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="js/typeahead.bundle.min.js"></script>
@slowkow
slowkow / phred.md
Last active August 29, 2015 14:06
Illumina v1.8+ Phred base quality scores. https://plot.ly/~slowkow/2/

P is the probability of a base-call error.

Q P Symbol ASCII
1 0.79433 " 34
2 0.63096 # 35
3 0.50119 $ 36
4 0.39811 % 37
5 0.31623 & 38
6 0.25119 ' 39
@slowkow
slowkow / rnaseq-notes.md
Last active August 29, 2015 14:06
RNA-seq notes

RNA-Seq Notes

This document summarizes some of the distinguishing features of tools used to analyze RNA-Seq data.

Aligners:

| Name | Type | Algorithm | Links |

@slowkow
slowkow / connect-to-vpn.applescript
Last active March 11, 2022 16:24
Connect to VPN and type your password automatically
on ButtonClick(theObjectID)
tell application "System Events"
repeat until exists theObjectID
delay 0.5
end repeat
click theObjectID
end tell
end ButtonClick
set targetApp to "Cisco AnyConnect Secure Mobility Client"
@slowkow
slowkow / notify-toggle.sh
Last active August 15, 2017 08:18
Toggle notify-osd notifications, optionally toggle sound
#!/usr/bin/env bash
# notify-toggle.sh
# Kamil Slowikowski
# May 31, 2014
#
# Toggle libnotify notification bubbles that appear in the top-right corner
# of your screen.
# You can uncomment some lines to mute and unmute sound, too.
#
# Works on:
@slowkow
slowkow / Binomial-Probability-Mass-Function_Speed-Comparison.ipynb
Last active January 4, 2021 21:41
Implementations of the Binomial PMF in sympy, scipy, numpy, python, GSL, and C http://nbviewer.ipython.org/11504548
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@slowkow
slowkow / mycd.sh
Last active September 8, 2015 15:55 — forked from leipzig/mycd.sh
Record folder-specific history in `.dir_bash_history`
function cd_dir_history()
{
OLDPWD="$PWD"
echo "# $(date) $USER -> $@" >> "$HISTFILE"
command cd "$@"
# If this directory is writable then write to directory-based history file
# otherwise write history in the usual home-based history file.
touch "$PWD/.dir_bash_history" 2>/dev/null \