Tutorial-Biopython
94 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
94 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

Biopython Tutorial and CookbookJe Chang, Brad Chapman, Iddo Friedberg, Thomas Hamelryck, Michiel de Hoon, Peter CockLast Update{16 March 2007Contents1 Introduction 41.1 What is Biopython? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.1.1 What can I nd in the Biopython package . . . . . . . . . . . . . . . . . . . . . . . . . 41.2 Installing Biopython . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.3 FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Quick Start { What can you do with Biopython? 62.1 General overview of what Biopython provides . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2 Working with sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3 A usage example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.4 Parsing sequence le formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4.1 Simple FASTA parsing example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4.2 GenBank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.4.3 I love parsing { please don’t stop talking about it! . . . . . . . . . . . . . . . . . . . . 92.5 Connecting with biological databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.6 What to do next . . . . . . . . . . . . . ...

Informations

Publié par
Nombre de lectures 46
Langue English

Extrait

Biopython Tutorial and Cookbook
Je Chang, Brad Chapman, Iddo Friedberg, Thomas Hamelryck, Michiel de Hoon, Peter Cock
Last Update{16 March 2007Contents
1 Introduction 4
1.1 What is Biopython? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.1 What can I nd in the Biopython package . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Installing Biopython . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Quick Start { What can you do with Biopython? 6
2.1 General overview of what Biopython provides . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Working with sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 A usage example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 Parsing sequence le formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4.1 Simple FASTA parsing example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4.2 GenBank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4.3 I love parsing { please don’t stop talking about it! . . . . . . . . . . . . . . . . . . . . 9
2.5 Connecting with biological databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.6 What to do next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3 Sequence objects 12
3.1 Sequences and Alphabets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2 act like strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Slicing a sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 Turning Seq objects into strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4.1 Nucleotide sequences and (reverse) complements . . . . . . . . . . . . . . . . . . . . . 14
3.5 Concatenating or adding sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.6 MutableSeq objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.7 Transcribing and Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4 Sequence Input/Output 18
4.1 Parsing or Reading Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.1.1 Reading Sequence Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.1.2 GenBank Sequences from the net . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.1.3 Reading SwissProt from the net . . . . . . . . . . . . . . . . . . . . . . . . 19
4.1.4 Iterating over the records in a sequence le . . . . . . . . . . . . . . . . . . . . . . . . 20
4.1.5 Getting a list of the records in a le . . . . . . . . . . . . . . . . . . . . . . . 21
4.1.6 Extracting data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2 Sequence les as Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.1 Specifying the dictionary keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.2 Indexing a using the SEGUID checksum . . . . . . . . . . . . . . . . . . . . 24
4.3 Writing Sequence Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.1 Converting between sequence le formats . . . . . . . . . . . . . . . . . . . . . . . . . 26
14.3.2 Converting a le of sequences to their reverse complements . . . . . . . . . . . . . . . 26
5 BLAST 29
5.1 Running BLAST locally . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.2 over the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3 Saving BLAST output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.4 Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.5 The BLAST record class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.6 Deprecated BLAST parsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.6.1 Parsing plain-text BLAST output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.6.2 P a le full of runs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.6.3 Finding a bad record somewhere in a huge le . . . . . . . . . . . . . . . . . . . . . . 38
5.7 Dealing with PSIBlast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6 Cookbook { Cool things to do with it 41
6.1 SWISS-PROT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.1.1 Retrieving a SWISS-PROT record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.2 PubMed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.2.1 Sending a query to PubMed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.2.2 Retrieving a PubMed record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.3 GenBank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.3.1 Retrieving GenBank entries from NCBI . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.3.2 Parsing records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.3.3 Iterating over GenBank records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.3.4 Making your very own GenBank database . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.4 Dealing with alignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.4.1 Clustalw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.4.2 Calculating summary information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.4.3 a quick consensus sequence . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.4.4 Position Speci c Score Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.4.5 Information Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.4.6 Translating between Alignment formats . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.5 Substitution Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.5.1 Using common substitution matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.5.2 Creating your own matrix from an alignment . . . . . . . . . . . . . . . . 53
6.6 More Advanced Sequence Classes { Sequence IDs and Features . . . . . . . . . . . . . . . . . 55
6.6.1 Sequence ids and Descriptions { dealing with SeqRecords . . . . . . . . . . . . . . . . 55
6.6.2 Features and Annotations { SeqFeatures . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.7 BioRegistry { automatically nding sequence sources . . . . . . . . . . . . . . . . . . . . . . . 59
6.7.1 Finding resources using a con guration le . . . . . . . . . . . . . . . . . . . . . . . . 60
6.7.2 through a biopython speci c interface . . . . . . . . . . . . . . . . . 60
6.8 BioSQL { storing sequences in a relational database . . . . . . . . . . . . . . . . . . . . . . . 62
6.9 BioCorba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.10 Going 3D: The PDB module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.10.1 Structure representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.10.2 Disorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.10.3 Hetero residues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
6.10.4 Some random usage examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
6.10.5 Common problems in PDB les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
6.10.6 Other features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.11 Bio.PopGen: Population genetics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.11.1 GenePop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
26.11.2 Other applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6.11.3 Future Developments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
6.12 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
6.12.1 Translating a DNA sequence to Protein . . . . . . . . . . . . . . . . . . . . . . . . . . 76
7 Advanced 77
7.1 Sequence Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.2 Regression Testing Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.2.1 Writing a Regression Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.3 Parser Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
7.3.1 Design Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents