I hereby claim:
- I am andreas-wilm on github.
- I am andreaswilm (https://keybase.io/andreaswilm) on keybase.
- I have a public key ASCHyaZnBYiR0MNExSduKh5LsVgFwldPfSI1mnHKOYKDZAo
To claim this, I am signing this object:
| #!/usr/bin/env nextflow | |
| /* this is a minimal working example for a bug we recently ran into. | |
| * in a nutshell: we can function (gen_sample_map_str) in every call to | |
| * process GenomicsDB. * the function has static input and should | |
| * produce identical output each time, but it doesn't. the question is | |
| * why. | |
| * | |
| * yes, we can do tihs different, i.e. construct the string once and yes | |
| * some things don't make sense in this current minimalistic form. |
I hereby claim:
To claim this, I am signing this object:
| set -euo pipefail | |
| VERSION=2.4.2 | |
| pushd /tmp/ | |
| wget https://github.com/singularityware/singularity/releases/download/$VERSION/singularity-$VERSION.tar.gz | |
| tar xzf singularity-${VERSION}.tar.gz | |
| cd singularity-${VERSION} | |
| ./configure --prefix=/usr/local | |
| make |
| # found at #nfhack17 | |
| dig +short myip.opendns.com @resolver1.opendns.com |
| #!/usr/bin/env python | |
| # Example for using repeateable -v and -q for setting logging level | |
| # with argparse. works with python 2 and 3. based on | |
| # https://www.reddit.com/r/Python/comments/3nctlm/what_python_tools_should_i_be_using_on_every/ | |
| # | |
| # masklinn: """A trick I like is using repeatable -v and -q to select | |
| # the logging level. The logging levels are actually integers with a | |
| # 10 increment (DEBUG is 10, CRITICAL is 50). It's very easy with | |
| # argparse's count action or click's count=True""" |
| from math import log | |
| from scipy import stats | |
| def fisher_comb(pv1, pv2): | |
| """ | |
| Fisher's method for combining p-values: | |
| https://en.wikipedia.org/wiki/Fisher's_method | |
| See for example breseq-0.18b:polymorphism_statistics.r | |
| from datetime import datetime | |
| def timestamp(): | |
| return datetime.now().isoformat() |
| # assuming: | |
| # - refsq is set and always the same | |
| # - bamfh is an open pysam samfile | |
| for r in bamfh: | |
| if r.is_unmapped: | |
| continue | |
| for (qapos, rpos) in r.get_aligned_pairs(): | |
| # qapos is the aligned index, i.e. this ignores clipping. add that |
| /* -*- c-file-style: "k&r"; indent-tabs-mode: nil; -*- */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| /* returns a timestamp in the form of YYYY-mm-dd HH-MM. | |
| * buf needs to be able to hold 19+1 characters (incl. \0). | |
| * returns 0 on success -1 otherwise. | |
| */ |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # use the colorblind friendly colors | |
| # https://code.google.com/p/python-cudtools/source/browse/cudtools.py | |
| import cudtools | |
| numlines = 20 | |