Dev Dives: Streamline document processing with UiPath Studio Web
Snell Psoda Bosc2009
1. PSODA
Open‐Source Phylogene(c Search
and DNA Analysis
Quinn Snell, Mark Clement
Brigham Young University
Provo, UT
Computa(onal Sciences Laboratory, Brigham Young University
2. PSODA
• Open‐source sequence analysis package
– GPL v2
• Compa(ble with PAUP*
– same func(on syntax
– maintains the same seman(cs
• Adds scrip(ng language to the PAUP block
– allows for crea(on of advanced meta‐searches
Computa(onal Sciences Laboratory, Brigham Young University
4. PSODA
• Began development in 2005 as an alterna(ve to
PAUP*
– phylogene(c search
– mul(ple alignment
– detect natural selec(on
• PlaPorm for development
– new search algorithms
– meta‐searches
– characteriza(on of op(miza(ons
– etc.
Computa(onal Sciences Laboratory, Brigham Young University
5. Features
• Heuris(c Search via TBR
– parsimony and maximum likelihood
• Other integrated programs
– RAxML – Likelihood search
– Mr. Bayes – Bayesian search
– TreeSAAP – selec(on detec(on using chemical proper(es
– ATV – tree viewer
– Jalview – Alignment viewer
• Graphical User Interface – Java
– binary distribu(on for Mac OS X, Windows, and Linux
• Object‐oriented C++ available via subversion
– h^p://dna.cs.byu.edu/opensvn/psoda
Computa(onal Sciences Laboratory, Brigham Young University
7. PSODAscript
• Added func(onality for PAUP blocks
• Decision statements & Loops
• Func(ons
– built‐in and user‐defined
• Allows for easy scrip(ng of meta‐searches
– Example: likelihood ratchet
• stepwise star(ng tree
• likelihood TBR on a single tree
• adjust weights
• parsimony on a single tree to get out of local minima
• loop
Computa(onal Sciences Laboratory, Brigham Young University
9. PSODAscript
• Designed to be extensible
• Each func(on is its own class that inherits from a
PsodaCommand
– programmer must add the class to the command
registra(on process
• registers the command’s name
– automa(cally adds it to the parsing
– no need for parsing code changes
– class constructor
• registers command descrip(on
• registers command arguments
• when command is called, the execute method is called
– programmer codes the execute func(on
Computa(onal Sciences Laboratory, Brigham Young University
10. PSODAscript
#include "ExportInstr.h"
#include "Interpreter.h"
#include "BuiltInCommand.h" #include "PsodaPrinter.h”
using namespace std; using namespace std;
class ExportInstr : public BuiltInCommand { ExportInstr::ExportInstr() : BuiltInCommand()
{
private: initFileDefaultValue("file", "");
initDefaultValue("format", "fasta", "");
//Prohibit copying of this object addParamOp(on("format", "phylip");
void operator =(ExportInstr&); }
ExportInstr(ExportInstr&);
ExportInstr::~ExportInstr() {
public: }
// Constructor void ExportInstr::execute(Environment* baseEnv, Literal*& returnVal __a^ribute__((unused)) )
ExportInstr(); {
execute(baseEnv);
// Destructor }
virtual ~ExportInstr();
void ExportInstr::execute(Environment* baseEnv)
/** {
* Call passParams() to set up the parameters in the interpreter Dataset* dataset = Interpreter::getInstance()‐>dataset();
*/ string format = baseEnv‐>lookupString("format");
virtual void execute(Environment* baseEnv); string file = baseEnv‐>lookupString("file");
virtual void execute(Environment* baseEnv, Literal*& returnVal); dataset‐>printSeqs(format, file);
/** #ifdef GUI
* Returns the name of this instruc(on PsodaPrinter::getInstance()‐>write("## Export Completed Successfullyn");
*/ #endif
virtual string getName() const; }
}; string ExportInstr::getName() const {
Computa(onal Sciences Laboratory, Brigham Young University
return "export";
}
11. PSODAscript & the GUI
• All PSODAscript commands may be executed from
within a nexus file or the GUI
– no addi(onal code needed
All commands have a window
created when called. The fields
are based on the registered
argument list
Commands are automa(cally
included in the commands list
Computa(onal Sciences Laboratory, Brigham Young University
12. PSODAscript
• Powerful scrip(ng language that
– also allows access to the internal data structures
– allows for crea(on and access to high
performance func(onality
• Automa(c inclusion in the graphical user
interface means that
– users automa(cally get access to new
func(onality
– programmer does not need to know GUI code
Computa(onal Sciences Laboratory, Brigham Young University
13. Conclusion
• PSODA is:
– a compe((ve DNA analysis package
– an open‐source development plaPorm
– an extensible scrip(ng plaPorm
• Programmers may
– add new analysis func(onality
– add new scrip(ng commands
• All new scrip(ng func(onality is automa(cally
added to the graphical user interface
Computa(onal Sciences Laboratory, Brigham Young University
14. Acknowledgements & etc.
• Collaborators
– Quinn Snell, Mark Clement
– Keith Crandall, Michael Whi(ng
– Kenneth Sundberg, Hyrum Carroll, and many other grad
students to numerous to men(on
• Download at h^p://dna.cs.byu.edu/psoda
• svn co h^p://dna.cs.byu.edu/opensvn/psoda
• Ques(ons?
Computa(onal Sciences Laboratory, Brigham Young University