PSODA Manual
The following commands are available in Psoda. They can either be entered into a PAUP or PSODA block in a nexus file, or entered in the "commands" dropdown in the PSODA gui window. Examples are given for many of the commands along with a description of the parameters.
Description: Decrement Instruction
Usage: *decrement (*name = "");
Parameters:
*name : No Description Provided
Example:
empty
Description: Execute a psoda command
Usage: *empty ();
Parameters:
increment
Description: Increment a value.
Usage: *increment (*name = "");
Parameters:
*name : No Description Provided
update
Description: Change the value of a variable.
Usage: *update (*name = "", *value = "");
Parameters:
*name : The variable name that will be given a value
*value : The value that should be assigned to the variable
var
Description: Declare a variable
Usage: *var (*name = "", *value = "");
Parameters:
*name : No Description Provided
*value : No Description Provided
align
Description: Take an unaligned dataset with taxa of potentially different lengths and create an aligned dataset with gaps inserted to create a rectangular matrix.
Usage: align (classic = "No", endgap = "yes", gapdist = 4, gapext = "", gapopen = "", guidetree = "", name = "", outfile = "", output = "fasta", prog = "pmsa", submat = "");
Parameters:
classic : if Yes, use the stock (unoptimized) progressivive sequence alignment methods of iterating through every character in one sub-alignment with every other character in the other alignment. If No, use the optimizied MultChars.
endgap : Penalize Leading Gaps
gapdist : penalize opening a new gap within this distance to another gap
gapext : Gap Extension defaults to -0.2 for Protein sequences and -6.6 for everything else
gapopen : Gap Open Penalty defaults to -10 for protein sequences and -15 for everything else
guidetree : Create a UPGMA guide tree if NULL
name : If name is non-empty, the resulting aligned dataset will be added to the interpreter's dataset map with this name. If this command is used as a function a reference to the stored dataset will be returned and if no name was given, a unique identifier will be assigned
outfile : File name to save the output to
output : The output format
prog : Program used for alignment. Progressive Multiple Sequence Alignment is currently the only option
submat : substition matrix to use for alignment. Possible values include: IUB, BLOSUM62, SCHNEIDER, LuthyA, LuthyB, LuthyL, identity, or a filename with the matrix.
BackupRepository
Description: Make a copy of the tree repository into the accumulator.
Usage: BackupRepository ();
Parameters:
bandb
Description: Branch and Bound Command (Not Yet Implemented).
Usage: bandb ();
Parameters:
BayesSearch
Description: Use mrbayes to perform a search. This calls an external program to perform the search and then inserts the resulting tree into the repository.
Usage: BayesSearch (bayesargs = "lset nst=6 rates=invgamma;\n", iterations = "0");
Parameters:
bayesargs : The parameters passed to mrbayes. See the documentation for Mrbayes for details
iterations : The number of iterations. If zero, then continue until the average standard deviation of split frequencies is less than 0.1
bibliography
Description: Print out a bibliography of references for programs included in PSODA.
Usage: bibliography ();
Parameters:
bootstrap
Description: Perform Bootstrap. Randomly reweight columns of the alignment matrix and calculate the optimal tree based on that reweighting. Then generate a consensus based on all of the trees generated by reweightings
Usage: bootstrap (blocksize = 10, bseed = "clock", conlevel = 50, keepall = "no", nchar = "current", nreps = 100, search = "heuristic", wts = "simple");
Parameters:
blocksize : Bootstrap block size for dependent columns
bseed : Random number generator seed. Default is seed from clock
conlevel : Confidence Level for boostrap consensus
keepall : Keep all trees? (Not currently implemented)
nchar : The number of characters to reweight. A value of current reweights all columns
nreps : Number of replicates (Number of times to reweight).
search : Search Strategy to use. Heuristic uses TBR, nj=Neighbor Joining, upgma=Unweighted Pair Group Method using Arithmetic Averages
wts : Not currently implemented
break
Description: Break out of a Switch statement.
Usage: break ();
Parameters:
checkParsimony
Description: Parsimony validation test.
Usage: checkParsimony (construct = "sampling", cpseed = "time", criterion = "parsimony", iterations = 2147483647, lbshorten_method = "substitution", longesttaxa = "_calculate_", maxtrees = 2147483647, nreps = 1, start = "stepwise", sub_frequency = "0.75", swap = "TBR", wantrecursion = "FALSE");
Parameters:
construct : Use ancestor state constructed by sampling or parsimony
cpSeed : Random seed can be specified, otherwise, use the current time
criterion : Optimality criteria
iterations : Number of iterations to perform
lbshorten_method : Method to shorten long branch
longestTaxa : Unless specified by the user, the longest taxa will be calculated using parsimony criteria.
maxTrees : Maximum number of trees to keep in the repository
nreps : Number of Replicates
start : Start Tree generation method
sub_frequency : Substitution Frequency
swap : Swapping method
wantRecursion : Recursion (Not currently Implemented)
CombineRepositories
Description: If the accumulator is better than the repository, replace the repository with the accumulator
Usage: CombineRepositories ();
Parameters:
ConstructAncestorStates
Description: Construct the ancestral character states for a tree
Usage: ConstructAncestorStates (assign = "yes", display = "yes");
Parameters:
assign : assign the computed ancestral states to ancester data structures
display : display states
contree
Description: Compute the Consensus tree
Usage: contree (grpfreq = "false", indices = "false", majrule = "false", percent = 100, replace = "false", showtree = "true", strict = "true", usetreewts = "false");
Parameters:
grpfreq : No Description Provided
indices : No Description Provided
majrule : No Description Provided
percent : No Description Provided
replace : No Description Provided
showtree : No Description Provided
strict : No Description Provided
usetreewts : No Description Provided
DeleteData
Description: Deletes a dataset from the interpreter's dataset map.
Usage: DeleteData (name = "*default");
Parameters:
name : The name of the dataset to delete
DeleteTree
Description: Deletes a tree from the interpreter's tree map.
Usage: DeleteTree (name = "*default");
Parameters:
name : The name of the tree to delete
display
Description: Display a visualization of the tree space
Usage: display (style = "MDS", terminal = "gnuplot");
Parameters:
style : Which display style should be used
terminal : How should the visualization be displayed
dset
Description: Execute a psoda command
Usage: dset ();
Parameters:
execute
Description: Execute an external program
Usage: execute (command = "");
Parameters:
command : No Description Provided
export
Description: Export the dataset with different formats
Usage: export (file = "", format = "fasta");
Parameters:
file : No Description Provided
format : No Description Provided
getBestScore
Description: Get the score of the best tree in the Tree Repository
Usage: getBestScore (eliminate = "True");
Parameters:
eliminate : If true, all but the best tree are eliminated from the tree repository
getNumChars
Description: Get the number of characters in the alignment
Usage: getNumChars ();
Parameters:
gettrees
Description: Get trees from a file and put them in the tree repository
Usage: gettrees (file = "");
Parameters:
file : The file from which the trees should be read
getWeightsLength
Description: Get the Length of the weights vector. This should be the same as the number of characters in the alignment.
Usage: getWeightsLength ();
Parameters:
GradientDescent
Description: Perform a gradient descent search for trees.
Usage: GradientDescent (continue = 10, start = "stepwise");
Parameters:
continue : How many times should the search continue to look after no improvement
start : Where should the starting trees for the Gradient Descent Search come from
graph
Description: Enable the graph in the GUI.
Usage: graph (start = "no", stop = "no");
Parameters:
start : No Description Provided
stop : No Description Provided
help
Description: Prints usage information about a given command (note: the usage for this command differs from the typical name=value paradigm)
The help command displays the usage for PsodaScript commands whether BuiltIn or UserDefined.
Examples:
help "print"; [ displays the help information for the 'print' command]
help; [ displays the help information for the 'help' command]
Usage: help *name;
Parameters:
*name : the name (as a string) of the command for which to print the usage information
hsearch
Description: Heuristic Search for Phylogenetic Trees with optimal score.
Usage: hsearch (aligned = "FALSE", criterion = "parsimony", iterations = 2147483647, maxtrees = 1000, nreps = 1, start = "stepwise", swap = "TBR", wantrecursion = "FALSE");
Parameters:
aligned : If this value is TRUE, then run the search even if the dataset is not aligned. If the dataset is aligned, this parameter will not make a difference.
criterion : Criterion can be "likelihood" or "parsimony"
iterations : The number of iterations to search through. Each iteration takes one split point in the tree and computes all possible rearrangements of the subtrees.
maxTrees : The maximum number of trees with the best score to keep in the repository. This may be limited by the amount of memory on your machine or in the Java Virtual Machine
nreps : Number of replicate trees created in stepwise tree creation
start : Where should the starting tree for the HSearch come from: stepwise, nj=neighbor joining, upgma, current
swap : What method should be used for swaping. Possible values are TBR, sectarian(computes a window over the tree that is 5 brances long and computes the best resolution for those branches, holding everything else constant), resolve (computes a consensus tree, then uses TBR to create a bifurcating tree for all unresolved nodes), none
wantRecursion : Turn Recursive TBR on. Find a tree using the most optimal subtrees
interactive
Description: Execute an interactive instruction.
Usage: interactive (code = "", echocode = 1);
Parameters:
code : The code that you pass in via this parameter will be executed by a PSODA interpreter
echoCode : If true, the code entered throught the 'code' parameter will be echoed to the console
lbstest
Description: Long Branch Shortening.
Usage: lbstest (alltrees = "false", construct = "sampling", cpseed = "time", criterion = "parsimony", iterations = 2147483647, lbshorten_method = "substitution", longesttaxa = "_calculate_", maxtrees = 2147483647, nreps = 1, start = "stepwise", sub_frequency = "0.25", swap = "TBR", wantrecursion = "FALSE");
Parameters:
alltrees : No Description Provided
construct : No Description Provided
cpSeed : No Description Provided
criterion : No Description Provided
iterations : No Description Provided
lbshorten_method : No Description Provided
longestTaxa : No Description Provided
maxTrees : No Description Provided
nreps : No Description Provided
start : No Description Provided
sub_frequency : No Description Provided
swap : No Description Provided
wantRecursion : No Description Provided
Limits
Description: Set limits for variables.
Usage: Limits (bound = "max", type = "int");
Parameters:
bound : Which bound is being requested (either 'max' or 'min')
type : Which data type is begin described (either 'int' or 'double')
LoadData
Description: Loads a dataset from a file. Note that only the first datablock from the file will be kept.
Usage: LoadData (file = "", makecurrent = "yes", name = "");
Parameters:
file : The file from which the data should be read
makeCurrent : If 'yes', the loaded dataset will become the current dataset in the interpreter
name : The dataset will be stored in the interpreter's map with the given name if name is not empty
log
Description: Execute a psoda command
Usage: log ();
Parameters:
lscores
Description: Generate Likelihood scores for trees in the repository.
Usage: lscores (file = "");
Parameters:
file : File to save the likelihood scores to
lset
Description: Execute a psoda command
Usage: lset ();
Parameters:
MRP
Description: Add a matrix representation for every tree in the repository.
Usage: MRP (criterion = "parsimony", iterations = 2147483647, maxtrees = 1000, nreps = 1, start = "stepwise", swap = "TBR", wantrecursion = "FALSE");
Parameters:
criterion : No Description Provided
iterations : No Description Provided
maxTrees : No Description Provided
nreps : No Description Provided
start : Where should the starting tree for the HSearch come from
swap : What method should be used for swaping
wantRecursion : No Description Provided
neighborTest
Description: Test neighbor joining
Usage: neighborTest (alltrees = "false");
Parameters:
alltrees : No Description Provided
nj
Description: Create a neighbor joining tree for the dataset.
Usage: nj ();
Parameters:
PercentIdentity
Description: Calculate the percent identity for the alignment
Usage: PercentIdentity (counts = "", endgap = "yes", gapext = "", gapopen = "", submat = "");
Parameters:
counts : print matrix of accumulative pairwise (mis)matches
endgap : penalize Leading Gaps?
gapext : Gap Extension penalty
gapopen : Gap Open penalty
submat : No Description Provided
print
Description: Evaluates the given expression and prints the string value to the console (note: the usage for this command differs from the typical name=value paradigm
Usage: print *text;
Parameters:
*text : any valid PSODA expression
printmatrix
Description: Save the matrix to a file.
Usage: printmatrix (file = "psoda.matrix.out");
Parameters:
file : File to save the matrix to
pscores
Description: Generate a parsimony score for every tree in the repository.
Usage: pscores (file = "");
Parameters:
file : File to save the parsimony scores to
quit
Description: Quit out of the interpreter.
Usage: quit ();
Parameters:
random
Description: Generate a random number.
Usage: random (max = 2147483647);
Parameters:
max : The maximum value for the random number
randomMorph
Description: Randomly split every tree in the repository and join it in a random spot
Usage: randomMorph ();
Parameters:
RAxMLSearch
Description: Execute a raxml search.
Usage: RAxMLSearch (raxargs = "-m GTRGAMMA");
Parameters:
raxargs : These are raxml parameters. See the raxml manual for details.
ResolveTrees
Description: Given an unresolved tree, resolve it in all possible ways and put the trees in the repository.
Usage: ResolveTrees ();
Parameters:
return
Description: Return from a function
Usage: return (*value = "");
Parameters:
*value : No Description Provided
rsearch
Description: Recursive search (Not currently implemented)
Usage: rsearch ();
Parameters:
savetrees
Description: Save the trees in the repository to a file.
Usage: savetrees (file = "psoda.out.tre");
Parameters:
file : No Description Provided
set
Description: Set global parameters for instructions
Usage: set (*command = "*all", *name = "", *value = "");
Parameters:
*command : The default value for the given parameter will be set on this command (by default, the set is done on all commands that have the given parameter)
*name : The name of the default parameter to be set
*value : The value to which the parameter should be set
showtrees
Description: Print out the trees in the repository
Usage: showtrees ();
Parameters:
Source
Description: Parses the PSODA program souce from the given file. User-defined commands will be added to the running program while PSODA commands will be parsed and executed.
Usage: Source (file = "");
Parameters:
file : The file from which the program should be read
srandom
Description: Seed the random number generator.
Usage: srandom (seed = "clock");
Parameters:
seed : No Description Provided
ssalign
Description: Take an unaligned dataset with taxa of potentially different lengths and create an aligned dataset with gaps inserted to create a rectangular matrix. Use the secondary structure to align the sequences using chemical properties with weights optimized for the particular secondary structure
Usage: ssalign (classic = "No", endgap = "yes", gapdist = 4, gapext = "", gapopen = "", guidetree = "", outfile = "ssalignment.afa", outfilecombined = "", outfiless = "alignment.ss.afa", outputcombined = "", outputss = "fasta", prog = "default", submata = "", submatb = "", submatl = "");
Parameters:
classic : if Yes, use the stock (unoptimized) progressivive sequence alignment methods of iterating through every character in one sub-alignment with every other character in the other alignment. If No, use the optimizied MultChars.
endgap : Penalize Leading Gaps
gapdist : penalize opening a new gap within this distance to another gap
gapext : Gap Extension defaults to -0.2 for Protein sequences and -6.6 for everything else
gapopen : Gap Open Penalty defaults to -10 for protein sequences and -15 for everything else
guidetree : Create a UPGMA guide tree if NULL
outfile : File name to save the output to
outfileCombined : File name to save the combined output to
outfileSS : File name to save the SS to
outputCombined : The output format
outputSS : The output format
prog : Program used for alignment. Progressive Multiple Sequence Alignment is currently the only option
submata : substition matrix to use for alignment in alpha helix regions. Possible values include: IUB, BLOSUM62, SCHNEIDER, LuthyA, LuthyB, LuthyL, identity, or a filename with the matrix.
submatb : substition matrix to use for alignment in beta sheet regions. Possible values include: IUB, BLOSUM62, SCHNEIDER, LuthyA, LuthyB, LuthyL, identity, or a filename with the matrix.
submatl : substition matrix to use for alignment in loop regions. Possible values include: IUB, BLOSUM62, SCHNEIDER, LuthyA, LuthyB, LuthyL, identity, or a filename with the matrix.
sspredict
Description: Predict the secondary structure for a sequence using a neural network.
Usage: sspredict ();
Parameters:
StackTrace
Description: Prints the stack trace to the console
Usage: StackTrace ();
Parameters:
StoreTree
Description: Takes a tree from the current tree repository and stores a copy of it in the interpreter's tree map.
Usage: StoreTree (name = "*default");
Parameters:
name : The name by which the stored tree will be identified in the tree map
StringLength
Description: Calculate the string length of a variable
Usage: StringLength (string = "");
Parameters:
string : The string to be tested for length
SubString
Description: Find a substring
Usage: SubString (first = 0, length = "", string = "");
Parameters:
first : The index of the first character to take
length : The resulting substring will be no longer than this length, but it may be shorter if the end of the input string is reached. Passing an empty string as this parameter will result in going to the end of the string.
string : The string to take from
sumOfPairs
Description: Calculate the sum of pairs metric for the alignment.
Usage: sumOfPairs (endgap = "yes", gapext = "", gapopen = "", guidetree = "", outfile = "ssalignment.afa", output = "fasta", prog = "default", submata = "", submatb = "", submatl = "");
Parameters:
endgap : No Description Provided
gapext : No Description Provided
gapopen : No Description Provided
guidetree : No Description Provided
outfile : No Description Provided
output : No Description Provided
prog : No Description Provided
submata : No Description Provided
submatb : No Description Provided
submatl : No Description Provided
time
Description: Get the current time.
Usage: time ();
Parameters:
treedist
treeinfo
Description: Execute a psoda command
Usage: treeinfo ();
Parameters:
upgma
Description: Generate a UPGMA tree.
Usage: upgma ();
Parameters:
UseData
Description: Uses a dataset from the interpreter's dataset map.
Usage: UseData (name = "");
Parameters:
name : The name of the dataset to use
UseTree
Description: Uses a tree from the interpreter's tree map by adding a copy of it to the current tree repository
Usage: UseTree (clearrep = "yes", name = "*default");
Parameters:
clearrep : If this parameter is 'yes', clears the contents of the tree repository before adding the tree
name : The name of the tree to use
weights
Description: Adjust the weights across the columns of the alignment.
Usage: weights ();
Parameters:
weights reset
Description: Reset the weights to the original values.
Usage: weights reset ();
Parameters: