PerlForBioinformatics

PerlForBioinformatics - Programming for Computational...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming for Computational Biology Ian Holmes Department of Bioengineering University of California, Berkeley
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Programming languages Self-contained language Platform-independent Used to write O/S C (imperative, procedural) C++, Java (object-oriented) Lisp, Haskell, Prolog (functional) Scripting language Closely tied to O/S Perl, Python, Ruby Domain-specific language R (statistics) MatLab (numerics) SQL (databases) An O/S typically manages… Devices (see above) Processes & signals
Background image of page 2
Bioinformatics “pipelines” often involve chaining together multiple tools
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Perl is the most-used bioinformatics language Most popular bioinformatics programming languages Bioinformatics career survey, 2008 Michael Barton
Background image of page 4
Pros and Cons of Perl Reasons for Perl’s popularity in bioinformatics (Lincoln Stein) Perl is remarkably good for slicing, dicing, twisting, wringing, smoothing, summarizing and otherwise mangling text Perl is forgiving Perl is component-oriented Perl is easy to write and fast to develop in Perl is a good prototyping language Perl is a good language for Web CGI scripting Problems with Perl Hard to read (“there’s more than one way to do it”, cryptic syntax…) Too forgiving (no strong typing, allows sloppy code…)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Perl overview Interpreted, not compiled Fast edit-run-revise cycle Sequence of instructions (“control flow”) Variables, subroutines Syntax close to C (the de facto standard minimal language) Weakly typed (unlike C) Redundant, not minimal (“there’s more than one way to do it”) “Syntactic sugar” – Hashes, arrays Operating System support (files, processes, signals) • String manipulation
Background image of page 6
Goals of this course Concepts of computer programming Rudimentary Perl (widely-used language) "How Perl saved the Human Genome Project" (Lincoln Stein) Introduction to Bioinformatics file formats Practical data-handling algorithms Exposure to Bioinformatics software
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Structural elements Learning Perl , Schwartz et al ISBN 0-596-10105-8 … O'Reilly "There's more than one way to do it” Q: But which is best? A: TESTS Tests (above) supercede texts (below): The main program The program output Files are shown in yellow Filename Standard output stream Terminal input Description of test conditions Terminal session
Background image of page 8
General principles of programming Make incremental changes Test everything you do the edit-run-revise cycle Write so that others can read it (when possible, write with others) Think before you write Use a good text editor Good debugging style
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Perl for Bioinformatics Section 1: Scalars and Loops Ian Holmes Department of Bioengineering University of California, Berkeley
Background image of page 10
Perl basics Basic syntax of a Perl program:
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 158

PerlForBioinformatics - Programming for Computational...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online