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

Source Code for Package Bio

  1  # Copyright 1999-2003 by Jeffrey Chang.  All rights reserved. 
  2  # 
  3  # This file is part of the Biopython distribution and governed by your 
  4  # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". 
  5  # Please see the LICENSE file that should have been included as part of this 
  6  # package. 
  7  """Collection of modules for dealing with biological data in Python. 
  8   
  9  The Biopython Project is an international association of developers 
 10  of freely available Python tools for computational molecular biology. 
 11   
 12  http://biopython.org 
 13  """ 
 14   
 15  __version__ = "1.72" 
 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 25 pass
26 27
28 -class MissingPythonDependencyError(MissingExternalDependencyError, ImportError):
29 """Missing an external python dependency (subclass of ImportError). 30 31 Used for missing Python modules (rather than just a typical ImportError). 32 Important for our unit tests to allow skipping tests with missing external 33 python dependencies, while also allowing the exception to be caught as an 34 ImportError. 35 """ 36 37 pass
38 39
40 -class BiopythonWarning(Warning):
41 """Biopython warning. 42 43 Biopython should use this warning (or subclasses of it), making it easy to 44 silence all our warning messages should you wish to: 45 46 >>> import warnings 47 >>> from Bio import BiopythonWarning 48 >>> warnings.simplefilter('ignore', BiopythonWarning) 49 50 Consult the warnings module documentation for more details. 51 """ 52 53 pass
54 55
56 -class BiopythonParserWarning(BiopythonWarning):
57 """Biopython parser warning. 58 59 Some in-valid data files cannot be parsed and will trigger an exception. 60 Where a reasonable interpretation is possible, Biopython will issue this 61 warning to indicate a potential problem. To silence these warnings, use: 62 63 >>> import warnings 64 >>> from Bio import BiopythonParserWarning 65 >>> warnings.simplefilter('ignore', BiopythonParserWarning) 66 67 Consult the warnings module documentation for more details. 68 """ 69 70 pass
71 72
73 -class BiopythonDeprecationWarning(BiopythonWarning):
74 """Biopython deprecation warning. 75 76 Biopython uses this warning instead of the built in DeprecationWarning 77 since those are ignored by default since Python 2.7. 78 79 To silence all our deprecation warning messages, use: 80 81 >>> import warnings 82 >>> from Bio import BiopythonDeprecationWarning 83 >>> warnings.simplefilter('ignore', BiopythonDeprecationWarning) 84 85 Code marked as deprecated is likely to be removed in a future version 86 of Biopython. To avoid removal of this code, please contact the Biopython 87 developers by sending an email to biopython-dev@biopython.org. 88 """ 89 90 pass
91 92
93 -class BiopythonExperimentalWarning(BiopythonWarning):
94 """Biopython experimental code warning. 95 96 Biopython uses this warning for experimental code ('alpha' or 'beta' 97 level code) which is released as part of the standard releases to mark 98 sub-modules or functions for early adopters to test & give feedback. 99 100 Code issuing this warning is likely to change (or even be removed) in 101 a subsequent release of Biopython. Such code should NOT be used for 102 production/stable code. It should only be used if: 103 104 - You are running the latest release of Biopython, or ideally the 105 latest code from our repository. 106 - You are subscribed to the biopython-dev mailing list to provide 107 feedback on this code, and to be alerted of changes to it. 108 109 If all goes well, experimental code would be promoted to stable in 110 a subsequent release, and this warning removed from it. 111 """ 112 113 pass
114