Commit 976be1e3 authored by Pauline Pommeret's avatar Pauline Pommeret
Browse files

Comments, docstrings

parent 69c09172
#!/usr/bin/env python2.7
""" Definition of the specific errors of the ????.
"""
Definition of the specific errors of Xylok.
All of them inherit :py:class:`XylokError`.
"""
class XylokError(Exception):
""" Base class for exception in the TRX module. """
"""
Base class for exceptions.
"""
def __init__(self, msg=""):
# Use of super instead of explicit because
super(XylokError, self).__init__(msg)
class NoMatch(XylokError):
""" Exception raised when no match is found by :py:meth:`local_match`
"""
Exception raised when no match is found by :py:meth:`lib.trx.pair_score`
Attributes:
expr -- input expression in which the error occured
Parameters:
- ``msg`` : error message (str)
"""
def __init__(self, msg):
super(NoMatch, self).__init__(msg)
class ShiftOutOfRange(XylokError):
""" Exception raised when shift is too long for the used query sequence in
"""
Exception raised when shift is too long for the used query sequence in
:py:meth:`lib.fft_tools.sliding_pb`
Attributes:
msg -- error message
Parameters:
- ``msg`` : error message (str)
"""
def __init__(self, msg):
super(ShiftOutOfRange, self).__init__(msg)
class NoFastaProvided(XylokError):
""" Exception raised when no fasta file is found in data dir
"""
Exception raised when no fasta file is found in the data directory by
:py:mod:`create_db`
Attributes:
msg -- error message
Parameters:
- ``msg`` : error message (str)
"""
def __init__(self, msg):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment