NAME
nextool - NEXUS file manipulation tool
SYNOPSIS
nextool.pl <input_file> [output_file] [COMMAND [arguments]]
if outfile is not specified, just read input file and output to temp.nex
Commands:
rewrite
rename_otus <translation_file>
reroot <outgroup_node_name> [tree_name]
select blocks <block1 block2 ...>
select OTU <OTU_1 OTU_2 ...> or <-f filename>
select tree <tree_name>
select subtree <inode_number> [tree_name]
select column <columns> or <-f filename>
exclude blocks <block1 block2 ...>
exclude OTU <otu1 otu2 ...>
exclude subtree <inode> [treename]
exclude column <columns> or <-f filename>
makesets byfile <file1> [file2 file3 ...]
makesets byinode <inode1> [inode2 inode3 ...]
makesets byclade <OTU1> <OTU2> [OTU3 OTU4 ...]
Square brackets are required syntax in this command:
makesets byotus <set1>=[<OTU1 OTU2 ...>] <set2>=[<OTU3 OTU4 ...>] ...
Square brackets are required in this command:
makesets byunion <set1>=[<setA + setB ...>] <set2>=[<setA + setC ...>] ...
Square brackets are required in this command:
makesets bydifference <set1>=[<setA - setB>] <set2>=[<setA - setC>] ...
Square brackets around 'state' argument are required in this command:
makesets bycharstate [title=char_block_title] [set1=]"<sequence_or_intron_position>[<state>]" [set2=...]
makesets bycladeconsensus [title=char_block_title]
removesets <set1 set2 ...>
listsets [set1 set2 ...]
listsetnames
renamesets oldname1 newname1 [oldname2 newname2 ...]
COMMANDS
rewrite
Writes the contents of <input_file> to <output_file>. This is used to standardize the format of the file. this is the default program action if <outfile> is not specified, the output file will be temp.nex
rename_otus <translation_file>
Renames OTUs in taxa, characters and trees blocks according to translation_file. Each line of translation_file contains the old name, separated by whitespace, then the new name.
reroot <outgroup_node_name> [tree_name]
reroot the tree of tree_name (optional-- the first tree in trees block if not specified) with outgroup_node_name as the new outgroup
select blocks <block1 block2 ...>
Select block given in list
select OTU <OTU_1 OTU_2 ...> or <-f filename>
Selects OTUs given in list. Changes taxa block, characters block and trees block.
select tree <tree_name>
Selects one tree given the tree name. Changes taxa/characters blocks to match.
select subtree <inode_number> [tree_name]
Selects subtree given the tree name and the internal node number. Changes taxa/characters blocks to match.
select column <columns> or <-f filename>
Selects a number of columns from character lists to get a new set of character lists (for a new Bio::NEXUS file). eg, "1-3, 5 8, 10-15" (comma or space can be used to separate numbers)
exclude blocks <block1 block2 ...>
Remove blocks from file
exclude OTU <otu1 otu2 ...>
Remove OTUs from file
exclude subtree <inode> [treename]
Remove subtree rooted with 'inode' in 'treename' or the first tree if 'treename' is not specified
exclude column <columns> or <-f filename>
Remove a number of columns from character lists to get a new set of character lists (for a new Bio::NEXUS file). eg, "1-3, 5 8, 10-15" (comma or space can be used to separate numbers)
makesets byfile <file1> [file2 file3 ...]
Add sets based on OTU's listed in simple text files. Sets take names of files; OTU's should be newline-delimited in the text files.
makesets byinode <inode1> [inode2 inode3 ...]
Add sets based on ancestral internal nodes and their children
makesets byclade <OTU1> <OTU2> [OTU3 OTU4 ...]
Add sets by finding the children of the most recent common ancestor (mrca) of OTU1 and OTU2 pairs
makesets byotus <set1>=[<OTU1 OTU2 ...>] <set2>=[<OTU3 OTU4 ...>] ...
Add sets by specifying setnames and OTU's each set is to contain. Syntax is setname=[<OTU LIST>]
makesets byunion <set1>=[<setA + setB ...>] <set2>=[<setA + setC ...>] ...
Add sets by specifying setnames and which existing sets contain the OTUs the new set will comprise. Syntax is setname=[<SET LIST>]
makesets bydifference <set1>=[<setA - setB>] <set2>=[<setA - setC>] ...
Add sets by specifying setnames and which existing sets contain the OTUs that will be used in defining the new sets.
makesets bycharstate [title=char_block_title] [set1=]"<sequence_or_intron_position>[<state>]" [set2=...]
Add sets by specifying setnames and which existing sets contain the OTUs that will be used in defining the new sets.
makesets bycladeconsensus [title=char_block_title]
Add sets by finding clades that have a consensus sequence at all loci, and creating one set for each group of "otu synonyms"
removesets [-p] set1 set2 ...
Delete sets from NEXUS file. Will empty SETS Block but not remove it from file. '-p' switch allows you to specify regular expression patterns ('set\d*' will delete all sets of the form set<number>.) QUOTATION MARKS AROUND PATTERNS IS STRONGLY RECOMMENDED.
listsets
Print sets (all sets by default, otherwise those provided by user) to output file, or standard out of STDOUT or - is used as output filename
listsetnames
Print setnames to output file, or standard out if STDOUT or - is used as output filename
renamesets oldname1 newname1 [oldname2 newname2 ...]
Rename sets by space-delimited <oldname newname> pairs
DESCRIPTION
This program provides several services in the manipulation of NEXUS files (selecting specific OTUs or tree nodes, combining files, renaming OTUs, etc.
VERSION
$Revision: 1.39 $
REQUIRES
Bio::NEXUS
AUTHOR
Chengzhi Liang <liangc@umbi.umd.edu> Peter Yang <pyang@rice.edu> Tom Hladish <hladish@umbi.umd.edu>