1. Trang chủ
  2. » Tất cả

Python for Bioinformatics (2010)

584 0 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 584
Dung lượng 6,97 MB

Nội dung

PYTHON FOR BIOINFORMATICS © 2010 by Taylor and Francis Group, LLC CHAPMAN & HALL/CRC Mathematical and Computational Biology Series Aims and scope: This series aims to capture new developments and summarize what is known over the whole spectrum of mathematical and computational biology and medicine It seeks to encourage the integration of mathematical, statistical and computational methods into biology by publishing a broad range of textbooks, reference works and handbooks The titles included in the series are meant to appeal to students, researchers and professionals in the mathematical, statistical and computational sciences, fundamental biology and bioengineering, as well as interdisciplinary researchers involved in the field The inclusion of concrete examples and applications, and programming techniques and examples, is highly encouraged Series Editors Alison M Etheridge Department of Statistics University of Oxford Louis J Gross Department of Ecology and Evolutionary Biology University of Tennessee Suzanne Lenhart Department of Mathematics University of Tennessee Philip K Maini Mathematical Institute University of Oxford Shoba Ranganathan Research Institute of Biotechnology Macquarie University Hershel M Safer Weizmann Institute of Science Bioinformatics & Bio Computing Eberhard O Voit The Wallace H Couter Department of Biomedical Engineering Georgia Tech and Emory University Proposals for the series should be submitted to one of the series editors above or directly to: CRC Press, Taylor & Francis Group 4th, Floor, Albert House 1-4 Singer Street London EC2A 4BQ UK © 2010 by Taylor and Francis Group, LLC Published Titles Bioinformatics: A Practical Approach Shui Qing Ye Cancer Modelling and Simulation Luigi Preziosi Combinatorial Pattern Matching Algorithms in Computational Biology Using Perl and R Gabriel Valiente Computational Biology: A Statistical Mechanics Perspective Ralf Blossey Computational Neuroscience: A Comprehensive Approach Jianfeng Feng Data Analysis Tools for DNA Microarrays Sorin Draghici Differential Equations and Mathematical Biology D.S Jones and B.D Sleeman Engineering Genetic Circuits Chris J Myers Exactly Solvable Models of Biological Invasion Sergei V Petrovskii and Bai-Lian Li Gene Expression Studies Using Affymetrix Microarrays Hinrich Göhlmann and Willem Talloen Handbook of Hidden Markov Models in Bioinformatics Martin Gollery Introduction to Bioinformatics Anna Tramontano An Introduction to Systems Biology: Design Principles of Biological Circuits Uri Alon Kinetic Modelling in Systems Biology Oleg Demin and Igor Goryanin Knowledge Discovery in Proteomics Igor Jurisica and Dennis Wigle © 2010 by Taylor and Francis Group, LLC Meta-analysis and Combining Information in Genetics and Genomics Rudy Guerra and Darlene R Goldstein Modeling and Simulation of Capsules and Biological Cells C Pozrikidis Niche Modeling: Predictions from Statistical Distributions David Stockwell Normal Mode Analysis: Theory and Applications to Biological and Chemical Systems Qiang Cui and Ivet Bahar Optimal Control Applied to Biological Models Suzanne Lenhart and John T Workman Pattern Discovery in Bioinformatics: Theory & Algorithms Laxmi Parida Python for Bioinformatics Sebastian Bassi Spatial Ecology Stephen Cantrell, Chris Cosner, and Shigui Ruan Spatiotemporal Patterns in Ecology and Epidemiology: Theory, Models,  and Simulation Horst Malchow, Sergei V Petrovskii, and Ezio Venturino Stochastic Modelling for Systems Biology Darren J Wilkinson Structural Bioinformatics: An Algorithmic Approach Forbes J Burkowski The Ten Most Wanted Solutions in Protein Bioinformatics Anna Tramontano PYTHON FOR BIOINFORMATICS SEBASTIAN BASSI © 2010 by Taylor and Francis Group, LLC Chapman & Hall/CRC Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2010 by Taylor and Francis Group, LLC Chapman & Hall/CRC is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S Government works Printed in the United States of America on acid-free paper 10 International Standard Book Number: 978-1-58488-929-8 (Paperback) This book contains information obtained from authentic and highly regarded sources Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint Except as permitted under U.S Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers For permission to photocopy or use material electronically from this work, please access www.copyright com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400 CCC is a not-for-profit organization that provides licenses and registration for a variety of users For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe Library of Congress Cataloging‑in‑Publication Data Bassi, Sebastian Python for bioinformatics / Sebastian Bassi p cm (Mathematical and computational biology series) Includes bibliographical references and index ISBN 978-1-58488-929-8 (pbk : alk paper) Bioinformatics Python (Computer program language) I Title II Series QH324.2.B387 2009 570.285 dc22 Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com © 2010 by Taylor and Francis Group, LLC 2009025700 Contents List of Tables xix List of Figures xxi Preface xxiii Acknowledgments I xxv Programming 1 Introduction 1.1 Who Should Read This Book 1.1.1 What You Should Already Know 1.2 Using this Book 1.2.1 Python Versions 1.2.2 Typographical Conventions 1.2.3 Code Style 1.2.4 Get the Most from This Book without Reading 1.3 Why Learn to Program? 1.4 Basic Programming Concepts 1.4.1 What Is a Program? 1.5 Why Python? 1.5.1 Main Features of Python 1.5.2 Comparing Python with Other Languages 1.5.3 How It Is Used? 1.5.4 Who Uses Python? 1.5.5 Flavors of Python 1.5.6 Special Python Bundles It All 3 4 6 7 10 11 13 15 15 16 First Steps with Python 2.1 Installing Python 2.1.1 Learn Python by Using It 2.1.2 Python May Be Already Installed 2.1.3 Testing Python 2.1.4 First Use 2.2 Interactive Mode 2.2.1 Baby Steps 19 19 19 19 20 20 20 20 vii © 2010 by Taylor and Francis Group, LLC viii Contents 21 22 24 25 26 28 29 30 31 32 33 35 35 37 38 Basic Programming: Data Types 3.1 Strings 3.1.1 Not All Strings Are Created Equal 3.1.2 String Manipulation 3.1.3 Methods Associated with Strings 3.2 Lists 3.2.1 List Is the Workhorse Datatype in Python 3.2.2 List Initialization 3.2.3 List Comprehension 3.2.4 Accessing List Elements 3.2.5 Copying a List 3.2.6 Modifying Lists 3.3 Tuples 3.3.1 Tuples Are Immutable Lists 3.4 Common Properties of the Sequences 3.5 Dictionaries 3.5.1 Mapping: Calling Each Value by a Name 3.5.2 Operating with Dictionaries 3.5.3 New in Python 3: Dictionary Views 3.6 Sets 3.6.1 Unordered Collection of Objects 3.6.2 Set Operations 3.6.3 Shared Operations with Other Data Types 3.6.4 Immutable Set: Frozenset 3.7 Naming Objects 3.8 Assigning a Value to a Variable versus Binding a Name to an Object 3.9 Additional Resources 3.10 Self-Evaluation 39 39 40 41 42 44 44 45 45 46 47 47 49 49 51 55 55 57 58 60 60 61 63 64 64 2.3 2.4 2.5 2.6 2.2.2 Basic Input and Output 2.2.3 More on the Interactive Mode 2.2.4 Mathematical Operations 2.2.5 Exit from Python Shell Batch Mode 2.3.1 Comments 2.3.2 Indentation Choosing an Editor 2.4.1 Kate 2.4.2 Eric 2.4.3 Eclipse 2.4.4 IDLE 2.4.5 Final Words about Editors Additional Resources Self-Evaluation © 2010 by Taylor and Francis Group, LLC 65 68 70 Contents ix Programming: Flow Control 4.1 If-Else 4.1.1 Pass Statement 4.2 For Loop 4.3 While Loop 4.4 Break: Breaking the Loop 4.5 Wrapping It Up 4.5.1 Estimate the Net Charge of a Protein 4.5.2 Search for a Low Degeneration Zone 4.6 Additional Resources 4.7 Self-Evaluation 71 71 75 76 78 79 81 81 82 85 86 Dealing with Files 5.1 Reading Files 5.1.1 Example of File Handling 5.2 Writing Files 5.2.1 File Reading and Writing Examples 5.3 A Special Kind of File: CSV 5.3.1 More Functions from the CSV Module 5.4 Pickle: Storing the Contents of Variables 5.5 File Handling: os Module 5.5.1 Consolidate Multiple DNA or Protein Sequences into One FASTA File 5.5.2 Estimating Net Charge of Several Proteins 5.6 With: An Alternative Way to Open Files 5.7 Additional Resources 5.8 Self-Evaluation 99 100 101 102 103 Code Modularizing 6.1 Functions 6.1.1 Standard Way to Modularize Python 6.1.2 Function Parameter Options 6.1.3 Generators 6.2 Modules 6.2.1 Using Modules 6.2.2 Installing Modules 6.2.3 Creating Modules 6.2.4 Testing Our Modules 6.3 Additional Resources 6.4 Self-Evaluation 105 105 105 109 112 113 114 115 120 120 123 124 © 2010 by Taylor and Francis Group, LLC Code 87 87 88 91 91 92 94 96 97 x Contents Error Handling 7.1 Introduction to Error Handling 7.1.1 Try and Except 7.1.2 Exception Types 7.1.3 Provoking Exceptions 7.2 Creating Customized Exceptions 7.3 Additional Resources 7.4 Self-Evaluation 125 125 127 132 134 135 136 137 Introduction to Object Orienting Programming (OOP) 8.1 Object Paradigm and Python 8.2 Exploring the Jargon 8.3 Creating Classes 8.4 Inheritance in Action 8.5 Special Methods Attributes 8.5.1 Create a New Data Type Out of a Built-in Data Type 8.6 Making Our Code Private 8.7 Additional Resources 8.8 Self-Evaluation 139 139 140 142 146 149 153 154 155 157 Regular Expressions 9.1 Introduction to Regular Expressions (REGEX) 9.1.1 REGEX Syntax 9.2 The re Module 9.2.1 Compiling a Pattern 9.2.2 REGEX Examples 9.2.3 Pattern Replace 9.3 REGEX in Bioinformatics 9.3.1 Cleaning Up a Sequence 9.4 Additional Resources 9.5 Self-Evaluation 159 159 160 161 163 166 167 168 170 170 172 II Biopython 10 Introduction to Biopython 10.1 What Is Biopython? 10.1.1 Project Organization 10.2 Biopython Components 10.2.1 Alphabet 10.2.2 Seq 10.2.3 MutableSeq 10.2.4 SeqRecord 10.2.5 Align 10.2.6 ClustalW 10.2.7 SeqIO © 2010 by Taylor and Francis Group, LLC 173 175 175 175 176 177 178 180 180 182 184 187 ... Modelling for Systems Biology Darren J Wilkinson Structural Bioinformatics: An Algorithmic Approach Forbes J Burkowski The Ten Most Wanted Solutions in Protein Bioinformatics Anna Tramontano PYTHON FOR. .. most frequently performed in bioinformatics The tool of choice for this task is XML This standard is becoming a widely used platform for data interchange between applications Python has several... Models Suzanne Lenhart and John T Workman Pattern Discovery in Bioinformatics: Theory & Algorithms Laxmi Parida Python for Bioinformatics Sebastian Bassi Spatial Ecology Stephen Cantrell, Chris

Ngày đăng: 13/04/2019, 01:43