Re: Newick parser

Discussion in 'Python' started by Fredrik Lundh, Sep 21, 2008.

  1. 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.
    > http://www.daimi.au.dk/~mailund/newick.html
    >
    > But i don't understand the usage properly.What i wanna do is if i have a
    > file in the location c:\\files\\file1.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>
     
    Fredrik Lundh, Sep 21, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bernd Oninger
    Replies:
    0
    Views:
    762
    Bernd Oninger
    Jun 9, 2004
  2. ZOCOR

    XML Parser VS HTML Parser

    ZOCOR, Oct 3, 2004, in forum: Java
    Replies:
    11
    Views:
    817
    Paul King
    Oct 5, 2004
  3. Bernd Oninger
    Replies:
    0
    Views:
    812
    Bernd Oninger
    Jun 9, 2004
  4. Joel Hedlund
    Replies:
    2
    Views:
    511
    Joel Hedlund
    Nov 11, 2006
  5. Joel Hedlund
    Replies:
    0
    Views:
    307
    Joel Hedlund
    Nov 11, 2006
Loading...

Share This Page