Skip to content

Instantly share code, notes, and snippets.

View ngcrawford's full-sized avatar

Nick Crawford ngcrawford

View GitHub Profile
@ngcrawford
ngcrawford / interleave_fastq.py
Last active March 8, 2021 19:15
Interleave paired end fastq files
#!/usr/bin/env python
# encoding: utf-8
import sys
import argparse
def interface():
parser = argparse.ArgumentParser()
parser.add_argument('--rm-short-reads',
@ngcrawford
ngcrawford / topology_test.py
Created October 6, 2011 15:51
Dendropy Tree/Subtree test
def topology_test(tree, query_tree, symmetric_distance=False):
"""Given a tree and a query tree this function tests if the query tree is present or identical to the
tree. If 'symmetric_distance' is set to True the symmetric distance of the query tree to the relavent taxa in the
tree is returned.
Both trees should be tree objects and contain idential taxon labels.
Examples:
--------