def __init__(self, args, pipelinecommit, startingtime, scriptpath):
        """
        :param args: command line arguments
        :param pipelinecommit: pipeline commit or version
        :param startingtime: time the script was started
        :param scriptpath: home path of the script
        """
        import multiprocessing
        # Initialise variables
        self.commit = str(pipelinecommit)
        self.starttime = startingtime
        self.homepath = scriptpath
        self.analysistype = args.analysistype
        # Define variables based on supplied arguments
        self.path = os.path.join(args.path, '')
        assert os.path.isdir(self.path), u'Supplied path is not a valid directory {0!r:s}'.format(self.path)
        self.sequencepath = os.path.join(args.sequencepath, '')
        assert os.path.isdir(self.sequencepath), u'Sequence path  is not a valid directory {0!r:s}' \
            .format(self.sequencepath)
        self.targetpath = os.path.join(args.targetpath, self.analysistype, '')
        try:
            self.reportpath = args.reportpath
        except AttributeError:
            self.reportpath = os.path.join(self.path, 'reports')
        assert os.path.isdir(self.targetpath), u'Target path is not a valid directory {0!r:s}' \
            .format(self.targetpath)
        self.bcltofastq = args.bcltofastq
        self.miseqpath = args.miseqpath
        self.miseqfolder = args.miseqfolder
        self.fastqdestination = args.fastqdestination
        self.forwardlength = args.forwardlength
        self.reverselength = args.reverselength
        self.numreads = 2 if self.reverselength != 0 else 1
        self.customsamplesheet = args.customsamplesheet
        # Set the custom cutoff value
        self.cutoff = args.cutoff
        # Use the argument for the number of threads to use, or default to the number of cpus in the system
        self.cpus = int(args.cpus if args.cpus else multiprocessing.cpu_count())
        self.runmetadata = args.runmetadata
        self.taxonomy = {'Escherichia': 'coli', 'Listeria': 'monocytogenes', 'Salmonella': 'enterica'}
        self.pipeline = args.pipeline
        self.copy = args.copy
        # Run the analyses
        self.runner()
def __init__ ( self , args , pipelinecommit , startingtime , scriptpath ) : import multiprocessing self . commit = str ( pipelinecommit ) self . starttime = startingtime self . homepath = scriptpath self . analysistype = args . analysistype self . path = os . path . join ( args . path , '' ) assert os . path . isdir ( self . path ) , u'Supplied path is not a valid directory {0!r:s}' . format ( self . path ) self . sequencepath = os . path . join ( args . sequencepath , '' ) assert os . path . isdir ( self . sequencepath ) , u'Sequence path  is not a valid directory {0!r:s}' . format ( self . sequencepath ) self . targetpath = os . path . join ( args . targetpath , self . analysistype , '' ) try : self . reportpath = args . reportpath except AttributeError : self . reportpath = os . path . join ( self . path , 'reports' ) assert os . path . isdir ( self . targetpath ) , u'Target path is not a valid directory {0!r:s}' . format ( self . targetpath ) self . bcltofastq = args . bcltofastq self . miseqpath = args . miseqpath self . miseqfolder = args . miseqfolder self . fastqdestination = args . fastqdestination self . forwardlength = args . forwardlength self . reverselength = args . reverselength self . numreads = 2 if self . reverselength != 0 else 1 self . customsamplesheet = args . customsamplesheet self . cutoff = args . cutoff self . cpus = int ( args . cpus if args . cpus else multiprocessing . cpu_count ( ) ) self . runmetadata = args . runmetadata self . taxonomy = { 'Escherichia' : 'coli' , 'Listeria' : 'monocytogenes' , 'Salmonella' : 'enterica' } self . pipeline = args . pipeline self . copy = args . copy self . runner ( )
:param args: command line arguments
        :param pipelinecommit: pipeline commit or version
        :param startingtime: time the script was started
        :param scriptpath: home path of the script