diff --git a/flextaxd/modules/CreateKrakenDatabase.py b/flextaxd/modules/CreateKrakenDatabase.py index 57bdcd6..55a41d3 100644 --- a/flextaxd/modules/CreateKrakenDatabase.py +++ b/flextaxd/modules/CreateKrakenDatabase.py @@ -217,11 +217,14 @@ def create_database(self,outdir,keep=False): logger.info("cp {outdir}/*.map {krakendb}".format(outdir=outdir,krakendb=self.krakendb)) logger.info(self.krakenversion+"-build --build --db {krakendb} {params} --threads {threads}".format(krakendb=self.krakendb, threads=self.build_processes, params=self.params)) os.system(self.krakenversion+"-build --build --skip-maps --db {krakendb} {params} --threads {threads}".format(krakendb=self.krakendb, threads=self.build_processes, params=self.params)) + if self.krakenversion in ["kraken2"]: logger.info("Create inspect file!") os.system(self.krakenversion+"-inspect --db {krakendb} --report-zero-counts --threads {threads} > {krakendb}/inspect.txt".format(krakendb=self.krakendb,threads=self.build_processes )) + os.system("gzip {krakendb}/*.map".format(krakendb=self.krakendb)) + os.system("gzip {krakendb}/inspect.txt".format(krakendb=self.krakendb)) if not keep: os.system(self.krakenversion+"-build --clean --db {krakendb}".format(outdir=outdir,krakendb=self.krakendb, threads=self.processes)) - logger.info("Cleaning up tmp files") - os.system('find {krakendb} -maxdepth 1 -name "*.f*a" -print0 | xargs -0 rm'.format(krakendb=self.krakendb)) + # logger.info("Cleaning up tmp files") + # os.system('find {krakendb} -maxdepth 1 -name "*.f*a" -print0 | xargs -0 rm'.format(krakendb=self.krakendb)) logger.info("{krakenversion} database created".format(krakenversion=self.krakenversion))