Skip to content

Instantly share code, notes, and snippets.

@kgori
kgori / gist:9638521
Created March 19, 2014 09:39
demo ipython notebook
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@kgori
kgori / simpleEx.orthoxml
Last active August 29, 2015 13:57
FamilyAnalyzer example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kgori
kgori / axml.c
Last active August 29, 2015 13:57
Ambiguity codes in phyml and raxml
// RAXML code for setting up likelihood tip vectors for different characters
//TGCA - notes added KG
meaningDNA['A'] = 1; //0001
meaningDNA['B'] = 14; //1110
meaningDNA['C'] = 2; //0010
meaningDNA['D'] = 13; //1101
meaningDNA['G'] = 4; //0100
meaningDNA['H'] = 11; //1011
meaningDNA['K'] = 12; //1100
meaningDNA['M'] = 3; //0011
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@kgori
kgori / mem_alloc_patch
Created May 18, 2014 20:26
Patch for building libpll on Mac: mem_alloc.h
diff --git a/src/mem_alloc.h b/src/mem_alloc.h
index 4dc4ce7..88828e0 100644
--- a/src/mem_alloc.h
+++ b/src/mem_alloc.h
@@ -2,7 +2,9 @@
#define __mem_alloc_h
#include <stddef.h>
#include <stdlib.h>
+#ifdef __linux__
#include <malloc.h>
@kgori
kgori / bpp-core_Exceptions_patch
Created July 6, 2014 22:10
bpp-core2.1.0_patch
diff --git a/src/Bpp/Exceptions.h b/src/Bpp/Exceptions.h
index 2ac2c53..ce62920 100644
--- a/src/Bpp/Exceptions.h
+++ b/src/Bpp/Exceptions.h
@@ -44,6 +44,7 @@ knowledge of the CeCILL license and that you accept its terms.
#include <stdexcept>
#include <vector>
+#include <string>
@kgori
kgori / dna.tree
Created August 1, 2014 17:01
PLL_partition_segfault_example
(cal:0.1,ctr:0.1,(lel:0.1,(pst:0.1,((dha:0.1,pgu:0.1):0.1,(yli:0.1,((cgl:0.1,(sca:0.1,(sba:0.1,(sku:0.1,(smi:0.1,(sce:0.1,spa:0.1):0.1):0.1):0.1):0.1):0.1):0.1,((kwa:0.1,skl:0.1):0.1,(ago:0.1,kla:0.1):0.1):0.1):0.1):0.1):0.1):0.1):0.1);
@kgori
kgori / LG08_model.py
Created October 1, 2014 15:38
PyCogent model specification for Le and Gascuel LG08 model
import numpy
from cogent.evolve import substitution_model
LG08_freqs = {
'A': 0.079066, 'C': 0.012937,
'D': 0.053052, 'E': 0.071586,
'F': 0.042302, 'G': 0.057337,
'H': 0.022355, 'I': 0.062157,
@kgori
kgori / pll_patch
Created October 7, 2014 17:34
pll patch
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@
AC_PREREQ([2.68])
AC_INIT([libpll], [1.0.0], [Tomas.Flouri@h-its.org])
AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
# -*- coding: utf-8 -*-
from __future__ import print_function
try:
from setuptools import setup, find_packages, Extension
except ImportError:
from distutils.core import setup, Extension
def find_packages():
return ['treeCl']
try:
from Cython.Distutils import build_ext