Array ( [0] => {{short description|Collection of open-source Python software tools for computational biology}} [1] => {{Infobox software [2] => | name = Biopython [3] => | logo = Biopython logo.png [4] => | author = Chapman B, Chang J [5] => | released = {{Start date and age|2002|12|17|df=no}} [6] => | latest release version = {{wikidata|property|reference|edit|P348}} [7] => | latest release date = [8] => | programming language = [[Python (programming language)|Python]] and [[C (programming language)|C]] [9] => | platform = Cross-platform [10] => | genre = [[Bioinformatics]] [11] => | license = [http://www.biopython.org/DIST/LICENSE Biopython License] [12] => | website = {{URL|http://biopython.org/}} [13] => | repo = {{wikidata|property|reference|edit|P1324}} [14] => }} [15] => The '''Biopython''' project is an [[Open-source software|open-source]] collection of non-commercial [[Python (programming language)|Python]] tools for [[computational biology]] and [[bioinformatics]], created by an international association of developers.{{Cite journal |last1=Chapman |first1=Brad |last2=Chang |first2=Jeff |title=Biopython: Python tools for computational biology |journal=ACM SIGBIO Newsletter |date=August 2000 |volume=20 |issue=2 |pages=15–19 |doi=10.1145/360262.360268 |s2cid=9417766 |doi-access=free }}{{cite journal |last1=Cock |first1=Peter JA |last2=Antao |first2=Tiago |last3=Chang |first3=Jeffery T |last4=Chapman |first4=Brad A |last5=Cox |first5=Cymon J |last6=Dalke |first6=Andrew |last7=Friedberg |first7=Iddo |last8=Hamelryck |first8=Thomas |last9=Kauff |first9=Frank |last10=Wilczynski |first10=Bartek |last11=de Hoon |first11=Michiel JL |title = Biopython: freely available Python tools for computational molecular biology and bioinformatics |url= | journal = Bioinformatics| volume = 25| issue = 11| pages = 1422–3|date=20 March 2009| pmid = 19304878| pmc = 2682512| doi = 10.1093/bioinformatics/btp163}}Refer to the Biopython website for other [http://biopython.org/wiki/Documentation#Papers papers describing Biopython], and a list of over one hundred [http://biopython.org/wiki/Publications publications using/citing Biopython]. It contains classes to represent [[biological sequence]]s and [[Bioinformatics#Genome annotation|sequence annotations]], and it is able to read and write to a variety of file formats. It also allows for a programmatic means of accessing online [[Biological database|databases of biological information]], such as those at [[National Center for Biotechnology Information|NCBI]]. Separate modules extend Biopython's capabilities to [[sequence alignment]], [[protein structure]], [[population genetics]], [[phylogenetics]], [[sequence motif]]s, and [[machine learning]]. Biopython is one of a number of Bio* projects designed to reduce [[Duplicate code|code duplication]] in [[computational biology]].{{cite journal| last=Mangalam | first=Harry |title=The Bio* toolkits—a brief overview | journal=Briefings in Bioinformatics |date=September 2002 | volume= 3 | issue= 3 | pages= 296–302 | pmid=12230038 | doi=10.1093/bib/3.3.296| doi-access=free }} [16] => [17] => == History == [18] => [19] => Biopython development began in 1999 and it was first released in July 2000.{{Citation | first = Brad | last = Chapman |title=The Biopython Project: Philosophy, functionality and facts |url=http://www.biopython.org/DIST/docs/presentations/biopython_exelixis.pdf |date=11 March 2004 |accessdate=11 September 2014}} It was developed during a similar time frame and with analogous goals to other projects that added bioinformatics capabilities to their respective programming languages, including [[BioPerl]], [[BioRuby]] and [[BioJava]]. Early developers on the project included Jeff Chang, Andrew Dalke and Brad Chapman, though over 100 people have made contributions to date.{{Citation |title=List of Biopython contributors |url=http://biopython.org/SRC/biopython/CONTRIB |accessdate=11 September 2014 |url-status=dead |archiveurl=https://archive.today/20140911121354/http://biopython.org/SRC/biopython/CONTRIB |archivedate=11 September 2014 }} In 2007, a similar [[Python (programming language)|Python]] project, namely '''PyCogent''', was established.{{Cite journal [20] => | pmid = 17708774 [21] => | pmc = 2375001 [22] => | year = 2007 [23] => | last1 = Knight [24] => | first1 = R [25] => | title = Py ''Cogent'': A toolkit for making sense from sequence [26] => | journal = Genome Biology [27] => | volume = 8 [28] => | issue = 8 [29] => | pages = R171 [30] => | last2 = Maxwell [31] => | first2 = P [32] => | last3 = Birmingham [33] => | first3 = A [34] => | last4 = Carnes [35] => | first4 = J [36] => | last5 = Caporaso [37] => | first5 = J. G. [38] => | last6 = Easton [39] => | first6 = B. C. [40] => | last7 = Eaton [41] => | first7 = M [42] => | last8 = Hamady [43] => | first8 = M [44] => | last9 = Lindsay [45] => | first9 = H [46] => | last10 = Liu [47] => | first10 = Z [48] => | last11 = Lozupone [49] => | first11 = C [50] => | last12 = McDonald [51] => | first12 = D [52] => | last13 = Robeson [53] => | first13 = M [54] => | last14 = Sammut [55] => | first14 = R [56] => | last15 = Smit [57] => | first15 = S [58] => | last16 = Wakefield [59] => | first16 = M. J. [60] => | last17 = Widmann [61] => | first17 = J [62] => | last18 = Wikman [63] => | first18 = S [64] => | last19 = Wilson [65] => | first19 = S [66] => | last20 = Ying [67] => | first20 = H [68] => | last21 = Huttley [69] => | first21 = G. A. [70] => | doi = 10.1186/gb-2007-8-8-r171 [71] => | doi-access = free [72] => }} [73] => [74] => The initial scope of Biopython involved accessing, indexing and processing biological sequence files. While this is still a major focus, over the following years added modules have extended its functionality to cover additional areas of biology (see [[#Key features and examples|Key features and examples]]). [75] => [76] => As of version 1.77, Biopython no longer supports Python 2.{{Citation | first = Chris | last = Daley |title=Biopython 1.77 released |url=https://www.open-bio.org/2020/05/25/biopython-1-77-released/ |accessdate=6 October 2021}} [77] => [78] => == Design == [79] => Wherever possible, Biopython follows the conventions used by the Python programming language to make it easier for users familiar with Python. For example, Seq and SeqRecord objects can be manipulated via [[Array slicing#1991: Python|slicing]], in a manner similar to Python's strings and lists. It is also designed to be functionally similar to other Bio* projects, such as BioPerl. [80] => [81] => Biopython is able to read and write most common file formats for each of its functional areas, and its license is permissive and compatible with most other software licenses, which allow Biopython to be used in a variety of software projects. [82] => [83] => == Key features and examples == [84] => [85] => === Sequences === [86] => A core concept in Biopython is the biological sequence, and this is represented by the Seq class.{{Citation |last1=Chang |first1=Jeff |last2=Chapman |first2=Brad |last3=Friedberg |first3=Iddo |last4=Hamelryck |first4=Thomas |last5=de Hoon |first5=Michiel |last6=Cock |first6=Peter |last7=Antao |first7=Tiago |last8=Talevich |first8=Eric |last9=Wilczynski |first9=Bartek |title=Biopython Tutorial and Cookbook |url=http://biopython.org/DIST/docs/tutorial/Tutorial.html |date=29 May 2014 |accessdate=28 August 2014}} A Biopython Seq object is similar to a Python string in many respects: it supports the Python slice notation, can be concatenated with other sequences and is immutable. In addition, it includes sequence-specific methods and specifies the particular biological alphabet used. [87] => [88] => [89] => >>> # This script creates a DNA sequence and performs some typical manipulations [90] => >>> from Bio.Seq import Seq [91] => >>> dna_sequence = Seq("AGGCTTCTCGTA", IUPAC.unambiguous_dna) [92] => >>> dna_sequence [93] => Seq('AGGCTTCTCGTA', IUPACUnambiguousDNA()) [94] => >>> dna_sequence[2:7] [95] => Seq('GCTTC', IUPACUnambiguousDNA()) [96] => >>> dna_sequence.reverse_complement() [97] => Seq('TACGAGAAGCCT', IUPACUnambiguousDNA()) [98] => >>> rna_sequence = dna_sequence.transcribe() [99] => >>> rna_sequence [100] => Seq('AGGCUUCUCGUA', IUPACUnambiguousRNA()) [101] => >>> rna_sequence.translate() [102] => Seq('RLLV', IUPACProtein()) [103] => [104] => [105] => === Sequence annotation === [106] => The SeqRecord class describes sequences, along with information such as name, description and features in the form of SeqFeature objects. Each SeqFeature object specifies the type of the feature and its location. Feature types can be ‘gene’, ‘CDS’ (coding sequence), ‘repeat_region’, ‘mobile_element’ or others, and the position of features in the sequence can be exact or approximate. [107] => [108] => [109] => >>> # This script loads an annotated sequence from file and views some of its contents. [110] => >>> from Bio import SeqIO [111] => >>> seq_record = SeqIO.read("pTC2.gb", "genbank") [112] => >>> seq_record.name [113] => 'NC_019375' [114] => >>> seq_record.description [115] => 'Providencia stuartii plasmid pTC2, complete sequence.' [116] => >>> seq_record.features[14] [117] => SeqFeature(FeatureLocation(ExactPosition(4516), ExactPosition(5336), strand=1), type='mobile_element') [118] => >>> seq_record.seq [119] => Seq("GGATTGAATATAACCGACGTGACTGTTACATTTAGGTGGCTAAACCCGTCAAGC...GCC", IUPACAmbiguousDNA()) [120] => [121] => [122] => === Input and output === [123] => Biopython can read and write to a number of common sequence formats, including [[FASTA format|FASTA]], [[FASTQ format|FASTQ]], GenBank, Clustal, PHYLIP and [[Nexus file|NEXUS]]. When reading files, descriptive information in the file is used to populate the members of Biopython classes, such as SeqRecord. This allows records of one file format to be converted into others. [124] => [125] => Very large sequence files can exceed a computer's memory resources, so Biopython provides various options for accessing records in large files. They can be loaded entirely into memory in Python data structures, such as lists or [[Associative array|dictionaries]], providing fast access at the cost of memory usage. Alternatively, the files can be read from disk as needed, with slower performance but lower memory requirements. [126] => [127] => [128] => >>> # This script loads a file containing multiple sequences and saves each one in a different format. [129] => >>> from Bio import SeqIO [130] => >>> genomes = SeqIO.parse("salmonella.gb", "genbank") [131] => >>> for genome in genomes: [132] => ... SeqIO.write(genome, genome.id + ".fasta", "fasta") [133] => [134] => [135] => === Accessing online databases === [136] => [137] => Through the Bio.Entrez module, users of Biopython can download biological data from NCBI databases. Each of the functions provided by the [[Entrez]] search engine is available through functions in this module, including searching for and downloading records. [138] => [139] => [140] => >>> # This script downloads genomes from the NCBI Nucleotide database and saves them in a FASTA file. [141] => >>> from Bio import Entrez [142] => >>> from Bio import SeqIO [143] => >>> output_file = open("all_records.fasta", "w") [144] => >>> Entrez.email = "my_email@example.com" [145] => >>> records_to_download = ["FO834906.1", "FO203501.1"] [146] => >>> for record_id in records_to_download: [147] => ... handle = Entrez.efetch(db="nucleotide", id=record_id, rettype="gb") [148] => ... seqRecord = SeqIO.read(handle, format="gb") [149] => ... handle.close() [150] => ... output_file.write(seqRecord.format("fasta")) [151] => [152] => [153] => === Phylogeny === [154] => [155] => [[File:Phylo.draw.png|thumb|300px|Figure 1: A rooted phylogenetic tree created by Bio.Phylo showing the relationship between different organisms' Apaf-1 homologs{{cite journal |last1=Zmasek |first1=Christian M |last2=Zhang |first2=Qing |last3=Ye |first3=Yuzhen |last4=Godzik |first4=Adam |date=24 October 2007 |title=Surprising complexity of the ancestral apoptosis network |journal=Genome Biology |volume=8 |issue=10 |doi=10.1186/gb-2007-8-10-r226 |pages=R226 |pmid=17958905 |pmc=2246300 |doi-access=free }}]] [156] => [157] => [[File:Phylo.draw graphviz.png|thumb|Figure 2: The same tree as above, drawn unrooted using Graphviz via Bio.Phylo]] [158] => [159] => The Bio.Phylo module provides tools for working with and visualising [[phylogenetic tree]]s. A variety of file formats are supported for reading and writing, including [[Newick format|Newick]], [[Nexus file|NEXUS]] and [[phyloXML]]. Common tree manipulations and traversals are supported via the Tree and Clade objects. Examples include converting and collating tree files, extracting subsets from a tree, changing a tree's root, and analysing branch features such as length or score.{{cite journal |last1=Talevich |first1=Eric |last2=Invergo |first2=Brandon M |last3=Cock |first3=Peter JA |last4=Chapman |first4=Brad A |date=21 August 2012 |title=Bio.Phylo: A unified toolkit for processing, analyzing and visualizing phylogenetic trees in Biopython |url= |journal=BMC Bioinformatics |volume=13 |issue=209 |pages=209 |doi=10.1186/1471-2105-13-209 |pmid=22909249 |pmc=3468381 |doi-access=free }} [160] => [161] => Rooted trees can be drawn in [[ASCII art|ASCII]] or using [[matplotlib]] (see Figure 1), and the [[Graphviz]] library can be used to create unrooted layouts (see Figure 2). [162] => [163] => === Genome diagrams === [164] => [165] => [[File:PKPS77.png|thumb|300px|Figure 3: A diagram of the genes on the pKPS77 plasmid,{{cite web |url=https://www.ncbi.nlm.nih.gov/nuccore/NC_023330.1 |title=Klebsiella pneumoniae strain KPS77 plasmid pKPS77, complete sequence |date= |website= |publisher=NCBI |accessdate=10 September 2014}} visualised using the GenomeDiagram module in Biopython]] [166] => [167] => The GenomeDiagram module provides methods of visualising sequences within Biopython.{{Cite journal |last1=Pritchard |first1=Leighton |last2=White |first2=Jennifer A |last3=Birch |first3=Paul RJ |last4=Toth |first4=Ian K |title=GenomeDiagram: a python package for the visualization of large-scale genomic data |journal=Bioinformatics |date=March 2006 |volume=22 |issue=5 |pages=616–617 |doi=10.1093/bioinformatics/btk021 |pmid=16377612|doi-access=free }} Sequences can be drawn in a linear or circular form (see Figure 3), and many output formats are supported, including [[Portable Document Format|PDF]] and [[Portable Network Graphics|PNG]]. Diagrams are created by making tracks and then adding sequence features to those tracks. By looping over a sequence's features and using their attributes to decide if and how they are added to the diagram's tracks, one can exercise much control over the appearance of the final diagram. Cross-links can be drawn between different tracks, allowing one to compare multiple sequences in a single diagram. [168] => [169] => === Macromolecular structure === [170] => [171] => The Bio.PDB module can load molecular structures from [[Protein Data Bank (file format)|PDB]] and [[Crystallographic Information File|mmCIF]] files, and was added to Biopython in 2003.{{cite journal |last1=Hamelryck |first1=Thomas |last2=Manderick |first2=Bernard |date=10 May 2003 |title=PDB file parser and structure class implemented in Python |journal=Bioinformatics |volume=19 |issue=17 |doi=10.1093/bioinformatics/btg299 |pages=2308–2310|pmid=14630660 |doi-access=free }} The Structure object is central to this module, and it organises macromolecular structure in a hierarchical fashion: Structure objects contain Model objects which contain Chain objects which contain Residue objects which contain Atom objects. Disordered residues and atoms get their own classes, DisorderedResidue and DisorderedAtom, that describe their uncertain positions. [172] => [173] => Using Bio.PDB, one can navigate through individual components of a macromolecular structure file, such as examining each atom in a protein. Common analyses can be carried out, such as measuring distances or angles, comparing residues and calculating residue depth. [174] => [175] => === Population genetics === [176] => [177] => The Bio.PopGen module adds support to Biopython for Genepop, a software package for statistical analysis of population genetics.{{cite journal |last=Rousset |first=François |date=January 2008 |title=GENEPOP'007: a complete re-implementation of the GENEPOP software for Windows and Linux |journal=Molecular Ecology Resources |volume=8 |issue=1 |doi=10.1111/j.1471-8286.2007.01931.x |pmid=21585727 |pages=103–106|s2cid=25776992 }} This allows for analyses of [[Hardy–Weinberg principle|Hardy–Weinberg equilibrium]], [[linkage disequilibrium]] and other features of a population's [[Allele frequency|allele frequencies]]. [178] => [179] => This module can also carry out population genetic simulations using [[coalescent theory]] with the fastsimcoal2 program.{{cite journal |last1=Excoffier |first1=Laurent |last2=Foll |first2=Matthieu |date=1 March 2011 |title=fastsimcoal: a continuous-time coalescent simulator of genomic diversity under arbitrarily complex evolutionary scenarios |journal=Bioinformatics |volume=27 |issue=9 |doi=10.1093/bioinformatics/btr124 |pages=1332–1334 |pmid=21398675|doi-access=free }} [180] => [181] => === Wrappers for command line tools === [182] => [183] => Many of Biopython's modules contain command line wrappers for commonly used tools, allowing these tools to be used from within Biopython. These wrappers include [[BLAST (biotechnology)|BLAST]], [[Clustal]], PhyML, [[EMBOSS]] and [[SAMtools]]. Users can subclass a generic wrapper class to add support for any other command line tool. [184] => [185] => == See also == [186] => * [[Open Bioinformatics Foundation]] [187] => * [[BioPerl]] [188] => * [[BioRuby]] [189] => * [[BioJS]] [190] => * [[BioJava]] [191] => [192] => ==References== [193] => {{Reflist}} [194] => [195] => == External links == [196] => * {{Official website|https://biopython.org/}} [197] => * [https://biopython.org/DIST/docs/tutorial/Tutorial.html Biopython Tutorial and Cookbook] ([https://biopython.org/DIST/docs/tutorial/Tutorial.pdf PDF]) [198] => * [https://github.com/biopython/biopython Biopython source code on GitHub] [199] => [200] => [[Category:Articles with example Python (programming language) code]] [201] => [[Category:Bioinformatics software]] [202] => [[Category:Computational science]] [203] => [[Category:Python (programming language) scientific libraries]] [204] => [[Category:Free bioinformatics software]] [] => )
good wiki

Biopython

The Biopython project is an open-source collection of non-commercial Python tools for computational biology and bioinformatics, created by an international association of developers. It contains classes to represent biological sequences and sequence annotations, and it is able to read and write to a variety of file formats.

More about us

About

Expert Team

Vivamus eget neque lacus. Pellentesque egauris ex.

Award winning agency

Lorem ipsum, dolor sit amet consectetur elitorceat .

10 Year Exp.

Pellen tesque eget, mauris lorem iupsum neque lacus.