zjshi / Maast

Microbial agile accurate SNP Typer
MIT License
29 stars 2 forks source link

Improve logging messages #8

Closed snayfach closed 2 years ago

snayfach commented 2 years ago

It looks like there's two kinds of output being printed:

(1) useful logging messages:

[Warning] Total number of genomes (100) < min. number of genomes required for effective SNP calling with MAF 0.01 (100) [Warning] Skip tag genome selection, all genomes will be used reference genome path: fna/100/GCF_001086635.1.fna

(2) more technical output that is less useful for the user:

b"mash: Relink /global/u1/s/snayfach/.conda/envs/maast/bin/../lib/./libgfortran.so.5' with/lib64/librt.so.1' for IFUNC symbol `clock_gettime'\nSketching fna/100/GCF_002134835.1.fna...\nSketching fna/100/GCF_003975185.1.fna...\nSketching fna/100/GCF_003836205.1.fna...\nSketching fna/100/GCF_001375355.1.fna...\nSketching fna/100/GCF_003055405.1.fna

(6, 54204) 100 [[b'A' b'G' b'G' ... b'G' b'C' b'G'] [b'A' b'G' b'G' ... b'G' b'C' b'G'] [b'A' b'G' b'G' ... b'G' b'C' b'G'] ... [b'A' b'G' b'G' ... b'G' b'C' b'G'] [b'A' b'G' b'G' ... b'G' b'C' b'G'] [b'A' b'G' b'G' ... b'G' b'C' b'G']]

Is is possible to write (2) to a log file in the output directory instead of printing to stderr or stdout?

zjshi commented 2 years ago

Great idea, fixed with an additional log file in the output directory.