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