Re: Newick parser

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fredrik Lundh

    #1

    Re: Newick parser

    aditya shukla wrote:
    Hello folks , i have a .nwk file.I want to parser the tree from that
    file.I found this python parser for newick trees.

    >
    But i don't understand the usage properly.What i wanna do is if i have a
    file in the location c:\\files\\file 1.nwk , then i wanna parse the trees
    in that file.
    judging from the docs, you should be able to do e.g.

    from newick import parse_tree

    file = open("c:\\files \\file1.nwk")
    text = file.read()

    print parse_tree(text )

    </F>

Working...