Skip to content

Commit

Permalink
Improved info
Browse files Browse the repository at this point in the history
  • Loading branch information
semenko committed Feb 16, 2024
1 parent 727c3b5 commit 69fde74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bam2tensor"
version = "1.2"
version = "1.3"
description = "Bam2Tensor"
authors = ["Nick Semenkovich <[email protected]>"]
license = "MIT"
Expand Down
8 changes: 5 additions & 3 deletions src/bam2tensor/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def main(

if os.path.exists(output_file) and not overwrite:
print(
f"\tOutput file already exists and --overwrite not specified. Skipping {input_bam}."
"\tOutput file already exists and --overwrite not specified. Skipping this .bam."
)
skip_count += 1
continue
Expand Down Expand Up @@ -204,9 +204,11 @@ def main(
for error in errors_list:
print(f"\t{error}")

print(f"\n{skip_count} .bam files were skipped due to existing output files.")

print("\nRun complete.")
print(f"\n{len(bams_to_process) - skip_count} .bam files were processed.")
print(f"\t{skip_count} .bam files were skipped due to existing output files.")
print(f"\t{len(errors_list)} .bam files had errors (missing index files?).")
print(f"\nTotal time elapsed: {time.time() - time_start:.2f} seconds")


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions src/bam2tensor/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(
print("Could not load methylation embedding from cache: " + str(e))

if not cache_available:
print("\tNo cache available, generating fresh methylation embedding.")
print("No cache available, generating fresh methylation embedding.")
# Generate CpG sites if we don't have a cached embedding
self.parse_fasta_for_cpg_sites()

Expand All @@ -106,7 +106,7 @@ def __init__(
# Save the key & expensive objects to a cache
self.save_embedding_cache()
else:
print(f"\tLoaded methylation embedding from cache: {self.cache_file}")
print(f"Loaded methylation embedding from cache: {self.cache_file}")

## Generate objects for efficient lookups
# A dict of chromosomes -> index for quick lookups (e.g. "chr1" -> 0)
Expand Down

0 comments on commit 69fde74

Please sign in to comment.