BIOINFORMATICS COMPUTING
1 Setting the Biological Scene 1 11 Introducing Biological Sequence Analysis 1 12 Protein and Polypeptides 4 13 Generalised Models and their Use 5 14 The Central Dogma of Molecular Biology 6 141 Transcription 6 142 Translation 7 15 Genome Sequencing 10 151 Sequence assembly 11 16 The Example DNA-gene-protein system we will use 12 Where to from Here 13 2 Setting the Technological Scene 15 21 The Layers of Technology 15 211 From passive user to active developer 16 22 Finding perl 17 221 Checking for perl 17 Where to from Here 18 I Working with Perl 19 3 TheBasics 21 31 Let’s Get Started! 21 311 Running Perl programs 22 312 Syntax and semantics 23 313 Program: run thyself! 25 32 Iteration 26 321 Using the Perl while construct 26 33 More Iterations 30 331 Introducing variable containers 31 332 Variable containers and loops 32 34 Selection 34 341 Using the Perl if construct 35 35 There Really is MTOWTDI 36 36 Processing Data Files 41 361 Asking getlines to do more 43 37 Introducing Patterns 44 Where to from Here 46 The Maxims Repeated 46 4 Places to Put Things 49 41 Beyond Scalars 49 42 Arrays: Associating Data with Numbers 49 421 Working with array elements 51 422 How big is the array? 51 423 Adding elements to an array 52 424 Removing elements from an array 54 425 Slicing arrays 54 426 Pushing, popping, shifting and unshifting 56 427 Processing every element in an array 57 428 Making lists easier to work with 59 43 Hashes: Associating Data with Words 60 431 Working with hash entries 61 432 How big is the hash? 61 433 Adding entries to a hash 62 434 Removing entries from a hash 62 435 Slicing hashes 63 436 Working with hash entries: a complete example 64 437 Processing every entry in a hash 66 Where to from Here 68 The Maxims Repeated 68 5 Getting Organised 71 51 Named Blocks 71 52 Introducing Subroutines 73 521 Calling subroutines 73 53 Creating Subroutines 74 531 Processing parameters 76 532 Better processing of parameters 78 533 Even better processing of parameters 80 534 A more flexible drawline subroutine 83 535 Returning results 84 54 Visibility and Scope 85 541 Using private variables 86 542 Using global variables properly 88 543 The final version of drawline 89 55 In-built Subroutines 90 56 Grouping and Reusing Subroutines 92 561 Modules 93 57 The Standard Modules 96 58 CPAN: The Module Repository 96 581 Searching CPAN 97 582 Installing a CPAN module manually 98 583 Installing a CPAN module automatically 99 584 A final word on CPAN modules 99 Where to from Here 100 The Maxims Repeated 100 6 About Files 103 61 I/O: Input and Output 103 611 The standard streams: STDIN, STDOUT and STDERR 103 62 Reading Files 105 621 Determining the disk-file names 106 622 Opening the named disk-files 108 623 Reading a line from each of the disk-files 110 624 Putting it all together 110 625 Slurping 114 63 Writing Files 116 631 Redirecting output 117 632 Variable interpolation 117 64 Chopping and Chomping 118 Where to from Here 119 The Maxims Repeated 119 7 Patterns, Patterns and More Patterns 121 71 Pattern Basics 121 711 What is a regular expression? 122 712 What makes regular expressions so special? 122 72 Introducing the Pattern Metacharacters 124 721 The + repetition metacharacter 124 722 The | alternation metacharacter 126 723 Metacharacter shorthand and character classes 127 724 More metacharacter shorthand 128 725 More repetition 130 726 The ? and * optional metacharacters 130 727 The any character metacharacter 131 73 Anchors 132 731 The \b word boundary metacharacter 132 732 The ^ start-of-line metacharacter 133 733 The $ end-of-line metacharacter 133 74 The Binding Operators 134 75 Remembering What Was Matched 135 76 Greedy by Default 137 77 Alternative Pattern Delimiters 138 78 Another Useful Utility 139 79 Substitutions: Search and Replace 140 791 Substituting for whitespace 141 710 Finding a Sequence 142 Where to from Here 146 The Maxims Repeated 146 8 Perl Grabbag 147 81 Introduction 147 82 Strictness 147 83 Perl One-liners 149 84 Running Other Programs from perl 152 85 Recovering from Errors 153 86 Sorting 155 87 HERE Documents 159 Where to from Here 160 The Maxims Repeated 161 II Working with Data 163 9 Downloading Datasets 165 91 Let’s Get Data 165 92 Downloading from the Web 165 921 Using wget to download PDB data-files 167 922 Mirroring a dataset 168 923 Smarter mirroring 168 924 Downloading a subset of a dataset 169 Where to from Here 171 The Maxims Repeated 171 10 The Protein Databank 173 101 Introduction 173 102 Determining Biomolecule Structures 174 1021 X-Ray Crystallography 174 1022 Nuclear magnetic resonance 176 1023 Summary of protein structure methods 177 103 The Protein Databank 177 104 The PDB Data-file Formats 179 1041 Example structures 180 1042 Downloading PDB data-files 181 105 Accessing Data in PDB Entries 182 106 Accessing PDB Annotation Data 183 1061 Free R and resolution 184 1062 Database cross references 186 1063 Coordinates section 188 1064 Extracting 3D coordinate data 191 107 Contact Maps 192 108 STRIDE: Secondary Structure Assignment 196 1081 Installation of STRIDE 197 109 Assigning Secondary Structures 197 1091 Using STRIDE and parsing the output 200 1092 Extracting amino acid sequences using STRIDE 204 1010 Introducing the mmCIF Protein Format 205 10101 Converting mmCIF to PDB 206 10102 Converting mmCIFs to PDB with CIFTr 206 10103 Problems with the CIFTr conversion 208 10104 Some advice on using mmCIF 208 10105 Automated conversion of mmCIF to PDB 208 Where to from Here 210 The Maxims Repeated 210 11 Non-redundant Datasets 211 111 Introducing Non-redundant Datasets 211 1111 Reasons for redundancy 211 1112 Reduction of redundancy 212 1113 Non-redundancy and non-representative 212 112 Non-redundant Protein Structures 213 Where to from Here 217 The Maxims Repeated 217 12 Databases 219 121 Introducing Databases 219 1211 Relating tables 220 1212 The problem with single-table databases 222 1213 Solving the one-table problem 222 1214 Database system: a definition 224 122 Available Database Systems 224 1221 Personal database systems 225 1222 Enterprise database systems 225 1223 Open source database systems 225 123 SQL: the Language of Databases 226 1231 Defining data with SQL 226 1232 Manipulating data with SQL 227 124 A Database Case Study: MER 227 1241 The requirement for the MER database 231 1242 Installing a database system 232 1243 Creating the MER database 233 1244 Adding tables to the MER database 235 1245 Preparing SWISS-PROT data for importation 238 1246 Importing tab-delimited data into proteins 245 1247 Working with the data in proteins 246 1248 Adding another table to the MER database 248 1249 Preparing EMBL data for importation 249 12410 Importing tab-delimited data into dnas 253 12411 Working with the data in dnas 253 12412 Relating data in one table to that in another 254 12413 Adding the crossrefs table to the MER database 255 12414 Preparing cross references for importation 256 12415 Importing tab-delimited data into crossrefs 259 12416 Working with the data in crossrefs 259 12417 Adding the citations table to the MER database 263 12418 Preparing citation information for importation 265 12419 Importing tab-delimited data into citations 268 12420 Working with the data in citations 268 Where to from Here 269 The Maxims Repeated 269 13 Databases and Perl 273 131 Why Program Databases? 273 132 Perl Database Technologies 274 133 Preparing Perl 275 1331 Checking the DBI installation 275 134 Programming Databases with DBI 276 1341 Developing a database utility module 279 1342 Improving upon dump results 280 135 Customising Output 282 136 Customising Input 285 137 Extending SQL 289 Where to from Here 292 The Maxims Repeated 292 III Working with the Web 295 14 The Sequence Retrieval System 297 141 An Example of What’s Possible 297 142 Why SRS? 298 143 Using SRS 298 Where to from Here 300 The Maxims Repeated 300 15 Web Technologies 303 151 The Web Development Infrastructure 303 152 Creating Content for the WWW 305 1521 The static creation of WWW content 308 1522 The dynamic creation of WWW content 308 153 Preparing Apache for Perl 310 1531 Testing the execution of server-side programs 312 154 Sending Data to a Web Server 315 155 Web Databases 320 Where to from Here 327 The Maxims Repeated 327 16 Web Automation 329 161 Why Automate Surfing? 329 162 Automated Surfing with Perl 330 Where to from Here 335 The Maxims Repeated 336 IV Working with Applications 337 17 Tools and Datasets 339 171 Introduction 339 172 Sequence Databases 340 1721 Understanding EMBL entries 343 1722 Understanding SWISS-PROT entries 346 1723 Summarising sequences databases 347 173 General Concepts and Methods 347 1731 Predictions and validation 348 1732 True/False/Negative/Positive 348 1733 Balancing the errors 351 1734 Using multiple algorithms to improve performance 352 1735 tRNA-ScanSE, a case study 353 174 Introducing Bioinformatics Tools 357 1741 ClustalW 358 1742 Algorithms and methods 359 1743 Installation and use 360 1744 Substitution/scoring matrices 361 175 BLAST 362 1751 Installing NCBI-BLAST 364 1752 Preparation of database files for faster searching 365 1753 The different types of BLAST search 369 1754 Final words on BLAST 371 Where to from Here 371 The Maxims Repeated 371 18 Applications 373 181 Introduction 373 182 Scientific Background to Mer Operon 374 1821 Function 374 1822 Genetic structure and regulation 374 1823 Mobility of the Mer Operon 375 183 Downloading the Raw DNA Sequence 377 184 Initial BLAST Sequence Similarity Search 378 185 GeneMark 380 1851 Using BLAST to identify specific sequences 382 1852 Dealing with false negatives and missing proteins 386 1853 Over-predicted genes and false positives 387 1854 Summary of validation of GeneMark prediction 388 186 Structural Prediction with SWISS-MODEL 388 1861 Alternatives to homology modelling 390 1862 Modelling with SWISS-MODEL 390 187 DeepView as a Structural Alignment Tool 396 188 PROSITE and Sequence Motifs 401 1881 Using PROSITE patterns and matrices 402 1882 Downloading PROSITE and its search tools 403 1883 Final word on PROSITE 407 189 Phylogenetics 407 1891 A look at the HMA domain of MerA and MerP 407 Where to from Here? 410 The Maxims Repeated 411 19 Data Visualisation 413 191 Introducing Visualisation 413 192 Displaying Tabular Data Using HTML 415 1921 Displaying SWISS-PROT identifiers 417 193 Creating High-quality Graphics with GD 422 1931 Using the GD module 424 1932 Displaying genes in EMBL entries 426 1933 Introducing mogrify 429 194 Plotting Graphs 431 1941 Graph-plotting using the GD::Graph modules 432 1942 Graph-plotting using Grace 433 Where to from Here 439 The Maxims Repeated 439 20 Introducing Bioperl 441 201 What is Bioperl? 441 202 Bioperl’s Relationship to Project Ensembl 442 203 Installing Bioperl 442 204 Using Bioperl: Fetching Sequences 444 2041 Fetching multiple sequences 445 2042 Extracting sub-sequences 447 205 Remote BLAST Searches 448 2051 A quick aside: the blastcl3 NetBlast client 449 2052 Parsing BLAST outputs 450 Where to from Here 451 The Maxims Repeated 452