Skip to content

Instantly share code, notes, and snippets.

@lukauskas
lukauskas / multipies.md
Last active August 28, 2019 09:51
Multiple Pie Charts
%config InlineBackend.figure_format = 'retina'
%matplotlib inline

from matplotlib import pyplot as plt
PIE_SLICES = [
    [10, 20, 30, 40], # Pie 1 (arbitrary units, matplotlib will transform them to pct total.)
    [1, 1, 2, 2], # Pie 2
    [0.1, 0.8, 0.1], # Pie 3
]
@lukauskas
lukauskas / multipies.md
Created August 28, 2019 09:50
Multiple Pie Charts
%config InlineBackend.figure_format = 'retina'
%matplotlib inline

from matplotlib import pyplot as plt
PIE_SLICES = [
    [10, 20, 30, 40], # Pie 1 (arbitrary units, matplotlib will transform them to pct total.)
    [1, 1, 2, 2], # Pie 2
    [0.1, 0.8, 0.1], # Pie 3
]
@lukauskas
lukauskas / multipies.md
Created August 28, 2019 09:50
Multiple Pie Charts
%config InlineBackend.figure_format = 'retina'
%matplotlib inline

from matplotlib import pyplot as plt
PIE_SLICES = [
    [10, 20, 30, 40], # Pie 1 (arbitrary units, matplotlib will transform them to pct total.)
    [1, 1, 2, 2], # Pie 2
    [0.1, 0.8, 0.1], # Pie 3
]
@lukauskas
lukauskas / precrec.py
Created August 21, 2018 08:45
Wrapper around R's precrec package
from rpy2.robjects import pandas2ri
from rpy2.robjects.packages import importr
import rpy2.robjects
import fa2
import gc
import pandas as pd
import numpy as np
#!/bin/bash
qstat -u '*' -ext
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lukauskas
lukauskas / snippets.md
Last active November 24, 2021 17:10
Code-snippets that I google every day.

Initialisation of notebook (suitable for print)

%config InlineBackend.figure_format = 'retina'
%matplotlib inline
import os
import pandas as pd
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
@lukauskas
lukauskas / phantompeakqualtools-git.PKGBUILD
Last active March 16, 2017 18:12
PKGBUILD for phantompeakqualtoools git version
# This doesn't work nicely as it uses bioclite to install dependdencies
# which is why I'm not submitting it to AUR
# but it's useful if one compiles it themselves.
pkgname=phantompeakqualtools-git
pkgver=r30.b9267ea
pkgrel=1
pkgdesc="Computes quick but highly informative enrichment and quality measures for ChIP-seq/DNase-seq/FAIRE-seq/MNase-seq data. It can also be used to obtain robust estimates of the predominant fragment length or characteristic tag shift values in these assays."
arch=('i686' 'x86_64')
url="https://github.com/kundajelab/phantompeakqualtools"