Instructions for ChangeNewickNodeId.pl

This program manipulates newick trees by replacing the tree node Ids with new ids that are defined in a user supplied file.

Input

  1. Newick tree file.

    Example:

    ((((((((((((a:0.00612000,b:0.00595500):0.01387200,c:0.01541200):0.01137700,((d:0.00893100,e:0.00854900):0.00682500,f:0.00684900):0.00199800):0.00000000,((g:0.02244900,((h:0.00345900,i:0.00515800):0.00706400,(j:0.00169600,k:0.00342400):0.00164900):0.00427000):0.00169100,l:0.01615600):0.00462800):0.00199400,(m:0.01245800,n:0.01418600):0.00353400):0.01074400,o:0.01140200):0.00864400,(p:0.00000000,q:0.00168400):0.01595200):0.01238600,(r:0.01226800,s:0.01613900):0.00124300):0.00201200,(t:0.05447700,u:0.01046900):0.00444700):0.05659400,OG1:0.12043000):0.04544800,og2:0.16630300):0.04016250,(og3:0.18159100,og4:0.11105600):0.02776250);

  2. File containing a tab delimited list of old ids and their coresponding new ids.

    Example:

    a   seq1
    b   seq2
    c   seq3
    d   seq4
    e   seq5
    f   seq6
    

Output

  1. Newick tree with new node ids.

How to run

  1. Download ChangeNewickNodeId.pl to your local computer, and set it executable by typing the following command in your working directory:

    chmod +x ChangeNewickNodeId.pl

  2. Create a subdirectory in your working directory to hold input files. In the subdirectory, type following command:

    perl ../ChangeNewickNodeId.pl NewickTreeFile ReplaceIdListFile OutputNewickTreeFile