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 | |
import argparse | |
from glob import glob | |
import os | |
try: | |
from Bio.SeqRecord import SeqRecord | |
from Bio import AlignIO | |
from Bio.Align import MultipleSeqAlignment | |
from Bio.Seq import Seq | |
from Bio.Alphabet import generic_protein |
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 ete2 import PhyloNode, TreeStyle | |
import sys | |
if(len(sys.argv)<2): | |
sys.exit("Usage : python disptree.py input output") | |
else: | |
inputfile, output = sys.argv[1], sys.argv[2] | |
t = PhyloNode(inputfile) | |
ts = TreeStyle() | |
ts.show_branch_length = True | |
ts.show_branch_support = True |
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
# modification of config created here: https://gist.github.com/cscorley/9144544 | |
try: | |
from urllib.parse import quote # Py 3 | |
except ImportError: | |
from urllib2 import quote # Py 2 | |
import os | |
import sys | |
from settings import template_path, template_file, build_dir, rel_img_path | |
f = None | |
for arg in sys.argv: |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<title>College made you dumber</title> | |
<link rel="stylesheet" href="/static/css/reveal.css"> | |
<link rel="stylesheet" href="/static/css/theme/black.css"> |
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 | |
from ete3 import Tree | |
# pseudo code | |
# binary rooted tree comparison | |
def equals(tree1, tree2): | |
if tree1 == tree2: | |
return True | |
# checking only leaf names |
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 | |
from ete3 import Tree | |
import random | |
def delete_single_child_internal(t): | |
"""Utility function that removes internal nodes | |
with a single child from tree""" | |
for node in t.traverse("postorder"): |
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 pycountry_convert import country_alpha2_to_continent_code as a2ctc | |
from pycountry_convert import convert_continent_code_to_continent_name as ctc2ctn | |
from pycountry_convert import country_alpha3_to_country_alpha2 as a3a2 | |
from pycountry_convert import country_alpha2_to_country_name as a2cn | |
from functools import partial | |
from d3IpyPlus import * | |
# let's keep the following columns only | |
datafile = "en_profile_country_ben_import_des.csv" | |
cols = ['year', 'country_origin_id', 'country_destination_id', 'import_val'] |
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.