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.63" 
 16   
 17   
18 -class MissingExternalDependencyError(Exception):
19 """Missing an external dependency. 20 21 Used for things like missing command line tools. Important for our unit 22 tests to allow skipping tests with missing external dependencies. 23 """ 24 pass
25 26
27 -class MissingPythonDependencyError(MissingExternalDependencyError, ImportError):
28 """Missing an external python dependency (subclass of ImportError). 29 30 Used for missing Python modules (rather than just a typical ImportError). 31 Important for our unit tests to allow skipping tests with missing external 32 python dependencies, while also allowing the exception to be caught as an 33 ImportError. 34 """ 35 pass
36 37
38 -class BiopythonWarning(Warning):
39 """Biopython warning. 40 41 Biopython should use this warning (or subclasses of it), making it easy to 42 silence all our warning messages should you wish to: 43 44 >>> import warnings 45 >>> from Bio import BiopythonWarning 46 >>> warnings.simplefilter('ignore', BiopythonWarning) 47 48 Consult the warnings module documentation for more details. 49 """ 50 pass
51 52
53 -class BiopythonParserWarning(BiopythonWarning):
54 """Biopython parser warning. 55 56 Some in-valid data files cannot be parsed and will trigger an exception. 57 Where a reasonable interpretation is possible, Biopython will issue this 58 warning to indicate a potential problem. To silence these warnings, use: 59 60 >>> import warnings 61 >>> from Bio import BiopythonParserWarning 62 >>> warnings.simplefilter('ignore', BiopythonParserWarning) 63 64 Consult the warnings module documentation for more details. 65 """ 66 pass
67 68
69 -class BiopythonDeprecationWarning(BiopythonWarning):
70 """Biopython deprecation warning. 71 72 Biopython uses this warning instead of the built in DeprecationWarning 73 since those are ignored by default since Python 2.7. 74 75 To silence all our deprecation warning messages, use: 76 77 >>> import warnings 78 >>> from Bio import BiopythonDeprecationWarning 79 >>> warnings.simplefilter('ignore', BiopythonDeprecationWarning) 80 81 Code marked as deprecated is likely to be removed in a future version 82 of Biopython. To avoid removal of this code, please contact the Biopython 83 developers by sending an email to biopython-dev@biopython.org. 84 """ 85 pass
86 87
88 -class BiopythonExperimentalWarning(BiopythonWarning):
89 """Biopython experimental code warning. 90 91 Biopython uses this warning for experimental code ('alpha' or 'beta' 92 level code) which is released as part of the standard releases to mark 93 sub-modules or functions for early adopters to test & give feedback.. 94 95 Code issuing this warning is likely to change (or even be removed) in 96 a subsequent release of Biopython. Such code should NOT be used for 97 production/stable code. It should only be used if: 98 99 - You are running the latest release of Biopython, or ideally the 100 latest code from our repository. 101 - You are subscribed to the biopython-dev mailing list to provide 102 feedback on this code, and to be alterted to changes to it. 103 104 If all goes well, experimental code would be promoted to stable in 105 a subsequence release, and this warning removed from it. 106 """ 107 pass
108