# Path: plugin.py
# class Plugin:
#     def __init__(self):
#         self.documents = Documents(self)
#         try: self.name
#         except: self.name = self.__class__.__name__.lower()
#         try: self.description
#         except: self.description = 'This plugin has no description.'
#         if self.__class__ is Plugin:
#             raise NotImplementedError
# 
#     @property
#     def user(self):
#         return app.current_user
# 
#     def process(self, request):
#         pass
# 
#     def unload(self):
#         pass
# 
# Path: plugins/ABACUS/callabacus.py
# class InternalError(Exception):
#     pass
# 
# class FileFormatError(Exception):
#     pass


from time import ctime
from subprocess import Popen
from os import mkdir, listdir, getcwd, chdir, path
from shutil import rmtree
from plugin import Plugin
from zipfile import ZipFile
from .callabacus import InternalError, FileFormatError
import os
import re
"""This is an ABACUS plugin.
    request = {
    "action": "design" or "singleMutationScan"
    "id": user_id
    "inpath": inputFilePath
    "filename": filename
    "amount": amount #optional
    "tag":tag
    "design": desginpath
    "mutationScan": scanpath
    "abacuspath": path
    }
"""


abacuspath = 'plugins/ABACUS/ABACUS/bin/'
designpath = 'plugins/ABACUS/design.py'
mutationpath = 'plugins/ABACUS/singleMutationScan.py'



# Path: plugin.py
# class Plugin:
#     def __init__(self):
#         self.documents = Documents(self)
#         try: self.name
#         except: self.name = self.__class__.__name__.lower()
#         try: self.description
#         except: self.description = 'This plugin has no description.'
#         if self.__class__ is Plugin:
#             raise NotImplementedError
# 
#     @property
#     def user(self):
#         return app.current_user
# 
#     def process(self, request):
#         pass
# 
#     def unload(self):
#         pass
# 
# Path: plugins/ABACUS/callabacus.py
# class InternalError(Exception):
#     pass
# 
# class FileFormatError(Exception):
#     pass


# Path: plugins/ABACUS/abacus.py
from time import ctime
from subprocess import Popen
from os import mkdir, listdir, getcwd, chdir, path
from shutil import rmtree
from plugin import Plugin
from zipfile import ZipFile
from .callabacus import InternalError, FileFormatError
import os
import re

"""This is an ABACUS plugin.
    request = {
    "action": "design" or "singleMutationScan"
    "id": user_id
    "inpath": inputFilePath
    "filename": filename
    "amount": amount #optional
    "tag":tag
    "design": desginpath
    "mutationScan": scanpath
    "abacuspath": path
    }
"""


abacuspath = 'plugins/ABACUS/ABACUS/bin/'
designpath = 'plugins/ABACUS/design.py'
mutationpath = 'plugins/ABACUS/singleMutationScan.py'



class ABACUS(Plugin):