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 / gists.py
Created April 2, 2014 03:38
Print an HTML list of your gists
#!/usr/bin/env python
"""
gists.py
Kamil Slowikowski
April 1, 2014
Print an HTML list of your gists:
./gists.py
@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 / 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 / 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 / biosample2tsv.xsl
Last active August 29, 2015 14:13
Transform Biosample XML to TSV.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output omit-xml-declaration="yes" />
<!--
Transform biosample XML to TSV.
Usage: xsltproc biosample2tsv.xsl input.xml > output.tsv
-->
<xsl:template match="/">GEO<xsl:text>&#x9;</xsl:text>Title<xsl:text>&#x9;</xsl:text>CellLine<xsl:text>&#x9;</xsl:text>CellType<xsl:text>&#x9;</xsl:text>CdnaMethod<xsl:text>&#10;</xsl:text>
<xsl:for-each select="//BioSample">
@slowkow
slowkow / make_aspera_manifest.sh
Created April 24, 2015 20:03
Make a manifest file for Aspera.
#!/usr/bin/env bash
# make_aspera_manifest.sh
# Kamil Slowikowski
#
# Make a manifest file suitable for Aspera.
#
# Example
# -------
#
# Suppose we wish to send a folder full of files called "data". We want
@slowkow
slowkow / toggle-trackpoint.sh
Created July 7, 2015 00:00
Toggle IBM TrackPoint in Ubuntu
#!/usr/bin/env bash
# toggle-trackpoint.sh
set -uoe pipefail
# xinput list
# ⎡ Virtual core pointer id=2 [master pointer (3)]
# ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
# ⎜ ↳ SynPS/2 Synaptics TouchPad id=14 [slave pointer (2)]
@slowkow
slowkow / drop_long_skipped_reads.sh
Created July 20, 2015 19:05
Drop reads with long skipped regions.
#!/usr/bin/env bash
# drop_long_skipped_reads.sh
# Kamil Slowikowski
# July 19, 2015
#
# Drop reads from a BAM file if they have long skipped regions.
#
# Example:
#
# ./drop_long_skipped_reads.sh FILE.bam 1000000
@slowkow
slowkow / RUVSeq_makeGroups.R
Created July 28, 2015 18:55
Make a matrix indicating which samples are replicates.
#' Make a matrix suitable for use with RUVSeq methods such as RUVs().
#'
#' Each row in the returned matrix corresponds to a set of replicate samples.
#' The number of columns is the size of the largest set of replicates; rows for
#' smaller sets are padded with -1 values.
#'
#' @param xs A vector indicating membership in a group.
#' @seealso RUVSeq::RUVs
#' @example
#' makeGroups(c("A","B","B","C","C","D","D","D","A"))