Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(23)  |  Call(16)  |  Derive(0)  |  Import(7)

src/e/t/ete-HEAD/tools/ete_tools/ete_diff.py   ete(Download)
import itertools
 
from common import Tree, print_table, color
 
import textwrap
    # Test code
    for x in xrange(100):
        t1 = Tree()
        t2 = Tree()
        t1.populate(20, names_library="abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ")
        #show_difftable(treediff(t1, t2, "name", "name", RF_DIST), "name", "name")
 
    t1 = Tree("(((a, b), (c,d))j, (e, (f, g)h )i );", format=1)
    t2 = Tree("(((a, c), (b,d))j, (e, (f, g)h )i );", format=1)
    show_difftable_topo(treediff(t1, t2, "name", "name", EUCL_DIST), "name", "name")

src/e/t/ete-HEAD/tools/ete_tools/ete_ncbicomp.py   ete(Download)
from collections import defaultdict
 
from common import (ncbi, argparse, PhyloTree, Tree, SVG_COLORS, faces,
                    treeview, NodeStyle, TreeStyle, color, print_table) 
 
    if args.ref_tree:
        print >>sys.stderr, "Reading ref tree from", args.ref_tree
        reft = Tree(args.ref_tree, format=1)
    else:
        reft = None

src/e/t/ete-HEAD/tools/ete_tools/ete_maptrees.py   ete(Download)
import os
from collections import defaultdict
from common import __CITATION__,  Tree, PhyloTree, argparse, add_face_to_node, TreeStyle, faces, NodeStyle
import numpy
import hashlib
    args = parser.parse_args(argv)
    if args.plot_newick:
        t = Tree(args.plot_newick)
        ts = TreeStyle()
        ts.layout_fn = info_layout

src/e/t/ete-HEAD/tools/ete_tools/ete_dist.py   ete(Download)
import numpy
from time import ctime
from common import __CITATION__, argparse, Tree, PhyloTree, print_table
 
__DESCRIPTION__ = '''
        target_trees = args.target_trees
 
    t = Tree(reftree)
 
    if args.ref_attr:
            tt = PhyloTree(tfile, sp_naming_function = lambda name: name.split(args.spname_delimiter)[args.spname_field])
        else:
            tt = Tree(tfile)
 
        if args.target_attr:

src/e/t/ete-HEAD/tools/ete_tools/ete_merge.py   ete(Download)
#!/usr/bin/env python
import sys
import os
from collections import defaultdict
from common import __CITATION__,  Tree, argparse, print_table
 
    args = parser.parse_args(argv)
    ref = Tree(args.reftree)
    TARGET_FEATURES = args.features
    DISCARD_FEATURES = args.discard + ["support", "name", "dist"]
    for target in args.source_trees:
        print target
        tt = Tree(target)
        tt.prune(ref.get_leaf_names())
        if len(out) > 1:

src/e/t/ete-HEAD/tools/ete_tools/ete_stats.py   ete(Download)
#!/usr/bin/env python
import os
import sys
from math import sqrt
from common import __CITATION__, argparse, Tree, print_table
 
    for tfile in target_trees:
        t = Tree(tfile)
        if args.outgroup:
            if len(args.outgroup) > 1:

src/e/t/ete-HEAD/tools/ete_tools/update_taxadb.py   ete(Download)
import sys
import os
from string import strip
import tarfile
from common import Tree
        nodename = fields[0].strip()
        parentname = fields[1].strip()
        n = Tree()
        n.name = nodename
        n.taxname = node2taxname[nodename]