Package Bio
[hide private]
[frames] | no frames]

Source Code for Package Bio

 1  # Copyright 2000 by Jeffrey Chang.  All rights reserved. 
 2  # This code is part of the Biopython distribution and governed by its 
 3  # license.  Please see the LICENSE file that should have been included 
 4  # as part of this package. 
 5  """Collection of modules for dealing with biological data in Python. 
 6   
 7  The Biopython Project is an international association of developers  
 8  of freely available Python tools for computational molecular biology. 
 9   
10  http://biopython.org 
11  """ 
12   
13  __docformat__ = "epytext en" #not just plaintext 
14   
15  __version__ = "1.58" 
16   
17 -class MissingExternalDependencyError(Exception):
18 """Missing an external dependency. 19 20 Used for things like missing command line tools. Important for our unit 21 tests to allow skipping tests with missing external dependencies. 22 """ 23 pass
24
25 -class MissingPythonDependencyError(MissingExternalDependencyError, ImportError):
26 """Missing an external python dependency (subclass of ImportError). 27 28 Used for missing Python modules (rather than just a typical ImportError). 29 Important for our unit tests to allow skipping tests with missing external 30 python dependencies, while also allowing the exception to be caught as an 31 ImportError. 32 """ 33 pass
34
35 -class BiopythonWarning(Warning):
36 """Biopython warning. 37 38 Biopython should use this warning (or subclasses of it), making it easy to 39 silence all our warning messages should you wish to: 40 41 >>> import warnings 42 >>> from Bio import BiopythonWarning 43 >>> warnings.simplefilter('ignore', BiopythonWarning) 44 45 Consult the warnings module documentation for more details. 46 """ 47 pass
48
49 -class BiopythonParserWarning(BiopythonWarning):
50 """Biopython parser warning. 51 52 Some in-valid data files cannot be parsed and will trigger an exception. 53 Where a reasonable interpretation is possible, Biopython will issue this 54 warning to indicate a potential problem. To silence these warnings, use: 55 56 >>> import warnings 57 >>> from Bio import BiopythonParserWarning 58 >>> warnings.simplefilter('ignore', BiopythonParserWarning) 59 60 Consult the warnings module documentation for more details. 61 """ 62 pass
63
64 -class BiopythonDeprecationWarning(BiopythonWarning):
65 """Biopython deprecation warning. 66 67 Biopython uses this warning instead of the built in DeprecationWarning 68 since those are ignored by default since Python 2.7. 69 70 To silence all our deprecation warning messages, use: 71 72 >>> import warnings 73 >>> from Bio import BiopythonDeprecationWarning 74 >>> warnings.simplefilter('ignore', BiopythonDeprecationWarning) 75 76 Code marked as deprecated is likely to be removed in a future version 77 of Biopython. To avoid removal of this code, please contact the Biopython 78 developers by sending an email to biopython-dev@biopython.org. 79 """ 80 pass
81