失效链接处理 |
Managing Your Biological Data with Python PDF 下载
本站整理下载:
提取码:4vot
相关截图:
主要内容:
For the four brave Python apprentices who made it to the mountaintop
during the Python and Friends Conference 2010 in Karpacz, Poland.
When you want to climb high mountains, what do you do? If you are
good at mountain climbing, you gather your equipment, call up some
fellow climbers, pick a mountain, and move out. In the stories written by
professional mountain climbers, you will find that they use ropes, hooks,
oxygen bottles, and sometimes nothing more than their bare hands. They
fight with icy storms at altitudes of 4,000 meters and above, coordinate big
teams distributed over several camps, and survive in the deadly zone near
the mountaintop.
But what if you are a beginner interested in mountain climbing? Do
you strap on the oxygen bottles and move out? No. Instead, you will probably start with an easy mountain. There are mountains with safe, clearly
marked paths to the top. All you need is a map and a pair of boots. Still, the
sight from the top of such a mountain can be breathtaking.
Programming is very similar to that. As a biologist learning to program, you do not need fancy equipment or tons of theoretical knowledge.
Even simple programs can be powerful tools to master your data. A lot of
programming can be done by collecting working fragments of code and
1
2 ◾ Managing Your Biological Data with Python
then assembling and modifying them. The result may not be as elegant
as a program written by a computer scientist, but it may solve a problem
quickly. Your problem.
We want this book to be the map that helps you to climb the mountains of
everyday data management. We want programming to make your life easier
without you necessarily becoming a professional software developer first.
In the first part, we would like you to make your first steps in the
Python programming language. You will see that commands in Python
are very intuitive and close to the English language, so you won’t need
much effort to learn and remember most of the Python instructions. For
example, if you want to calculate the length of a sequence, you just have to
type len('MALWMRLLPLLALLALWGPDPAA…'). The aim of the two chapters of Part I is not only to show how simple the Python syntax is but also
to make you scent the clever structure of the language. Python basically
consists of a set of modules (typically files where programming instructions are written) that you can connect to each other.
When learning a new language, e.g., German, you may start by reading a text and analyzing the nature, role, and position in the text of each
word. After reading and analyzing many texts, you will be able to extract
language rules and write your own texts. Alternatively, you can first learn
what kinds of object categories make up the language nouns, verbs, adjectives, etc. and the links between them (e.g., prepositions or German cases)
and then use the structure of the language, associated with a good dictionary, to write your texts. In this part of the book, you will start grasping that
Python is basically another language like English or German. In fact, it is
made up of a limited number of object types (nouns, verbs, etc.) that you
can connect to each other to form sentences. In this book, we blend the
two approaches described previously to learn German, by alternating code
examples that you can analyze and try with the explanation of language
object categories. To indicate what specific objects belong to each category,
Python provides a very good online dictionary, which is called the Python
Standard Library (http://docs.python.org/2/library/), where you can look
up the meaning of single words. Once the structure of the language is clear
to you, and you are able to play with the various object categories, most
will be done: at that stage you can basically improve your knowledge of the
language by increasing your vocabulary or using the dictionary efficiently.
The last step of learning is related to the good design of programs. This is
in general good practice and may turn out to be very useful if you need
to write big programs, efficiently collaborate with other programmers,
|