Skip to content

Commit

Permalink
updated CLI output. E.g., removed 'processing' block.
Browse files Browse the repository at this point in the history
  • Loading branch information
JLSteenwyk committed Feb 13, 2024
1 parent 5242d1f commit b2a371c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
8 changes: 8 additions & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Major changes to ClipKIT are summarized here.

2.2.1
Removed "Processing" block from CLI output. Reordered CLI output to
put user arguments first followed by outputs. Added original length of
the alignment to output statistics.

2.2.0
Incorporated C3 trimming, which can be evoked using the c3 trimming mode.

2.1.2
Incorporate codon-based trimming. When one position in a codon gets trimmed based on the mode
being used, the whole codon will get trimmed from the alignment.
Expand Down
5 changes: 2 additions & 3 deletions clipkit/clipkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from .write import (
write_user_args,
write_output_stats,
write_processing_aln,
write_output_files_message,
)

Expand Down Expand Up @@ -145,7 +144,6 @@ def execute(
# for reporting runtime duration to user
start_time = time.time()

write_processing_aln()
trim_run, stats = run(
input_file,
input_file_format,
Expand All @@ -160,7 +158,6 @@ def execute(
use_log,
quiet,
)
write_output_files_message(output_file, complement, use_log)

# display to user what args are being used in stdout
write_user_args(
Expand All @@ -177,6 +174,8 @@ def execute(
use_log,
)

write_output_files_message(output_file, complement, use_log)

if use_log:
warn_if_all_sites_were_trimmed(trim_run.msa)
warn_if_entry_contains_only_gaps(trim_run.msa)
Expand Down
16 changes: 1 addition & 15 deletions clipkit/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@
from .modes import TrimmingMode


def write_processing_aln() -> None:
logger.info(
textwrap.dedent(
"""\
------------------------
| Processing Alignment |
------------------------
""" # noqa
)
)


def write_user_args(
in_file_name: str,
in_file_format: "FileFormat",
Expand Down Expand Up @@ -75,7 +62,6 @@ def write_output_files_message(
textwrap.dedent(
f"""\
------------------------
| Writing output files |
------------------------
Expand All @@ -98,9 +84,9 @@ def write_output_stats(stats: "TrimmingStats", start_time: float) -> None:
---------------------
| Output Statistics |
---------------------
Original length: {stats.alignment_length}
Number of sites kept: {stats.output_length}
Number of sites trimmed: {stats.trimmed_length}
Percentage of alignment trimmed: {stats.trimmed_percentage}%
Execution time: {round(time.time() - start_time, 3)}s
Expand Down

0 comments on commit b2a371c

Please sign in to comment.