From d1326ecd2a634110058aedcc6941cd788efb68d3 Mon Sep 17 00:00:00 2001 From: ZL Deng Date: Thu, 21 Dec 2023 23:47:38 +0100 Subject: [PATCH] Fix logging issue for paired-end reads input --- ribodetector/__init__.py | 2 +- ribodetector/detect.py | 6 ++++-- ribodetector/detect_cpu.py | 6 +++--- ribodetector/utils/__version__.py | 2 +- setup.py | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ribodetector/__init__.py b/ribodetector/__init__.py index 4c45ff8..c41d965 100644 --- a/ribodetector/__init__.py +++ b/ribodetector/__init__.py @@ -4,5 +4,5 @@ Accurate and rapid RiboRNA sequences Detector based on deep learning. """ -__version__ = "0.2.9" +__version__ = "0.3.0" __author__ = 'ZL Deng' diff --git a/ribodetector/detect.py b/ribodetector/detect.py index b08a7b6..2b9dfe6 100644 --- a/ribodetector/detect.py +++ b/ribodetector/detect.py @@ -59,7 +59,7 @@ def get_state_dict(self): # "Sequence length must be set to larger than 40.") self.logger.info( - 'The accuracy will be low with reads shorter than 40.') + 'The accuracy will drop with reads shorter than 40.') # High recall model if ensure non-rRNA if self.args.ensure == 'norrna': @@ -447,7 +447,9 @@ def run_with_chunks(self): else: if self.rrna is not None: self.logger.info('Writing output rRNA sequences into file: {}{}{}'.format( - colors.OKBLUE, ", ".join(self.rrna), colors.ENDC)) + colors.OKBLUE, + ", ".join(self.rrna), + colors.ENDC)) rrna_fh = open_for_write(self.rrna[0]) #num_rrna = 0 diff --git a/ribodetector/detect_cpu.py b/ribodetector/detect_cpu.py index b7a20f7..91191cb 100644 --- a/ribodetector/detect_cpu.py +++ b/ribodetector/detect_cpu.py @@ -60,7 +60,7 @@ def load_model(self): # raise RuntimeError( # "Sequence length must be set to larger than 40.") self.logger.info( - 'The accuracy will be low with reads shorter than 40.') + 'The accuracy will drop with reads shorter than 40.') # High recall model if ensure non-rRNA if self.args.ensure == 'norrna': @@ -432,7 +432,7 @@ def run_with_chunks(self): # del r1_data, r2_data, r1_output, r2_output, r1_batch_labels, r2_batch_labels num_read += len(chunk[0]) - self.logger.info('{}{}{}{} reads finished!'.format( + self.logger.info('{}{}{} sequences finished!'.format( colors.OKGREEN, num_read, colors.ENDC)) @@ -535,7 +535,7 @@ def run_with_chunks(self): num_read += len(chunk) - self.logger.info('{}{}{} reads finished!'.format( + self.logger.info('{}{}{} sequences finished!'.format( colors.OKGREEN, num_read, colors.ENDC)) diff --git a/ribodetector/utils/__version__.py b/ribodetector/utils/__version__.py index cd9b137..0404d81 100644 --- a/ribodetector/utils/__version__.py +++ b/ribodetector/utils/__version__.py @@ -1 +1 @@ -__version__ = '0.2.9' +__version__ = '0.3.0' diff --git a/setup.py b/setup.py index 512b1b4..250581d 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setup( name="ribodetector", - version="0.2.9", + version="0.3.0", python_requires=">=3.8, <=3.10", author="Z-L Deng", author_email="dawnmsg@gmail.com",