Skip to content

MikeWLloyd/Tree-Tip-Replacer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tip renamer for Newick/Nexus formatted trees.

Using a tab-delimited translation table, convert tip labels for Newick or Nexus formatted trees.
NOTE: for Nexus formatted trees, there can be NO spaces in the translated 'new names.'

Example call:

perl tree_tip_replacer.pl [translation_file] [treefile] 

The translation file is a tab-delimited file with the format:
CURRENT_NAME NEW_NAME

See the example_files directory for a sample tree, translation table, and expected output.

NOTE:

Ensure that the translation file has the correct line endings and encoding for your system (e.g., utf-8, unix(LF)). These can be changed in a program like TextWrangler. If the script does not change the text in the output file, it is likely due to the line endings being improperly formatted.

Other uses

I'm told that this script will work for renaming taxa in other file formats (tree files/alignments/misc.). I would suggest experimenting and seeing what works. The script is hard-coded to output a '.tre' file, but the extension is otherwise meaningless and can be changed to what is needed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages