Python Overview
Python Overview
OF
PYTHON
PYTHON
FOR
GENOMIC
DATA
SCIENCE
molecular biology.
understand
it
Ask
an
expert!
Programming
Strategies*
1. Identify
the
required
inputs,
such
as
data
or
speciTications
2.
3.
4.
5.
* Adapted from Beginning Perl for Bioinformatics by James Tisdall, Published by O'Reilly Media, Inc., 2001
Designing
a
Program
Write
pseudocode
for
a
program
that
computes
the
GC
percentage
composition
of
a
DNA
sequence:
read DNA sequence from user
count the number of Cs in DNA sequence
count the number of Gs in DNA sequence
determine the length of the DNA sequence
compute the GC%
print GC%
6
What is Python?
Python is not
What
is
Python?
Python
is
an
easy
to
learn,
powerful
programming
language
It
has
efTicient
data
structures
and
a
simple
but
effective
language
instructions
by
a
compiler,
and
then
run
from
its
binary
form
an
interpreted
program
takes
the
code
you
wrote
and
converts
it
to
binary
on
the
Tly
each
time
you
run
it.
This
is
slower.
9
History
of
Python
Python
was
conceived
and
developed
in
the
late
1980s
and
early
10
Python
Features
It
is
simple
to
use:
Python
syntax
is
clearly
deTined
which
makes
it
easily
It is interactive: you can write and test your programs directly from a
terminal window.
offers a wide range of programs that are already written for you.
Windows.
It
is
scalable:
you
can
use
it
for
very
small
or
very
large
programs.
11
www.pasteur.fr/formation/infobio/python/
:
a
programming
course
for
biologists
at
the
Pasteur
Institute
pub/a/python/2002/10/17/biopython.html
:
a
tutorial
by
Patrick
O'Brien
12
Learning Python
by Mark Lutz
Python Cookbook
by David Beazley
and Brian K. Jones
13
Getting
Python
The
most
up-to-date
and
current
source
code,
binaries,
documentation,
news,
etc.
is
available
at
the
ofTicial
website
of
Python:
http://www.python.org/download/
14
15