Skip to content

Commit

Permalink
Fix logging issue for paired-end reads input
Browse files Browse the repository at this point in the history
  • Loading branch information
dawnmy committed Dec 21, 2023
1 parent e659e2d commit d1326ec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ribodetector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
6 changes: 4 additions & 2 deletions ribodetector/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions ribodetector/detect_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion ribodetector/utils/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.2.9'
__version__ = '0.3.0'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]",
Expand Down

0 comments on commit d1326ec

Please sign in to comment.