180 likes | 381 Views
CS4710 Why Progam? Why learn to program? Utility of programming skills: understand tools modify tools create your own automate repetitive tasks automate system tasks renaming files searching entire directories perform simulations Paradigms of programming imperative Perl Fortran C
E N D
CS4710 Why Progam?
Why learn to program? • Utility of programming skills: • understand tools • modify tools • create your own • automate repetitive tasks • automate system tasks • renaming files • searching entire directories • perform simulations
Paradigms of programming • imperative • Perl • Fortran • C • Python • object-oriented • Java • C++ • Perl • Python • functional • Lisp • Scheme
Notable Resources • GenBank • www.ncbi.nlm.nih.gov/GenBank • (Nat’l center for biotechnical info) • most know sequence data • Protein Data Bank (PDB) • http://www.rcsb.org/pdb • structural info of proteins • BLAST • alignment tool • BioPerl module
Why Perl? • de facto standard for bioinformatics researchers • BioPerl module • especially apt for “string” manipulation • “ASCII text” • available for every platform • useful for “scripts” • useful for CGI-scripts (web app.) • PERL: Practical Extraction and Report Language • relatively quick program development
May want to also consider Python • also extensively used for Bioinformatics • especially apt for “string” manipulation • “ASCII text” • available for every platform • useful for “scripts”, function writing, and even object-oriented style • quick program development • very clean syntax • supports regular expressions • via the module re • http://www.python.org • re module info • biopython.org modules
ASCII • American Standard Code for Information Exchange • assigns a numeric value to characters • letters, punctuation, digits, ... • used to help store info in computer form(binary)
ASCII codes • 32 is space • 33 is ! • 48-57 are 0-9 • 65-90 are A-Z • 97-122 are a-z • http://www.asciitable.com • why is ascii important to you? • (db query results)
“Platform” • Operating system • MS Windows • Vista • XP • NT • 2000 • Unix • Sun Solaris • SGI • Linux • RedHat's Fedora distribution • SuSE distribution • Gentoo distribution • Mac OS X (based on BSD Unix)
Operating System • Is a layer of software running on the computer’s hardware • Controls the hardware resources • Determines the user interface • remember DOS? • Macintosh/Apple led graphical interfaces • Application programs run on top of the OS
Open Source Programs • Allows one access to the original code of a program (vs. big business) • Linux • Perl • Mozilla's web browser Firefox • Mozilla's news and email reader Thunderbird • Apache web server • OSI - open source initiative • http://opensource.org • http://bioinformatics.org
Writing and running a perl program • enter source code into a file (.pl) • save the file • compile and run • perl filename.pl, or • ./filename.pl *do chmod first • make modifications and repeat if needed
Types of debugging • incremental programming helpful • thorough testing • white box • black box • regression • print statements - old reliable • actual debuggers - software to help you trace your code, set breakpoints, view variable values, etc
Types of program errors • syntax • semantic (logic) • runtime
Windows vs Unix terminology • file • program source code • data • directory • same as MS Windows “folder” • subdirectory • in Unix, • . always refers to your current directory • .. always refers to the parent directory
Unix command: chmod • file and directory security • changes file or directory permissions • your perl file must be set to executable • ls -l • chmod u+x filename.pl • ls -l • user/group/other & r w x
Perl Resources • http://www.cpan.org • comprehensive perl archive network • O’Reilly sources: • http://www.perl.com/catalog/begperlbio • http://www.perl.com • http://www.perl.org • We will use Perl version 5 or higher • perl -v • Unix command: which perl • get the “binary” not the source code
Other software and info • Use http://www.google.com • MS Windows: download and install “putty” • SSH client • security vs. Telnet and ftp • host: acme.gatech.edu • know where to get GT computer account help • http://www.oit.gatech.edu • http://faq.oit.gatech.edu/cgi-bin/mainmenu?all