Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log file/progress formatting for better readability #52

Open
mckellardw opened this issue May 22, 2024 · 2 comments
Open

Log file/progress formatting for better readability #52

mckellardw opened this issue May 22, 2024 · 2 comments

Comments

@mckellardw
Copy link

Currently the progress prints with formatting to highlight the read counts. Could you add an option to remove this formatting so that the output log files are readable? This may be related to #33

I am using ribodetector version 0.3.1

Current:

2024-05-12 18:20:24 : INFO  Processed �[1m�[96m250204238�[0m sequences in total
2024-05-12 18:20:24 : INFO  Detected �[1m�[96m188277238�[0m non-rRNA sequences
2024-05-12 18:20:24 : INFO  Detected �[1m�[96m61927000�[0m rRNA sequences
``

Ideal:

2024-05-12 18:20:24 : INFO Processed 250204238 sequences in total
2024-05-12 18:20:24 : INFO Detected 188277238 non-rRNA sequences
2024-05-12 18:20:24 : INFO Detected 61927000 rRNA sequences

@dawnmy
Copy link
Member

dawnmy commented May 24, 2024

It seems the formatting does not display correctly for you. It should look normal in stdout also with cat or less on log file:

2024-01-10 23:16:30 : INFO  Writing output non-rRNA sequences into file: ../outputs/G78512_pe.nonrrna.1.fq, ../outputs/G78512_pe.nonrrna.2.fq
2024-01-10 23:18:47 : INFO  1048576 sequences finished!
2024-01-10 23:20:45 : INFO  1922725 sequences finished!
2024-01-10 23:20:45 : INFO  Processed 1922725 sequences in total
2024-01-10 23:20:45 : INFO  Detected 1903676 non-rRNA sequences
2024-01-10 23:20:45 : INFO  Detected 19049 rRNA sequences

The text editor like Vim will just show the actual ANSI escape sequences:

2024-01-10 23:18:47 : INFO  ^[[92m1048576^[[0m sequences finished!
2024-01-10 23:20:45 : INFO  ^[[92m1922725^[[0m sequences finished!
2024-01-10 23:20:45 : INFO  Processed ^[[1m^[[96m1922725^[[0m sequences in total
2024-01-10 23:20:45 : INFO  Detected ^[[1m^[[96m1903676^[[0m non-rRNA sequences
2024-01-10 23:20:45 : INFO  Detected ^[[1m^[[96m19049^[[0m rRNA sequences

What did you use to show the log? Do you want to parse the log file to generate report like multiqc? I will consider to add --noansi in the future release.

@mckellardw
Copy link
Author

I just used tee to print & write the log info. --noansi sounds like a great fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants