-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Docs updated for new output files - Long output filenames simplified
- Loading branch information
1 parent
7a8a0cd
commit 1e3c44e
Showing
33 changed files
with
363 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
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", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
https://github.com/edgardomortiz/Captus | ||
This file is part of Captus. Captus is free software: you can redistribute it and/or modify | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
https://github.com/edgardomortiz/Captus | ||
This is the control program for the assembly pipeline of Captus. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
https://github.com/edgardomortiz/Captus | ||
This is the control program for the bait design pipeline of Captus. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
https://github.com/edgardomortiz/Captus | ||
This module contains Unicycler's class for writing output to both stdout and a log file. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
https://github.com/edgardomortiz/Captus | ||
This file is part of Captus. Captus is free software: you can redistribute it and/or modify | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
https://github.com/edgardomortiz/Captus | ||
This file is part of Captus. Captus is free software: you can redistribute it and/or modify | ||
|
@@ -28,7 +28,7 @@ def select(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_select.log"), stdout_verbosity_level=1) | ||
log.logger = log.Log(Path(out_dir, "captus-select.log"), stdout_verbosity_level=1) | ||
|
||
mar = 33 # Margin for aligning parameters and values | ||
|
||
|
@@ -145,7 +145,7 @@ def select(full_command, args): | |
|
||
def load_aln_stats_tsv(clusters_dir: Path): | ||
start = time.time() | ||
aln_stats_tsv_path = Path(clusters_dir, "captus-design_cluster.alignments.tsv") | ||
aln_stats_tsv_path = Path(clusters_dir, "captus-cluster_alignments.tsv") | ||
if aln_stats_tsv_path.exists(): | ||
aln_stats = {} | ||
with open(aln_stats_tsv_path, "rt") as stats: | ||
|
@@ -457,7 +457,7 @@ def copy_loci(aln_stats: dict, out_dir: Path, overwrite: bool, show_more: bool): | |
|
||
|
||
def write_aln_stats(out_dir: Path, aln_stats_filtered: dict): | ||
stats_tsv_file = Path(out_dir, "captus-design_select.alignments.tsv") | ||
stats_tsv_file = Path(out_dir, "captus-select_alignments.tsv") | ||
if not aln_stats_filtered: | ||
if stats_tsv_file.exists() and not file_is_empty(stats_tsv_file): | ||
return stats_tsv_file | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
https://github.com/edgardomortiz/Captus | ||
This module contains hard-coded settings for Captus-assembly | ||
This module contains hard-coded settings for Captus | ||
This file is part of Captus. Captus is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by the Free Software Foundation, | ||
|
@@ -336,7 +336,7 @@ | |
TRANSLATED_REF_SUFFIX = ".captus.faa" | ||
|
||
# JSON with paths to references filename | ||
JSON_REFS = "captus-assembly_extract.refs.json" | ||
JSON_REFS = "captus-extract_refs.json" | ||
|
||
# Valid combinations of marker directories and format directories | ||
VALID_MARKER_FORMAT_COMBO = [(m, f) for m in ["NUC","PTD","MIT"] for f in ["AA","NT","GE","GF"]] | ||
|
@@ -598,7 +598,7 @@ | |
|
||
# File name for sequence-to-sample equivalence table used by ASTRAL-Pro to analyze trees that | ||
# include paralogs | ||
ASTRAL_PRO_EQ = "captus-assembly_align.astral-pro.tsv" | ||
ASTRAL_PRO_EQ = "captus-align_astral-pro.tsv" | ||
|
||
# Import data for clustering file names | ||
DES_SUFFIXES = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
https://github.com/edgardomortiz/Captus | ||
Captus' version is stored here in a separate file so it can exist in only one place. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
https://github.com/edgardomortiz/Captus | ||
This file is a convenience wrapper for running Captus assemble directly from the source tree. By | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Copyright 2020-2024 Edgardo M. Ortiz ([email protected]) | ||
Copyright 2020-2025 Edgardo M. Ortiz ([email protected]) | ||
https://github.com/edgardomortiz/Captus | ||
This file is a convenience wrapper for running Captus design directly from the source tree. By | ||
|
Oops, something went wrong.