Source code for elaspic.errors

# -*- coding: utf-8 -*-

# %% Configurations
[docs]class WrongConfigKeyError(Exception): pass # %% Tcoffee
[docs]class TcoffeeError(Exception): def __init__(self, result, error, alignInFile, system_command): message = ( 'tcoffee blast error for file: {0}, with error message: {1}, ' 'when trying to run command: {2}' .format(alignInFile, error, system_command)) Exception.__init__(self, message) self.result = result
[docs]class TcoffeeBlastError(Exception): def __init__(self, result, error, alignInFile, system_command): message = ( 'tcoffee blast error for file: {0}, with error message: {1}, ' 'when trying to run command: {2}' .format(alignInFile, error, system_command)) Exception.__init__(self, message) self.result = result
[docs]class TcoffeePDBidError(Exception): def __init__(self, result, error, alignInFile, system_command): message = ( 'tcoffee blast error for file: {0}, with error message: {1}, ' 'when trying to run command: {2}' .format(alignInFile, error, system_command)) Exception.__init__(self, message) self.result = result # %% Provean
[docs]class ProveanError(Exception): pass
[docs]class ProveanResourceError(Exception): def __init__(self, message, child_process_group_id): Exception.__init__(self, message) self.child_process_group_id = child_process_group_id
[docs]class MutationMismatchError(Exception): pass # %% Finding templates (PDB in uppercase to be consistent with Biopython)
[docs]class LowIdentity(Exception): pass
[docs]class PDBError(Exception): pass
[docs]class PDBNotFoundError(Exception): pass
[docs]class PDBEmptySequenceError(Exception): """ One of the sequences is missing from the alignment. The most likely cause is that the alignment domain definitions were incorrect. """ pass
[docs]class PDBDomainDefsError(Exception): """ PDB domain definitions not found in the pdb file """ pass
[docs]class PDBChainError(Exception): pass # %% Making models
[docs]class MSMSError(Exception): pass
[docs]class ModellerError(Exception): pass
[docs]class FoldxError(Exception): pass
[docs]class FoldXAAMismatchError(Exception): pass
[docs]class DataError(Exception): pass
[docs]class TemplateCoreError(Exception): pass
[docs]class TemplateInterfaceError(Exception): pass
[docs]class ResourceError(Exception): pass
[docs]class InterfaceMismatchError(Exception): pass # %% Computing mutations
[docs]class Archive7zipError(Exception): def __init__(self, result, error_message, return_code): super(Archive7zipError, self).__init__(result) self.error_message = error_message self.return_code = return_code
[docs]class Archive7zipFileNotFoundError(Archive7zipError): pass
[docs]class NoSequenceFound(Exception): pass
[docs]class ProteinDefinitionError(Exception): pass
[docs]class NoTemplatesFoundError(Exception): pass
[docs]class AlignmentNotFoundError(Exception): def __init__(self, save_path, alignment_filename): Exception.__init__(self) self.save_path = save_path self.alignment_filename = alignment_filename
[docs]class PopsError(Exception): def __init__(self, message, pdb, chains): Exception.__init__(self, message) self.pdb = pdb self.chains = chains # %%
[docs]class ChainsNotInteractingError(Exception): pass
[docs]class MutationOutsideDomainError(Exception): pass
[docs]class MutationOutsideInterfaceError(Exception): pass
[docs]class NoModelFoundError(Exception): pass # %% Database
[docs]class ModelHasMutationsError(Exception): """Don't delete a model that has precalculated mutations! """ pass