self.chunks_list = RefDataArray.read( mainInitializer.refdata_file_name).get_parsed_list() @staticmethod def _run_pipeline(refdata: RefDataLine): handler = PipelineHandler(refdata) handler.run() def run(self): Utilities.single_core_queue(func=self._run_pipeline, queue=self.chunks_list) if __name__ == '__main__': mainInitializer = Initializer() launchTime = Utilities.get_time() nodeName = subprocess.getoutput("hostname").strip() mainLogFile = "{a}nBee_{b}_{c}.log".format( a=mainInitializer.logs_directory, b=nodeName, c=launchTime) print("Started main workflow with log file: '{}'".format(mainLogFile)) logging.basicConfig( format=u'%(levelname)-8s [%(asctime)s] %(message)s', level=logging.DEBUG, handlers=[logging.FileHandler(mainLogFile), logging.StreamHandler()]) sampleDataParser = SampleDataParser(mainInitializer.sampledata_file_name) sampleFilesList = sampleDataParser.get_parsed_list() if len(sampleFilesList) == 0: Utilities.log_and_raise( "No files to process, exiting: '{}'".format(sampleFilesList)) chunksHandler = ChunksHandler()
def __init__(self): self._namespace = self._parse_args() self.sampledata = self._namespace.input self.target_length = CoveragesVerifier.get_wc_l(self._namespace.genome) + 1 self.prefix = self._namespace.prefix self.suffix = self._namespace.suffix self.debugging_bool = self._namespace.debug self.output = self._namespace.output if len(self.output) == 0: self.output = "{}sampledata/{}.sampledata".format(Utilities.ends_with_slash(os.path.dirname(self.prefix)), Utilities.get_time())