Skip to content
Permalink
911f3d09ad
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
22 lines (19 sloc) 742 Bytes
# def treenewck():
# script_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
# path = os.path.join(script_dir, 'nexus')
# for filename in glob.glob(os.path.join(path, '*.tre*')):
# f = open(filename, 'r').read()
import re, os, glob, itertools, fnmatch, sys, shutil
# dirname, filename = os.path.split(os.path.abspath(__file__))
def treenewick():
script_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
# print script_dir
path = os.path.join(script_dir, 'tree.tre')
with open(path, 'r') as content:
newick = content.read()
return newick
a = treenewick()
print a
# dirname, filename = os.path.split(os.path.abspath(__file__))
# print "running from", dirname
# print "file is", filename