This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
bed_from_genbank.py | |
grab the gene records from a genbank file (edit for other record types). | |
- requires: biopython | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
############################################################################## | |
# Following functions have been taken from the DendroPy library from: | |
## | |
## DendroPy Phylogenetic Computing Library. | |
## | |
## Copyright 2010 Jeet Sukumaran and Mark T. Holder. | |
## All rights reserved. | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsync -av rsync://ftp.ncbi.nlm.nih.gov/genomes/Bacteria --include "*/" --include "Bacteria/Escherichia*/*.fna" --exclude=* . | |
# bonus script - concatenate chromosomes and plasmids into single fasta file, make sure the files don't already exist | |
find . -mindepth 1 -type d | xargs -L 1 -I '{}' find {} -name "*.fna" | while read i ; do cat "$i" >> `dirname "$i"`.fasta ; done | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
simple example script for running and testing notebook resulting in a new workbook. | |
Usage: `ipnbdoctest.py foo.ipynb foo_new.ipynb` | |
Each cell is submitted to the kernel, and the outputs are compared with those stored in the notebook. | |
""" | |
import io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
doc = """ | |
Quickly estimates insert sizes of read datasets, given some sequence(s) they can be mapped to. | |
Author: Rayan Chikhi | |
short usage: <reference> <*.fastq> | |
example: | |
estimate-insert-sizes contigs.fa readsA_1.fq readsA_2.fq readsB_1.fq readsB_2.fq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numbers | |
import six | |
import numpy | |
import matplotlib.collections | |
from matplotlib import pyplot | |
# using example from | |
# http://nbviewer.ipython.org/github/dpsanders/matplotlib-examples/blob/master/colorline.ipynb |