Skip to content

Instantly share code, notes, and snippets.

View fomightez's full-sized avatar

Wayne's Bioinformatics Code Portal fomightez

View GitHub Profile
@fomightez
fomightez / bio_align.py
Created June 6, 2016 13:56 — forked from JoaoRodrigues/bio_align.py
Sequence-based structure alignment of protein structures with Biopython
#!/usr/bin/env python
"""
Sequence-based structural alignment of two proteins.
"""
from __future__ import print_function, division
import argparse
import os
@fomightez
fomightez / diff.py
Created December 16, 2015 16:09 — forked from jorendorff/diff.py
A primitive `diff` in 50 lines of Python. Explained here: http://pynash.org/2013/02/26/diff-in-50-lines.html
""" Usage: python diff.py FILE1 FILE2
A primitive `diff` in 50 lines of Python.
Explained here: http://pynash.org/2013/02/26/diff-in-50-lines.html
"""
def longest_matching_slice(a, a0, a1, b, b0, b1):
sa, sb, n = a0, b0, 0
runs = {}