Biopython

bosc
The 8th annual Bioinformatics Open Source Conference (BOSC 2007) 18 th  July, Vienna, Austria Biopython Project Update Peter Cock, MOAC Doctoral Training Centre, University of Warwick, UK
Talk Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
What is Python? ,[object Object],[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
What is Biopython? ,[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Popularity by Google Hits ,[object Object],[object Object],[object Object],[object Object],98 million 101 million 101 million 289 million ,[object Object],[object Object],[object Object],[object Object],252,000 610,000 122,000 185,000 ,[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria BioPerl  610,000
Biopython history ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Biopython Project Organisation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
What can you do with Biopython? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Manipulating Sequences ,[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Manipulating Sequences from Bio.Seq import Seq from Bio.Alphabet.IUPAC import unambiguous_dna my_dna=Seq('CTAAACATCCTTCAT', unambiguous_dna) print 'Original:' print my_dna print 'Reverse complement:' print my_dna.reverse_complement() Original: Seq('CTAAACATCCTTCAT', IUPACUnambiguousDNA()) Reverse complement: Seq('ATGAAGGATGTTTAG', IUPACUnambiguousDNA()) The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Translating Sequences from Bio import Translate bact_trans=Translate.unambiguous_dna_by_id[11] print 'Forward translation' print bact_trans.translate(my_dna) print 'Reverse complement translation' print bact_trans.translate( my_dna.reverse_complement()) Forward translation Seq('LNILH', HasStopCodon(IUPACProtein(), '*')) Reverse complement translation Seq('MKDV*', HasStopCodon(IUPACProtein(), '*')) The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Sequence Input/Output ,[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
SeqIO – Sequence Input from Bio import SeqIO handle = open('ls_orchid.fasta') format = 'fasta' for rec in SeqIO.parse(handle, format) : print "%s, len %i" % (rec.id, len(rec.seq)) print rec.seq[:40].tostring() + "..." handle.close() gi|2765658|emb|Z78533.1|CIZ78533, len 740 CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCAT... gi|2765657|emb|Z78532.1|CCZ78532, len 753 CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCAT... ... The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
SeqIO – Sequence Input from Bio import SeqIO handle = open('ls_orchid.gbk') format = 'genbank' for rec in SeqIO.parse(handle, format) : print "%s, len %i" % (rec.id, len(rec.seq)) print rec.seq[:40].tostring() + "..." handle.close() The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria Z78533.1, len 740 CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCAT... Z78532.1, len 753 CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCAT... ...
SeqIO – Extracting Data from Bio import SeqIO handle = open('ls_orchid.gbk') format = 'genbank' from sets import Set print Set([rec.annotations['organism'] for rec in SeqIO.parse(handle, format)]) handle.close() Set(['Cypripedium acaule', 'Paphiopedilum primulinum', 'Phragmipedium lindenii', 'Paphiopedilum papuanum', 'Paphiopedilum stonei', 'Paphiopedilum urbanianum', 'Paphiopedilum dianthum', ...]) The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
SeqIO – Filtering Output i_handle = open('ls_orchid.gbk') o_handle = open('small_orchid.faa', 'w') SeqIO.write([rec for rec in SeqIO.parse(i_handle, 'genbank') if len(rec.seq) < 600], o_handle, 'fasta') i_handle.close() o_handle.close() >Z78481.1 P.insigne 5.8S rRNA gene and ITS1 ... CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCATTGTT... >Z78480.1 P.gratrixianum 5.8S rRNA gene and ... CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCATTGTT... ... The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
3D Structures ,[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Newick Tree Parsing (Bovine:0.69395,(Gibbon:0.36079,(Orang:0.33636,(Gorilla:0.17147,(Chimp:0.19268, Human:0.11927):0.08386):0.06124):0.15057):0.54939,Mouse:1.21460):0.10; from Bio.Nexus.Trees import Tree tree_str = open(&quot;simple.tree&quot;).read() tree_obj = Tree(tree_str) print tree_obj tree a_tree = (Bovine,(Gibbon,(Orang,(Gorilla, (Chimp,Human)))),Mouse); The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Newick Tree Parsing #  taxon  prev  succ  brlen  blen (sum) support 0  -  None  [1,2,11]  0.0  0.0  - 1  Bovine  0  []  0.69395  0.69395  - 2  -  0  [3,4]  0.54939  0.54939  - 3  Gibbon  2  []  0.36079  0.91018  - 4  -  2  [5,6]  0.15057  0.69996  - 5  Orang  4  []  0.33636  1.03632  - 6  -  4  [7,8]  0.06124  0.7612  - 7  Gorilla  6  []  0.17147  0.93267  - 8  -  6  [9,10]  0.08386  0.84506  - 9  Chimp  8  []  0.19268  1.03774  - 10  Human  8  []  0.11927  0.96433  - 11  Mouse  0  []  1.2146  1.2146  - Root: 0 tree_obj.display() The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
3D Structures ,[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Working with 3D Structures http://www.warwick.ac.uk/go/peter_cock/ python/protein_superposition/ This example (online) uses Bio.PDB to align 21 alternative X-Ray crystal structures for PDB structure 1JOY. Before:  After: The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Population Genetics  (planned) ,[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Areas for Improvement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
How can you Contribute? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Biopython Acknowledgements ,[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Personal Acknowledgements ,[object Object],[object Object],[object Object],[object Object],The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
Questions? The 8 th  annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
1 of 27

Recommended

Biopython by
BiopythonBiopython
BiopythonKarin Lagesen
3K views29 slides
The ensembl database by
The ensembl databaseThe ensembl database
The ensembl databaseAshfaq Ahmad
4K views17 slides
Gen bank by
Gen bankGen bank
Gen bankVidya Kalaivani Rajkumar
17.1K views21 slides
BITS: UCSC genome browser - Part 1 by
BITS: UCSC genome browser - Part 1BITS: UCSC genome browser - Part 1
BITS: UCSC genome browser - Part 1BITS
7K views88 slides
15 molecular markers techniques by
15 molecular markers techniques15 molecular markers techniques
15 molecular markers techniquesAVINASH KUSHWAHA
16.5K views34 slides

More Related Content

What's hot

Gene prediction methods vijay by
Gene prediction methods  vijayGene prediction methods  vijay
Gene prediction methods vijayVijay Hemmadi
26.5K views33 slides
Major databases in bioinformatics by
Major databases in bioinformaticsMajor databases in bioinformatics
Major databases in bioinformaticsVidya Kalaivani Rajkumar
54.7K views63 slides
Web based servers and softwares for genome analysis by
Web based servers and softwares for genome analysisWeb based servers and softwares for genome analysis
Web based servers and softwares for genome analysisDr. Naveen Gaurav srivastava
3.1K views12 slides
Functional proteomics, and tools by
Functional proteomics, and toolsFunctional proteomics, and tools
Functional proteomics, and toolsKAUSHAL SAHU
1K views24 slides
Introduction to sequence alignment partii by
Introduction to sequence alignment partiiIntroduction to sequence alignment partii
Introduction to sequence alignment partiiSumatiHajela
3.8K views23 slides
Sequence Submission Tools by
Sequence Submission ToolsSequence Submission Tools
Sequence Submission ToolsRishikaMaji
6.8K views16 slides

What's hot(20)

Gene prediction methods vijay by Vijay Hemmadi
Gene prediction methods  vijayGene prediction methods  vijay
Gene prediction methods vijay
Vijay Hemmadi26.5K views
Functional proteomics, and tools by KAUSHAL SAHU
Functional proteomics, and toolsFunctional proteomics, and tools
Functional proteomics, and tools
KAUSHAL SAHU1K views
Introduction to sequence alignment partii by SumatiHajela
Introduction to sequence alignment partiiIntroduction to sequence alignment partii
Introduction to sequence alignment partii
SumatiHajela3.8K views
Sequence Submission Tools by RishikaMaji
Sequence Submission ToolsSequence Submission Tools
Sequence Submission Tools
RishikaMaji6.8K views
Computational Biology and Bioinformatics by Sharif Shuvo
Computational Biology and BioinformaticsComputational Biology and Bioinformatics
Computational Biology and Bioinformatics
Sharif Shuvo11.3K views
Kegg by msfbi1521
KeggKegg
Kegg
msfbi152112.5K views
Blast and fasta by ALLIENU
Blast and fastaBlast and fasta
Blast and fasta
ALLIENU23.5K views
Cath by Ramya S
CathCath
Cath
Ramya S17.9K views
Tools of bioinforformatics by kk by KAUSHAL SAHU
Tools of bioinforformatics by kkTools of bioinforformatics by kk
Tools of bioinforformatics by kk
KAUSHAL SAHU6.7K views

Similar to Biopython

BOSC 2008 Biopython by
BOSC 2008 BiopythonBOSC 2008 Biopython
BOSC 2008 Biopythontiago
895 views18 slides
Antao Biopython Bosc2008 by
Antao Biopython Bosc2008Antao Biopython Bosc2008
Antao Biopython Bosc2008bosc_2008
1.3K views18 slides
Cock Biopython Bosc2009 by
Cock Biopython Bosc2009Cock Biopython Bosc2009
Cock Biopython Bosc2009bosc
3.1K views16 slides
Talk6 biopython bosc2011 by
Talk6 biopython bosc2011Talk6 biopython bosc2011
Talk6 biopython bosc2011Bioinformatics Open Source Conference
1.3K views14 slides
The ProteomeXchange Consoritum: 2017 update by
The ProteomeXchange Consoritum: 2017 updateThe ProteomeXchange Consoritum: 2017 update
The ProteomeXchange Consoritum: 2017 updateJuan Antonio Vizcaino
254 views22 slides
Accessing and scripting CDK from Bioclipse by
Accessing and scripting CDK from BioclipseAccessing and scripting CDK from Bioclipse
Accessing and scripting CDK from BioclipseOla Spjuth
1.1K views49 slides

Similar to Biopython(20)

BOSC 2008 Biopython by tiago
BOSC 2008 BiopythonBOSC 2008 Biopython
BOSC 2008 Biopython
tiago895 views
Antao Biopython Bosc2008 by bosc_2008
Antao Biopython Bosc2008Antao Biopython Bosc2008
Antao Biopython Bosc2008
bosc_20081.3K views
Cock Biopython Bosc2009 by bosc
Cock Biopython Bosc2009Cock Biopython Bosc2009
Cock Biopython Bosc2009
bosc3.1K views
Accessing and scripting CDK from Bioclipse by Ola Spjuth
Accessing and scripting CDK from BioclipseAccessing and scripting CDK from Bioclipse
Accessing and scripting CDK from Bioclipse
Ola Spjuth1.1K views
Java Introductie by mbruggen
Java IntroductieJava Introductie
Java Introductie
mbruggen682 views
Biopython Project Update 2013 by pjacock
Biopython Project Update 2013Biopython Project Update 2013
Biopython Project Update 2013
pjacock3.1K views
Prins Bio Lib Bosc 2009 by bosc
Prins Bio Lib Bosc 2009Prins Bio Lib Bosc 2009
Prins Bio Lib Bosc 2009
bosc906 views
ICAR 2015 Workshop - Nick Provart by Araport
ICAR 2015 Workshop - Nick ProvartICAR 2015 Workshop - Nick Provart
ICAR 2015 Workshop - Nick Provart
Araport1.4K views
Histolab: an Open Source Python Library for Reproducible Digital Pathology by Alessia Marcolini
Histolab: an Open Source Python Library for Reproducible Digital PathologyHistolab: an Open Source Python Library for Reproducible Digital Pathology
Histolab: an Open Source Python Library for Reproducible Digital Pathology
Alessia Marcolini297 views
InterPro and InterProScan 5.0 by EBI
InterPro and InterProScan 5.0InterPro and InterProScan 5.0
InterPro and InterProScan 5.0
EBI3.1K views
Online direct import of specimen records from iDigBio infrastructure into tax... by Viktor Senderov
Online direct import of specimen records from iDigBio infrastructure into tax...Online direct import of specimen records from iDigBio infrastructure into tax...
Online direct import of specimen records from iDigBio infrastructure into tax...
Viktor Senderov232 views
Experiences in the biosciences with the open biological ontologies foundry an... by Chris Mungall
Experiences in the biosciences with the open biological ontologies foundry an...Experiences in the biosciences with the open biological ontologies foundry an...
Experiences in the biosciences with the open biological ontologies foundry an...
Chris Mungall441 views

More from bosc

Swertz Molgenis Bosc2009 by
Swertz Molgenis Bosc2009Swertz Molgenis Bosc2009
Swertz Molgenis Bosc2009bosc
1K views34 slides
Bosc Intro 20090627 by
Bosc Intro 20090627Bosc Intro 20090627
Bosc Intro 20090627bosc
641 views7 slides
Software Patterns Panel Bosc2009 by
Software Patterns Panel Bosc2009Software Patterns Panel Bosc2009
Software Patterns Panel Bosc2009bosc
528 views3 slides
Schbath Rmes Bosc2009 by
Schbath Rmes Bosc2009Schbath Rmes Bosc2009
Schbath Rmes Bosc2009bosc
689 views27 slides
Kallio Chipster Bosc2009 by
Kallio Chipster Bosc2009Kallio Chipster Bosc2009
Kallio Chipster Bosc2009bosc
813 views16 slides
Welch Wordifier Bosc2009 by
Welch Wordifier Bosc2009Welch Wordifier Bosc2009
Welch Wordifier Bosc2009bosc
707 views21 slides

More from bosc(20)

Swertz Molgenis Bosc2009 by bosc
Swertz Molgenis Bosc2009Swertz Molgenis Bosc2009
Swertz Molgenis Bosc2009
bosc1K views
Bosc Intro 20090627 by bosc
Bosc Intro 20090627Bosc Intro 20090627
Bosc Intro 20090627
bosc641 views
Software Patterns Panel Bosc2009 by bosc
Software Patterns Panel Bosc2009Software Patterns Panel Bosc2009
Software Patterns Panel Bosc2009
bosc528 views
Schbath Rmes Bosc2009 by bosc
Schbath Rmes Bosc2009Schbath Rmes Bosc2009
Schbath Rmes Bosc2009
bosc689 views
Kallio Chipster Bosc2009 by bosc
Kallio Chipster Bosc2009Kallio Chipster Bosc2009
Kallio Chipster Bosc2009
bosc813 views
Welch Wordifier Bosc2009 by bosc
Welch Wordifier Bosc2009Welch Wordifier Bosc2009
Welch Wordifier Bosc2009
bosc707 views
Rice Emboss Bosc2009 by bosc
Rice Emboss Bosc2009Rice Emboss Bosc2009
Rice Emboss Bosc2009
bosc1K views
Prlic Bio Java Bosc2009 by bosc
Prlic Bio Java Bosc2009Prlic Bio Java Bosc2009
Prlic Bio Java Bosc2009
bosc658 views
Senger Soaplab Bosc2009 by bosc
Senger Soaplab Bosc2009Senger Soaplab Bosc2009
Senger Soaplab Bosc2009
bosc431 views
Hanmer Software Patterns Bosc2009 by bosc
Hanmer Software Patterns Bosc2009Hanmer Software Patterns Bosc2009
Hanmer Software Patterns Bosc2009
bosc1.8K views
Snell Psoda Bosc2009 by bosc
Snell Psoda Bosc2009Snell Psoda Bosc2009
Snell Psoda Bosc2009
bosc531 views
Procter Vamsas Bosc2009 by bosc
Procter Vamsas Bosc2009Procter Vamsas Bosc2009
Procter Vamsas Bosc2009
bosc853 views
Drablos Composite Motifs Bosc2009 by bosc
Drablos Composite Motifs Bosc2009Drablos Composite Motifs Bosc2009
Drablos Composite Motifs Bosc2009
bosc754 views
Fauteux Seeder Bosc2009 by bosc
Fauteux Seeder Bosc2009Fauteux Seeder Bosc2009
Fauteux Seeder Bosc2009
bosc614 views
Moeller Debian Bosc2009 by bosc
Moeller Debian Bosc2009Moeller Debian Bosc2009
Moeller Debian Bosc2009
bosc468 views
Wilczynski_BNFinder_BOSC2009 by bosc
Wilczynski_BNFinder_BOSC2009Wilczynski_BNFinder_BOSC2009
Wilczynski_BNFinder_BOSC2009
bosc1.7K views
Welsh_BioHDF_BOSC2009 by bosc
Welsh_BioHDF_BOSC2009Welsh_BioHDF_BOSC2009
Welsh_BioHDF_BOSC2009
bosc549 views
Varre_Biomanycores_BOSC2009 by bosc
Varre_Biomanycores_BOSC2009Varre_Biomanycores_BOSC2009
Varre_Biomanycores_BOSC2009
bosc771 views
Trelles_QnormBOSC2009 by bosc
Trelles_QnormBOSC2009Trelles_QnormBOSC2009
Trelles_QnormBOSC2009
bosc342 views
Rother_ModeRNA_BOSC2009 by bosc
Rother_ModeRNA_BOSC2009Rother_ModeRNA_BOSC2009
Rother_ModeRNA_BOSC2009
bosc562 views

Recently uploaded

【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院IttrainingIttraining
52 views8 slides
Business Analyst Series 2023 - Week 3 Session 5 by
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5DianaGray10
248 views20 slides
Piloting & Scaling Successfully With Microsoft Viva by
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft VivaRichard Harbridge
12 views160 slides
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...Jasper Oosterveld
18 views49 slides
SUPPLIER SOURCING.pptx by
SUPPLIER SOURCING.pptxSUPPLIER SOURCING.pptx
SUPPLIER SOURCING.pptxangelicacueva6
15 views1 slide
Data Integrity for Banking and Financial Services by
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial ServicesPrecisely
21 views26 slides

Recently uploaded(20)

【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10248 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely21 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi127 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta26 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker37 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman33 views

Biopython

  • 1. The 8th annual Bioinformatics Open Source Conference (BOSC 2007) 18 th July, Vienna, Austria Biopython Project Update Peter Cock, MOAC Doctoral Training Centre, University of Warwick, UK
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Manipulating Sequences from Bio.Seq import Seq from Bio.Alphabet.IUPAC import unambiguous_dna my_dna=Seq('CTAAACATCCTTCAT', unambiguous_dna) print 'Original:' print my_dna print 'Reverse complement:' print my_dna.reverse_complement() Original: Seq('CTAAACATCCTTCAT', IUPACUnambiguousDNA()) Reverse complement: Seq('ATGAAGGATGTTTAG', IUPACUnambiguousDNA()) The 8 th annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
  • 11. Translating Sequences from Bio import Translate bact_trans=Translate.unambiguous_dna_by_id[11] print 'Forward translation' print bact_trans.translate(my_dna) print 'Reverse complement translation' print bact_trans.translate( my_dna.reverse_complement()) Forward translation Seq('LNILH', HasStopCodon(IUPACProtein(), '*')) Reverse complement translation Seq('MKDV*', HasStopCodon(IUPACProtein(), '*')) The 8 th annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
  • 12.
  • 13. SeqIO – Sequence Input from Bio import SeqIO handle = open('ls_orchid.fasta') format = 'fasta' for rec in SeqIO.parse(handle, format) : print &quot;%s, len %i&quot; % (rec.id, len(rec.seq)) print rec.seq[:40].tostring() + &quot;...&quot; handle.close() gi|2765658|emb|Z78533.1|CIZ78533, len 740 CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCAT... gi|2765657|emb|Z78532.1|CCZ78532, len 753 CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCAT... ... The 8 th annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
  • 14. SeqIO – Sequence Input from Bio import SeqIO handle = open('ls_orchid.gbk') format = 'genbank' for rec in SeqIO.parse(handle, format) : print &quot;%s, len %i&quot; % (rec.id, len(rec.seq)) print rec.seq[:40].tostring() + &quot;...&quot; handle.close() The 8 th annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria Z78533.1, len 740 CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCAT... Z78532.1, len 753 CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCAT... ...
  • 15. SeqIO – Extracting Data from Bio import SeqIO handle = open('ls_orchid.gbk') format = 'genbank' from sets import Set print Set([rec.annotations['organism'] for rec in SeqIO.parse(handle, format)]) handle.close() Set(['Cypripedium acaule', 'Paphiopedilum primulinum', 'Phragmipedium lindenii', 'Paphiopedilum papuanum', 'Paphiopedilum stonei', 'Paphiopedilum urbanianum', 'Paphiopedilum dianthum', ...]) The 8 th annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
  • 16. SeqIO – Filtering Output i_handle = open('ls_orchid.gbk') o_handle = open('small_orchid.faa', 'w') SeqIO.write([rec for rec in SeqIO.parse(i_handle, 'genbank') if len(rec.seq) < 600], o_handle, 'fasta') i_handle.close() o_handle.close() >Z78481.1 P.insigne 5.8S rRNA gene and ITS1 ... CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCATTGTT... >Z78480.1 P.gratrixianum 5.8S rRNA gene and ... CGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCATTGTT... ... The 8 th annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
  • 17.
  • 18. Newick Tree Parsing (Bovine:0.69395,(Gibbon:0.36079,(Orang:0.33636,(Gorilla:0.17147,(Chimp:0.19268, Human:0.11927):0.08386):0.06124):0.15057):0.54939,Mouse:1.21460):0.10; from Bio.Nexus.Trees import Tree tree_str = open(&quot;simple.tree&quot;).read() tree_obj = Tree(tree_str) print tree_obj tree a_tree = (Bovine,(Gibbon,(Orang,(Gorilla, (Chimp,Human)))),Mouse); The 8 th annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
  • 19. Newick Tree Parsing # taxon prev succ brlen blen (sum) support 0 - None [1,2,11] 0.0 0.0 - 1 Bovine 0 [] 0.69395 0.69395 - 2 - 0 [3,4] 0.54939 0.54939 - 3 Gibbon 2 [] 0.36079 0.91018 - 4 - 2 [5,6] 0.15057 0.69996 - 5 Orang 4 [] 0.33636 1.03632 - 6 - 4 [7,8] 0.06124 0.7612 - 7 Gorilla 6 [] 0.17147 0.93267 - 8 - 6 [9,10] 0.08386 0.84506 - 9 Chimp 8 [] 0.19268 1.03774 - 10 Human 8 [] 0.11927 0.96433 - 11 Mouse 0 [] 1.2146 1.2146 - Root: 0 tree_obj.display() The 8 th annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
  • 20.
  • 21. Working with 3D Structures http://www.warwick.ac.uk/go/peter_cock/ python/protein_superposition/ This example (online) uses Bio.PDB to align 21 alternative X-Ray crystal structures for PDB structure 1JOY. Before: After: The 8 th annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. Questions? The 8 th annual Bioinformatics Open Source Conference Biopython Project Update @ BOSC 2007, Vienna, Austria