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

Minor output formatting #282

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions vamb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion vamb/encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down