# Path: crumbs/exceptions.py
# class OptionalRequirementError(Exception):
#     'An optional module is not present'
#     pass


from crumbs.exceptions import OptionalRequirementError
    from Bio.SeqRecord import SeqRecord
    from Bio.Seq import Seq
    from Bio.SeqFeature import SeqFeature, FeatureLocation
    from Bio.SeqIO.SffIO import SffIterator
    from Bio.bgzf import BgzfWriter
    from Bio.SeqIO.QualityIO import FastqGeneralIterator
    from crumbs.utils.biopython_code import FastqGeneralIterator
    from Bio.SeqIO.FastaIO import FastaIterator
    from Bio.SeqIO.QualityIO import QualPhredIterator
    from Bio.SeqIO.QualityIO import PairedFastaQualIterator
    from Bio.SeqIO.QualityIO import FastqPhredIterator
    from Bio.SeqIO.QualityIO import FastqSolexaIterator
    from Bio.SeqIO.QualityIO import FastqIlluminaIterator
    from Bio.SeqIO import parse as parse_into_seqrecs
    from Bio.SeqIO import write as write_seqrecs
    from Bio.Blast import NCBIXML, NCBIWWW
    from Bio._py3k import _bytes_to_string, _as_bytes
    from Bio.SeqIO._index import SeqFileRandomAccess
    from Bio.SeqIO._index import _FormatToRandomAccess
    from Bio.SeqIO import _index
    from Bio.Alphabet import Alphabet, AlphabetEncoder
    from toolz.itertoolz import merge_sorted, first
    from pysam import Samfile
# Copyright 2012-2013 Jose Blanca, Peio Ziarsolo,
# COMAV-Univ. Politecnica Valencia
# This file is part of seq_crumbs.
# seq_crumbs is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.

# seq_crumbs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR  PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with seq_crumbs. If not, see <http://www.gnu.org/licenses/>.
'''
In this module all the imports of the optional modules are handled
'''


MSG = 'A python package to run this executable is required,'
MSG += ' but it is not installed: '
BIO = 'biopython'
BIO_BGZF = 'biopython with Bgzf support'


def create_fake_class(msg):
    class FakePythonRequiredClass(object):
        def __init__(self, *args, **kwargs):

# Path: crumbs/exceptions.py
# class OptionalRequirementError(Exception):
#     'An optional module is not present'
#     pass


# Path: crumbs/utils/optional_modules.py
from crumbs.exceptions import OptionalRequirementError
    from Bio.SeqRecord import SeqRecord
    from Bio.Seq import Seq
    from Bio.SeqFeature import SeqFeature, FeatureLocation
    from Bio.SeqIO.SffIO import SffIterator
    from Bio.bgzf import BgzfWriter
    from Bio.SeqIO.QualityIO import FastqGeneralIterator
    from crumbs.utils.biopython_code import FastqGeneralIterator
    from Bio.SeqIO.FastaIO import FastaIterator
    from Bio.SeqIO.QualityIO import QualPhredIterator
    from Bio.SeqIO.QualityIO import PairedFastaQualIterator
    from Bio.SeqIO.QualityIO import FastqPhredIterator
    from Bio.SeqIO.QualityIO import FastqSolexaIterator
    from Bio.SeqIO.QualityIO import FastqIlluminaIterator
    from Bio.SeqIO import parse as parse_into_seqrecs
    from Bio.SeqIO import write as write_seqrecs
    from Bio.Blast import NCBIXML, NCBIWWW
    from Bio._py3k import _bytes_to_string, _as_bytes
    from Bio.SeqIO._index import SeqFileRandomAccess
    from Bio.SeqIO._index import _FormatToRandomAccess
    from Bio.SeqIO import _index
    from Bio.Alphabet import Alphabet, AlphabetEncoder
    from toolz.itertoolz import merge_sorted, first
    from pysam import Samfile

# Copyright 2012-2013 Jose Blanca, Peio Ziarsolo,
# COMAV-Univ. Politecnica Valencia
# This file is part of seq_crumbs.
# seq_crumbs is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.

# seq_crumbs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR  PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with seq_crumbs. If not, see <http://www.gnu.org/licenses/>.
'''
In this module all the imports of the optional modules are handled
'''


MSG = 'A python package to run this executable is required,'
MSG += ' but it is not installed: '
BIO = 'biopython'
BIO_BGZF = 'biopython with Bgzf support'


def create_fake_class(msg):
    class FakePythonRequiredClass(object):
        def __init__(self, *args, **kwargs):

            raise OptionalRequirementError(msg)