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