Skip to content

Instantly share code, notes, and snippets.

@kgori
kgori / biopython--concatenate.ipynb
Created June 17, 2015 11:51
Concatenate alignments with biopython
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.
@kgori
kgori / search_algo_patch
Last active August 29, 2015 14:21
Patch searchAlgo.c
diff --git a/src/searchAlgo.c b/src/searchAlgo.c
index c0547b0..3c1a578 100644
--- a/src/searchAlgo.c
+++ b/src/searchAlgo.c
@@ -2711,7 +2711,7 @@ pllComputeTBR (pllInstance * tr, partitionList * pr, nodeptr p, int mintrav,
@return
The likelihood yielded from the NNI
*/
-static double
+double
@kgori
kgori / pll_h_patch
Last active August 29, 2015 14:21
pll.h patch
diff --git a/src/pll.h b/src/pll.h
index 6941efb..572179c 100644
--- a/src/pll.h
+++ b/src/pll.h
@@ -123,7 +123,7 @@ extern "C" {
#define PLL_BADREAR -1
-#define PLL_NUM_BRANCHES 50
+#define PLL_NUM_BRANCHES 5000
@kgori
kgori / parse_orthoxml.ipynb
Created March 10, 2015 14:07
Parse OrthoXML
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kgori
kgori / gene_tree_tracer_example.ipynb
Created March 10, 2015 13:37
gene_tree_tracer_example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kgori
kgori / pll.c
Created November 11, 2014 15:37
Basic tree builder using PLL, outputs all parameters
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <pll/pll.h>
#define EXIT_NO_OVERWRITE 4
#define EXIT_INCOMPATIBLE_TREE_ALIGNMENT 3
#define EXIT_PARTITIONS_PARSE_FAILURE 2
#define EXIT_ALIGNMENT_PARSE_FAILURE 1
#define EXIT_SUCCESS 0
# -*- 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
@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])
@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,