ebook img

Python for Bioinformatics, Second Edition PDF

451 Pages·2017·4.971 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Python for Bioinformatics, Second Edition

PYTHON FOR BIOINFORMATICS SECOND EDITION 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 entire 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 N. F. Britton Department of Mathematical Sciences University of Bath Xihong Lin Department of Biostatistics Harvard University Nicola Mulder University of Cape Town South Africa Maria Victoria Schneider European Bioinformatics Institute Mona Singh Department of Computer Science Princeton University Anna Tramontano Department of Physics University of Rome La Sapienza Proposals for the series should be submitted to one of the series editors above or directly to: CRC Press, Taylor & Francis Group 3 Park Square, Milton Park Abingdon, Oxfordshire OX14 4RN UK Published Titles An Introduction to Systems Biology: Statistical Methods for QTL Mapping Design Principles of Biological Circuits Zehua Chen Uri Alon An Introduction to Physical Oncology: Glycome Informatics: Methods and How Mechanistic Mathematical Applications Modeling Can Improve Cancer Therapy Kiyoko F. Aoki-Kinoshita Outcomes Vittorio Cristini, Eugene J. Koay, Computational Systems Biology of and Zhihui Wang Cancer Emmanuel Barillot, Laurence Calzone, Normal Mode Analysis: Theory and Philippe Hupé, Jean-Philippe Vert, and Applications to Biological and Chemical Andrei Zinovyev Systems Qiang Cui and Ivet Bahar Python for Bioinformatics, Second Edition Sebastian Bassi Kinetic Modelling in Systems Biology Oleg Demin and Igor Goryanin Quantitative Biology: From Molecular to Cellular Systems Data Analysis Tools for DNA Microarrays Sebastian Bassi Sorin Draghici Methods in Medical Informatics: Statistics and Data Analysis for Fundamentals of Healthcare Microarrays Using R and Bioconductor, Programming in Perl, Python, and Ruby Second Edition Jules J. Berman Sorin Dra˘ghici Chromatin: Structure, Dynamics, Computational Neuroscience: Regulation A Comprehensive Approach Ralf Blossey Jianfeng Feng Computational Biology: A Statistical Biological Sequence Analysis Using Mechanics Perspective the SeqAn C++ Library Ralf Blossey Andreas Gogol-Döring and Knut Reinert Game-Theoretical Models in Biology Gene Expression Studies Using Mark Broom and Jan Rychtáˇr Affymetrix Microarrays Hinrich Göhlmann and Willem Talloen Computational and Visualization Techniques for Structural Bioinformatics Handbook of Hidden Markov Models Using Chimera in Bioinformatics Forbes J. Burkowski Martin Gollery Structural Bioinformatics: An Algorithmic Meta-analysis and Combining Approach Information in Genetics and Genomics Forbes J. Burkowski Rudy Guerra and Darlene R. Goldstein Spatial Ecology Differential Equations and Mathematical Stephen Cantrell, Chris Cosner, and Biology, Second Edition Shigui Ruan D.S. Jones, M.J. Plank, and B.D. Sleeman Cell Mechanics: From Single Scale- Knowledge Discovery in Proteomics Based Models to Multiscale Modeling Igor Jurisica and Dennis Wigle Arnaud Chauvière, Luigi Preziosi, Introduction to Proteins: Structure, and Claude Verdier Function, and Motion Bayesian Phylogenetics: Methods, Amit Kessel and Nir Ben-Tal Algorithms, and Applications Ming-Hui Chen, Lynn Kuo, and Paul O. Lewis Published Titles (continued) RNA-seq Data Analysis: A Practical Introduction to Bio-Ontologies Approach Peter N. Robinson and Sebastian Bauer Eija Korpelainen, Jarno Tuimala, Dynamics of Biological Systems Panu Somervuo, Mikael Huss, and Garry Wong Michael Small Introduction to Mathematical Oncology Genome Annotation Yang Kuang, John D. Nagy, and Jung Soh, Paul M.K. Gordon, and Steffen E. Eikenberry Christoph W. Sensen Biological Computation Niche Modeling: Predictions from Ehud Lamm and Ron Unger Statistical Distributions Optimal Control Applied to Biological David Stockwell Models Algorithms for Next-Generation Suzanne Lenhart and John T. Workman Sequencing Clustering in Bioinformatics and Drug Wing-Kin Sung Discovery Algorithms in Bioinformatics: A Practical John D. MacCuish and Norah E. MacCuish Introduction Spatiotemporal Patterns in Ecology Wing-Kin Sung and Epidemiology: Theory, Models, Introduction to Bioinformatics and Simulation Anna Tramontano Horst Malchow, Sergei V. Petrovskii, and The Ten Most Wanted Solutions in Ezio Venturino Protein Bioinformatics Stochastic Dynamics for Systems Anna Tramontano Biology Combinatorial Pattern Matching Christian Mazza and Michel Benaïm Algorithms in Computational Biology Statistical Modeling and Machine Using Perl and R Learning for Molecular Biology Gabriel Valiente Alan M. Moses Managing Your Biological Data with Engineering Genetic Circuits Python Chris J. Myers Allegra Via, Kristian Rother, and Pattern Discovery in Bioinformatics: Anna Tramontano Theory & Algorithms Cancer Systems Biology Laxmi Parida Edwin Wang Exactly Solvable Models of Biological Stochastic Modelling for Systems Invasion Biology, Second Edition Sergei V. Petrovskii and Bai-Lian Li Darren J. Wilkinson Computational Hydrodynamics of Big Data Analysis for Bioinformatics and Capsules and Biological Cells Biomedical Discoveries C. Pozrikidis Shui Qing Ye Modeling and Simulation of Capsules Bioinformatics: A Practical Approach and Biological Cells Shui Qing Ye C. Pozrikidis Introduction to Computational Cancer Modelling and Simulation Proteomics Luigi Preziosi Golan Yona PYTHON FOR BIOINFORMATICS SECOND EDITION SEBASTIAN BASSI MATLAB• is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does not warrant the accuracy of the text or exercises in this book. This book’s use or discussion of MATLAB• software or related products does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular use of the MATLAB• software. CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2018 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Printed on acid-free paper Version Date: 20170626 International Standard Book Number-13: 978-1-1380-3526-3 (Hardback) 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 Names: Bassi, Sebastian, author. Title: Python for bioinformatics / Sebastian Bassi. Description: Second edition. | Boca Raton : CRC Press, 2017. | Series: Chapman & Hall/CRC mathematical and computational biology | Includes bibliographical references and index. Identifiers: LCCN 2017014460| ISBN 9781138035263 (pbk. : alk. paper) | ISBN 9781138094376 (hardback : alk. paper) | ISBN 9781315268743 (ebook) | ISBN 9781351976961 (ebook) | ISBN 9781351976954 (ebook) | ISBN 9781351976947 (ebook) Subjects: LCSH: Bioinformatics. | Python (Computer program language) Classification: LCC QH324.2 .B387 2017 | DDC 570.285--dc23 LC record available at https://lccn.loc.gov/2017014460 Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com Contents List of Figures xvii List of Tables xxi Preface to the First Edition xxiii Preface to the Second Edition xxv Acknowledgments xxix Section I Programming Chapter 1(cid:4) Introduction 3 1.1 WHOSHOULDREADTHISBOOK 3 1.1.1 What the Reader Should Already Know 4 1.2 USINGTHISBOOK 4 1.2.1 Typographical Conventions 4 1.2.2 Python Versions 5 1.2.3 Code Style 5 1.2.4 Get the Most from This Book without Reading It All 6 1.2.5 Online Resources Related to This Book 7 1.3 WHYLEARNTOPROGRAM? 7 1.4 BASICPROGRAMMING CONCEPTS 8 1.4.1 What Is a Program? 8 1.5 WHYPYTHON? 10 1.5.1 Main Features of Python 10 1.5.2 Comparing Python with Other Languages 11 1.5.3 How Is It Used? 14 1.5.4 Who Uses Python? 15 1.5.5 Flavors of Python 15 1.5.6 Special Python Distributions 16 1.6 ADDITIONALRESOURCES 17 vii viii (cid:4) Contents Chapter 2(cid:4) First Steps with Python 19 2.1 INSTALLINGPYTHON 20 2.1.1 Learn Python by Using It 20 2.1.2 Install Python Locally 20 2.1.3 Using Python Online 21 2.1.4 Testing Python 22 2.1.5 First Use 22 2.2 INTERACTIVEMODE 23 2.2.1 Baby Steps 23 2.2.2 Basic Input and Output 23 2.2.3 More on the Interactive Mode 24 2.2.4 Mathematical Operations 26 2.2.5 Exit from the Python Shell 27 2.3 BATCHMODE 27 2.3.1 Comments 29 2.3.2 Indentation 30 2.4 CHOOSINGANEDITOR 32 2.4.1 Sublime Text 32 2.4.2 Atom 33 2.4.3 PyCharm 34 2.4.4 Spyder IDE 35 2.4.5 Final Words about Editors 36 2.5 OTHERTOOLS 36 2.6 ADDITIONALRESOURCES 37 2.7 SELF-EVALUATION 37 Chapter 3(cid:4) Basic Programming:Data Types 39 3.1 STRINGS 40 3.1.1 Strings Are Sequences of Unicode Characters 41 3.1.2 String Manipulation 42 3.1.3 Methods Associated with Strings 42 3.2 LISTS 44 3.2.1 Accessing List Elements 45 3.2.2 List with Multiple Repeated Items 45 3.2.3 List Comprehension 46 3.2.4 Modifying Lists 47 Contents (cid:4) ix 3.2.5 Copying a List 49 3.3 TUPLES 49 3.3.1 Tuples Are Immutable Lists 49 3.4 COMMON PROPERTIESOFTHESEQUENCES 51 3.5 DICTIONARIES 54 3.5.1 Mapping: Calling Each Value by a Name 54 3.5.2 Operating with Dictionaries 56 3.6 SETS 59 3.6.1 Unordered Collection of Objects 59 3.6.2 Set Operations 60 3.6.3 Shared Operations with Other Data Types 62 3.6.4 Immutable Set: Frozenset 63 3.7 NAMINGOBJECTS 63 3.8 ASSIGNINGA VALUE TO A VARIABLEVERSUSBINDINGA NAME TOANOBJECT 64 3.9 ADDITIONALRESOURCES 67 3.10 SELF-EVALUATION 68 Chapter 4(cid:4) Programming:FlowControl 69 4.1 IF-ELSE 69 4.1.1 Pass Statement 74 4.2 FORLOOP 75 4.3 WHILELOOP 77 4.4 BREAK:BREAKINGTHELOOP 78 4.5 WRAPPINGITUP 80 4.5.1 Estimate the Net Charge of a Protein 80 4.5.2 Search for a Low-Degeneration Zone 81 4.6 ADDITIONALRESOURCES 83 4.7 SELF-EVALUATION 83 Chapter 5(cid:4) Handling Files 85 5.1 READINGFILES 86 5.1.1 Example of File Handling 87 5.2 WRITINGFILES 89 5.2.1 File Reading and Writing Examples 90 5.3 CSVFILES 90

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.