diff --git a/captus/align.py b/captus/align.py index 1dc373c..9c80c1c 100644 --- a/captus/align.py +++ b/captus/align.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This file is part of Captus. Captus is free software: you can redistribute it and/or modify @@ -36,7 +36,7 @@ def align(full_command, args): captus_start = time.time() out_dir, out_dir_msg = make_output_dir(args.out) - log.logger = log.Log(Path(args.out, "captus-assembly_align.log"), stdout_verbosity_level=1) + log.logger = log.Log(Path(args.out, "captus-align.log"), stdout_verbosity_level=1) mar = 26 # Margin for aligning parameters and values @@ -1538,7 +1538,7 @@ def write_paralog_stats(out_dir, tsv_comment, shared_paralog_stats): if not shared_paralog_stats: return red("No paralogs were found...") else: - stats_tsv_file = Path(out_dir, "captus-assembly_align.paralogs.tsv") + stats_tsv_file = Path(out_dir, "captus-align_paralogs.tsv") with open(stats_tsv_file, "wt") as tsv_out: tsv_out.write(tsv_comment) tsv_out.write("\t".join(["marker_type", @@ -1783,7 +1783,7 @@ def write_aln_stats(out_dir, tsv_comment, shared_aln_stats): if not shared_aln_stats: return None else: - stats_tsv_file = Path(out_dir, "captus-assembly_align.alignments.tsv") + stats_tsv_file = Path(out_dir, "captus-align_alignments.tsv") with open(stats_tsv_file, "wt") as tsv_out: tsv_out.write(tsv_comment) tsv_out.write("\t".join(["path", @@ -1817,7 +1817,7 @@ def write_sam_stats(out_dir, tsv_comment, shared_sam_stats): if not shared_sam_stats: return None else: - stats_tsv_file = Path(out_dir, "captus-assembly_align.samples.tsv") + stats_tsv_file = Path(out_dir, "captus-align_samples.tsv") with open(stats_tsv_file, "wt") as tsv_out: tsv_out.write(tsv_comment) tsv_out.write("\t".join(["sample", diff --git a/captus/assemble.py b/captus/assemble.py index 0169f90..0c7d46b 100644 --- a/captus/assemble.py +++ b/captus/assemble.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This file is part of Captus. Captus is free software: you can redistribute it and/or modify @@ -33,7 +33,7 @@ def assemble(full_command, args): captus_start = time.time() out_dir, out_dir_msg = make_output_dir(args.out) - log.logger = log.Log(Path(args.out, "captus-assembly_assemble.log"), stdout_verbosity_level=1) + log.logger = log.Log(Path(args.out, "captus-assemble.log"), stdout_verbosity_level=1) mar = 21 # Margin for aligning parameters and values @@ -1021,7 +1021,7 @@ def calc_asm_stats( msg = ( - f"'{sample_name}' {stage.upper()}: {num_contigs:,} contigs, total {tot_length:,} bp," + f"'{sample_name}': {stage.upper()} {num_contigs:,} contigs, total {tot_length:,} bp," f" min {min_length:,} bp, max {max_length:,} bp, avg {avg_length:,} bp, N50 {n50:,} bp" ) return msg @@ -1096,9 +1096,9 @@ def collect_asm_stats(out_dir, tsv_comment): depth_tsv_files = sorted(list(Path(out_dir).resolve().rglob("depth_stats.tsv"))) length_tsv_files = sorted(list(Path(out_dir).resolve().rglob("length_stats.tsv"))) - assembly_stats_tsv = Path(out_dir, "captus-assembly_assemble.assembly_stats.tsv") - depth_stats_tsv = Path(out_dir, "captus-assembly_assemble.depth_stats.tsv") - length_stats_tsv = Path(out_dir, "captus-assembly_assemble.length_stats.tsv") + assembly_stats_tsv = Path(out_dir, "captus-assemble_assembly_stats.tsv") + depth_stats_tsv = Path(out_dir, "captus-assemble_depth_stats.tsv") + length_stats_tsv = Path(out_dir, "captus-assemble_length_stats.tsv") if not assembly_tsv_files or not depth_tsv_files or not length_tsv_files: return None, None, None diff --git a/captus/bait.py b/captus/bait.py index dd74b28..e2bee80 100644 --- a/captus/bait.py +++ b/captus/bait.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This file is part of Captus. Captus is free software: you can redistribute it and/or modify @@ -36,7 +36,7 @@ def bait(full_command, args): captus_start = time.time() out_dir, out_dir_msg = make_output_dir(args.out) - log.logger = log.Log(Path(out_dir, "captus-design_bait.log"), stdout_verbosity_level=1) + log.logger = log.Log(Path(out_dir, "captus-bait.log"), stdout_verbosity_level=1) mar = 28 # Margin for aligning parameters and values diff --git a/captus/bioformats.py b/captus/bioformats.py index 4876107..525e251 100644 --- a/captus/bioformats.py +++ b/captus/bioformats.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This file is part of Captus. Captus is free software: you can redistribute it and/or modify diff --git a/captus/captus_assembly.py b/captus/captus_assembly.py index 4626f9c..b6d4add 100644 --- a/captus/captus_assembly.py +++ b/captus/captus_assembly.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This is the control program for the assembly pipeline of Captus. diff --git a/captus/captus_design.py b/captus/captus_design.py index 1baa7e2..f7e13d1 100644 --- a/captus/captus_design.py +++ b/captus/captus_design.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This is the control program for the bait design pipeline of Captus. diff --git a/captus/clean.py b/captus/clean.py index 48a8aba..5fcab33 100644 --- a/captus/clean.py +++ b/captus/clean.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This file is part of Captus. Captus is free software: you can redistribute it and/or modify @@ -32,7 +32,7 @@ def clean(full_command, args): captus_start = time.time() out_dir, out_dir_msg = make_output_dir(args.out) - log.logger = log.Log(Path(out_dir, "captus-assembly_clean.log"), stdout_verbosity_level=1) + log.logger = log.Log(Path(out_dir, "captus-clean.log"), stdout_verbosity_level=1) mar = 21 # Margin for aligning parameters and values diff --git a/captus/cluster.py b/captus/cluster.py index ef8ac49..b428229 100644 --- a/captus/cluster.py +++ b/captus/cluster.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This file is part of Captus. Captus is free software: you can redistribute it and/or modify @@ -35,7 +35,7 @@ def cluster(full_command, args): captus_start = time.time() out_dir, out_dir_msg = make_output_dir(args.out) - log.logger = log.Log(Path(out_dir, "captus-design_cluster.log"), stdout_verbosity_level=1) + log.logger = log.Log(Path(out_dir, "captus-cluster.log"), stdout_verbosity_level=1) mar = 23 # Margin for aligning parameters and values @@ -1274,7 +1274,7 @@ def min_copies(aln_trimmed: dict, aln_width: int): def write_aln_stats(out_dir: Path, shared_aln_stats: list): - stats_tsv_file = Path(out_dir, "captus-design_cluster.alignments.tsv") + stats_tsv_file = Path(out_dir, "captus-cluster_alignments.tsv") if not shared_aln_stats: if stats_tsv_file.exists() and not file_is_empty(stats_tsv_file): return stats_tsv_file diff --git a/captus/extract.py b/captus/extract.py index 406a4dc..e8d0bc7 100644 --- a/captus/extract.py +++ b/captus/extract.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This file is part of Captus. Captus is free software: you can redistribute it and/or modify @@ -43,7 +43,7 @@ def extract(full_command, args): captus_start = time.time() out_dir, out_dir_msg = make_output_dir(args.out) - log.logger = log.Log(Path(args.out, "captus-assembly_extract.log"), stdout_verbosity_level=1) + log.logger = log.Log(Path(args.out, "captus-extract.log"), stdout_verbosity_level=1) mar = 25 # Margin for aligning parameters and values ################################################################################################ @@ -1997,7 +1997,7 @@ def blat_misc_dna( else: if not keep_all: Path(blat_dna_out_file).unlink() - write_gff3(dna_hits, marker_type, disable_stitching, dna_gff_file) + write_gff3(dna_hits, marker_type, disable_stitching, tsv_comment, dna_gff_file) recovery_stats = write_fastas_and_report(dna_hits, sample_name, dna_target, blat_dna_out_dir, marker_type, max_loci_files, tsv_comment, overwrite) @@ -2470,7 +2470,7 @@ def collect_ext_stats(out_dir, tsv_comment): if not samples_stats: return None else: - stats_file_out = Path(out_dir, "captus-assembly_extract.stats.tsv") + stats_file_out = Path(out_dir, "captus-extract_stats.tsv") header = "\t".join(settings.EXT_STATS_HEADER) + "\n" with open(stats_file_out, "wt") as tsv_out: tsv_out.write(tsv_comment) diff --git a/captus/log.py b/captus/log.py index 12d7ed4..ab67a92 100644 --- a/captus/log.py +++ b/captus/log.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This module contains Unicycler's class for writing output to both stdout and a log file. diff --git a/captus/misc.py b/captus/misc.py index 85f2a5b..cee9978 100644 --- a/captus/misc.py +++ b/captus/misc.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Copyright 2020-2024 Edgardo M. Ortiz (e.ortiz.v@gmail.com) +Copyright 2020-2025 Edgardo M. Ortiz (e.ortiz.v@gmail.com) https://github.com/edgardomortiz/Captus This file is part of Captus. Captus is free software: you can redistribute it and/or modify diff --git a/captus/report.py b/captus/report.py index 612f37b..1202921 100644 --- a/captus/report.py +++ b/captus/report.py @@ -1516,7 +1516,7 @@ def build_qc_report(out_dir, qc_extras_dir):
Version: {version}{command}