From 5b5e8f9b567871b3084defb646d16a3f29ea0976 Mon Sep 17 00:00:00 2001 From: Jakob Nybo Nissen Date: Wed, 20 Dec 2023 10:30:56 +0100 Subject: [PATCH] Minor output formatting --- vamb/__main__.py | 6 +++--- vamb/encode.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vamb/__main__.py b/vamb/__main__.py index b3b0c917..87abc48f 100755 --- a/vamb/__main__.py +++ b/vamb/__main__.py @@ -610,6 +610,7 @@ def calc_rpkm( else: assert isinstance(path, list) logger.info(f"\tParsing {len(path)} BAM files with {nthreads} threads") + logger.info(f"\tMin identity: {abundance_options.min_alignment_id}") abundance = vamb.parsebam.Abundance.from_files( path, @@ -621,10 +622,9 @@ def calc_rpkm( ) abundance.save(outdir.joinpath("abundance.npz")) - logger.info(f"\tMin identity: {abundance.minid}") logger.info("\tOrder of columns is:") - for samplename in abundance.samplenames: - logger.info(f"\t\t{samplename}") + for i, samplename in enumerate(abundance.samplenames): + logger.info(f"\t{i:>6}: {samplename}") elapsed = round(time.time() - begintime, 2) logger.info(f"\tProcessed RPKM in {elapsed} seconds.\n") diff --git a/vamb/encode.py b/vamb/encode.py index 54132ad4..5c2e3c11 100644 --- a/vamb/encode.py +++ b/vamb/encode.py @@ -411,7 +411,7 @@ def trainepoch( epoch_absseloss += ab_sse.data.item() logger.info( - "\t\tEpoch: {:>3} Loss: {:.5e} CE: {:.5e} AB: {:.5e} SSE: {:.5e} KLD: {:.5e} Batchsize: {}".format( + "\t\tEpoch: {:>3} Loss: {:.5e} CE: {:.5e} AB: {:.5e} SSE: {:.5e} KLD: {:.5e} Batchsize: {:>4}".format( epoch + 1, epoch_loss / len(data_loader), epoch_celoss / len(data_loader),