LMs4TNT
Java tool to convert xy coordinates to a TNT data block
jt4tnt v 1.0, january/21/2016
by Julio Sandria & Efrain De Luna, INECOL
*****************
This program reads “x, y” coordinates of landmarks and semilandamraks from each specimen, estimates means for each group, and writes blocks of terminal names and the coordinates with the corresponding commands as required by TNT phylogenetic software. Download "jt4tnt.class" and "jt4tnt.txt". Please note that “jt4tnt.class” is a java tool, thus it is platform independent. Java Tool for TNT requires Java 6 or later (Java 1.6). The file "jt4tnt.txt" contains basic help info on usage. The other files are an example of a data file with 8 configurations and a membership list for two species. I guess you can cite this tool as:
|
Download links
|
||
Usage: Place this Java tool and your input files in the same folder. If the directory or folder is “lms4tnt”, the landmark data file is “8configs.tps”, and the membership list is “”8labels2spp.txt”, then you should type:
First you will need to open your system command window to write a command line with several expressions separated by a space.
|
|||
Instructions
Examples Example of a command line, note that input data are coordinates in tps format:
This command line will read 300 configurations in a tps file “my300configs.tps”, will calculate means for 10 groups according to the labels in “membership10spp.txt”, and will write these in the output file “my10spp.txt” with all necessary TNT commands. Another example of a command line, but the input data are in a file with a TXT extension "yourlandmarks.txt" because contains superimposed coordinates and CS in row format:
|
|||
Input data files Input data file in tps format.
If your tps landmark data contains coordinates for the ruler, please make sure thsee are the last two points. In this case remeber to use the optional comand -d as follows:
This command line will delete the coordinates of the last two points. Input data file in row format. The command line should be as follows:
In this case, the file converter will read landmarks and CS to write two blocks of data for TNT. One block will contain the average values of centroid size. The second block will contain the landmarks. More below in the section "Output data files". The following contains landmark data in row format, with eight points after a Procrustes superposition.
In some morphometric tools, (for example CoordGen8), the data file with the superimposed configurations contains specimen labels following CS, at the end of each row. These labels are commonly placed after the percent sign %.
|
|||
Membership list
Also you can prepare a membership list more suited for TNT use, which instead of numbers, may contain names for each terminal in your tree search analysis.
In either case, numbers or text, the file with the membership list must be named as <filename.txt>. |
|||
Output data files This file converter will write 2D coordinates in the format required by TNT. If you provide coordinates in the tps format as <input.tps>, the file converter will take the x,y values, calculate the x,y average values for groups as defined by labels in the membership list, and save labeled rows in the TNT format, with the following TNT command lines at the beginning of the output file:
Using the files provided as examples, the following command line:
will write a file named twospecies.tnt that will look like this: ---------------------
--------------------- If you provide landmarks and CS values in row format as <input.txt>, the file converter will do the landmark averages, but additionally, it will take the last value in the input file and save the CS average values as a separate data block in the same output file, each line starting with the same label, a space, and the CS value.
Example:
|
|||
IF YOU HAVE MULTIPLE SHAPE CHARACTERS, YOU WILL NEED TO INPUT FILES TO CONVERT ONE BY ONE |