nextool.pl - Command-line NEXUS file manipulation tool
Command-line Bio::NEXUS manipulation program
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 ...]
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
Renames OTUs (some or all) in taxa, characters and trees blocks according to
translation_file. Each non-blank, non-comment (#) line of translation_file
must contain oldname whitespace newname.
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 block given in list
Selects OTUs given in list. Changes taxa block, characters block and trees
block.
Selects one tree given the tree name. Changes taxa/characters blocks to match.
Selects subtree given the tree name and the internal node number. Changes
taxa/characters blocks to match.
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)
Remove subtree rooted with 'inode' in 'treename' or the first tree if 'treename'
is not specified
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)
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.
Add sets based on ancestral internal nodes and their children
Add sets by finding the children of the most recent common ancestor (mrca) of
OTU1 and OTU2 pairs
Add sets by specifying setnames and OTU's each set is to contain. Syntax is
setname=[<OTU LIST>]
Add sets by specifying setnames and which existing sets contain the OTUs the new
set will comprise. Syntax is setname=[<SET LIST>]
Add sets by specifying setnames and which existing sets contain the OTUs that
will be used in defining the new sets.
Add sets by specifying setnames and which existing sets contain the OTUs that
will be used in defining the new sets.
Add sets by finding clades that have a consensus sequence at all loci, and
creating one set for each group of "otu synonyms"
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.
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
Print setnames to output file, or standard out if STDOUT or - is used as output
filename
Rename sets by space-delimited <oldname newname> pairs
This program provides several services in the manipulation of NEXUS files
(selecting specific OTUs or tree nodes, combining files, renaming OTUs, etc.
Chengzhi Liang <liangc@umbi.umd.edu> Peter Yang <pyang@rice.edu> Tom
Hladish <hladish@umbi.umd.edu>