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
""" | |
08 Nov 2012 | |
""" | |
from string import maketrans | |
REV = maketrans('ATGC', 'TACG') |
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
from math import log, exp | |
def ascii_plot (ydata, xdata=None, logscale=False, pch='o', title='plot', | |
xlabel='X', ylabel='Y', width=72, height=50): | |
""" | |
Curve (ASCII format). | |
:param ydata: list of values to be plotted | |
:param None xdata: x coordinate corresponding to ydata. If None will range |
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
from matplotlib import pyplot as plt | |
import numpy as np | |
def dist_sort(dists, ext=None, done=None, verbose=False): | |
""" | |
sort keys of an input dictionary of dictionaries (half matrix of distances) | |
put closest together | |
:param None ext: used by the recursion, first and last value of ordered list | |
:param None done: used by the recursion, ordered list of keys |
![figure_1.png](https://gist.github.com/fransua/3a0991b6d2c72cf7a8e1/raw/2346d2d044c6161c2887866fa1e23528f3b08ce1/figure_1.png)
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
from matplotlib import pyplot as plt | |
import numpy as np | |
from itertools import izip_longest | |
def seq_logo(seqs, title='', axe=None, quality=1, plot=True, ylim=(0, 2), lwmodif=1.25, | |
errorbar=True, savefig=None): | |
""" | |
Draw a sequence motif according to an input list of sequences, | |
https://en.wikipedia.org/wiki/Sequence_logo | |
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
from itertools import chain | |
from matplotlib.collections import LineCollection | |
from matplotlib import markers | |
from matplotlib.path import Path | |
import numpy as np | |
from ete3 import Tree, NodeStyle |
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
from matplotlib.collections import LineCollection | |
from matplotlib.colors import to_rgb | |
from matplotlib import pyplot as plt | |
import numpy as np | |
def draw_DNA_helix(bp=50, major_groove=22, minor_groove=12, bp_per_turn=10.5, | |
fig_height=1.5, colors=('red', 'black'), savefig=None, fig_format='png'): | |
""" | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 argparse | |
import re | |
import subprocess | |
import pandas as pd | |
import psutil | |
import requests | |
import tabulate | |
kernel_regex = re.compile(r".+kernel-(.+)\.json") |
OlderNewer