This file contains hidden or 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/python | |
usage = """ | |
Ensures start/stop coords in a BED file are integers | |
and not in exponential notation (like 9.3e+07) | |
Usage: | |
python fix_coords.py input.bed > fixed.bed | |
""" | |
import sys |
This file contains hidden or 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
""" | |
Clicking the indicated point on the left-hand side causes the indicated point on the top right to | |
be highlighted. Adding 0.1 to the x-value of the left-hand side one seems to alleviate this | |
problem -- but not adding 0.01. | |
""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
x = np.array([-0.58178965, |
This file contains hidden or 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
""" | |
PWMSearch | |
Searches through a fasta sequence for the relevant Position Weight Matrices | |
from the Jaspar Database. | |
""" | |
from __future__ import division | |
from optparse import OptionParser |
This file contains hidden or 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/python | |
# GPLv3 license | |
# Copyright 2011 Ryan Dale, all rights reserved | |
# [email protected] | |
import HTSeq | |
import argparse | |
import sys | |
import time |
This file contains hidden or 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
sudo apt-get install libtool | |
git clone git://dnaa.git.sourceforge.net/gitroot/dnaa/dnaa dnaa-git | |
cd dnaa-git | |
# bfast required. see above gist | |
cp -r ../bfast-git ./bfast | |
# samtools require. see above gist. | |
cp -r ../samtools-svn/ ./samtools | |
sh autogen.sh && ./configure && make && sudo make install |
This file contains hidden or 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/python | |
""" | |
- Submit example data to REVIGO server (http://revigo.irb.hr/) | |
- Download and run R script for creating the treemap | |
- Download and run R script for creating the scatterplot | |
Creates files: | |
treemap.R, treemap.Rout, revigo_treemap.pdf | |
scatter.R, scatter.Rout, revigo_scatter.pdf |
This file contains hidden or 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 sys | |
from gffutils.helpers import DefaultOrderedDict | |
from collections import defaultdict | |
from collections import OrderedDict | |
import random | |
kind = sys.argv[1] | |
nlines = 200000 | |
nkeys = 5 |
This file contains hidden or 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 numpy as np | |
import logging | |
logging.basicConfig(format='%(message)s', level=logging.DEBUG) | |
class Merger(object): | |
def __init__(self, bin_size=5, diff_thresh=0.3, | |
start_thresh=5., extend_thresh=3.): | |
""" | |
Implements the merging alrogithm described in [1] for a NumPy array. |
This file contains hidden or 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
# From http://www.biostars.org/p/83800/: | |
# "What I want to do is to plot reads of my histone marks (in bam file) | |
# around TSS with CpG and TSS without CpG (Essentially a coverage profile)." | |
# | |
# | |
# To install metaseq and dependencies, see: | |
# | |
# | |
# https://pythonhosted.org/metaseq/install.html |
This file contains hidden or 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 gffutils | |
import datetime | |
# Annotations from: | |
# ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_19/gencode.v19.annotation.gtf.gz | |
v19gff = 'gencode.v19.annotation.gtf' | |
v19db_filename = v19gff + '.db' | |
gene_transcript = set(('gene', 'transcript')) |
OlderNewer