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

summary_get_organelle_output.py bug fix #281

Merged
merged 39 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
37e06f6
1. remove redundant disentangling for get_organelle_from_assembly.py
Kinggerm Dec 8, 2022
220c056
1. remove redundant disentangling for get_organelle_from_assembly.py
Kinggerm Dec 18, 2022
3eaa1b1
1. statistical_func.py: fix a bug
Kinggerm Jan 3, 2023
1b53e12
version info
Kinggerm Jan 3, 2023
7728318
1. change the default of depth_factor because the baseline is now set…
Kinggerm Jan 3, 2023
9e45afc
1. parse_tab: speed up, remove tags of minor coverage
Kinggerm Jan 10, 2023
04a9832
1. use custom norm_logpdf function instead of slow scipy.stats.norm.l…
Kinggerm Jan 12, 2023
3cee166
1. parsing the same graph_file and tab_file only once before multiple…
Kinggerm Jan 12, 2023
ad94d16
1. parsing the same graph_file and tab_file only once before multiple…
Kinggerm Jan 12, 2023
d5331ec
1. fix a bug in previous added feature of skipping clustering and oth…
Kinggerm Jan 13, 2023
d970f9e
1. fix (skip) apm Solution not found error
Kinggerm Jan 13, 2023
e9be981
1. discard np.random and fix consistent issue
Kinggerm Jan 17, 2023
52614e5
1. fix a bug in revise_labels_according_to_constraints
Kinggerm Jan 18, 2023
651fe72
1. create soft link instead of copying the original read file(s) into…
Kinggerm Jan 24, 2023
80d418a
1. create soft link instead of copying the original read file(s) into…
Kinggerm Jan 24, 2023
15581bd
1. try to add multiprocessing for get_read_len_mean_max_count: failed…
Kinggerm Jan 25, 2023
045b1a2
1. fix a bug: db_name can be different from the "mode" when the mode …
Kinggerm Jan 26, 2023
3976230
v1.8.0.0-beta5
Kinggerm Feb 28, 2023
fc270bc
remove the connections before removing vertices
Kinggerm Mar 10, 2023
63652fe
fix a bug using np
Kinggerm Mar 10, 2023
4d67fd7
add gb_to_tbl.py for common format conversion
JianjunJin Mar 25, 2023
07eff1d
add gb_to_tbl.py for common format conversion
JianjunJin Mar 25, 2023
59b637e
add gb_to_tbl.py for common format conversion
JianjunJin Mar 25, 2023
5e7e073
add gb_to_tbl.py description
JianjunJin Mar 25, 2023
906040f
add gb_to_tbl.py description
JianjunJin Mar 25, 2023
eb7b8a9
fix a bug of logging
JianjunJin Mar 28, 2023
cbba683
version update
JianjunJin Mar 28, 2023
6484ee8
restrict each label to be unique
JianjunJin Mar 30, 2023
104d696
add illustration when two types must be used together
JianjunJin Apr 4, 2023
9a2cc18
fix summary_get_organelle_output.py bug of degenerating results
JianjunJin Jul 4, 2023
aaaa328
1. rm_contigs: < depth_cutoff -> >= depth_cutoff
JianjunJin Aug 18, 2023
3a2b1aa
1. add get_fasta_lengths, called by updated slim_graph to calculate h…
JianjunJin Aug 18, 2023
0ab43c6
1. only update_vertex_clusters after any changes - merging.
JianjunJin Aug 18, 2023
e5958b5
1.8.0.0-pre8
JianjunJin Aug 18, 2023
cad15f1
1. rm_contigs: < depth_cutoff -> >= depth_cutoff
JianjunJin Aug 20, 2023
b7911e4
1. rm_contigs: < depth_cutoff -> >= depth_cutoff
JianjunJin Aug 20, 2023
f2e3d7a
1. rm_contigs: < depth_cutoff -> >= depth_cutoff
JianjunJin Aug 20, 2023
b19cd81
- automatic converting negative coverage to positive and report it (p…
JianjunJin Aug 20, 2023
7bd3d2e
Merge branch 'master' into intermediate_graph
Kinggerm Oct 29, 2024
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
4,667 changes: 3,699 additions & 968 deletions GetOrganelleLib/assembly_parser.py

Large diffs are not rendered by default.

48 changes: 47 additions & 1 deletion GetOrganelleLib/pipe_control_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def __init__(self, sample_out_dir, prefix=""):
if "circular genome" in detail_record:
this_circular = "yes"
elif " - WARNING: " in line and line[:4].isdigit():
if "Degenerate base(s) used!" in line:
if "Ambiguous base(s) used!" in line:
this_degenerate = "yes"
if "circular" in this_record:
this_record["circular"] += " & " + this_circular
Expand Down Expand Up @@ -984,6 +984,52 @@ def get_static_html_context(remote_url, try_times=5, timeout=10, verbose=False,
return {"status": False, "info": "unknown", "content": ""}


def log_target_res(final_res_combinations_inside,
log_handler=None,
read_len_for_log=None,
kmer_for_log=None,
universal_overlap=False,
mode="",):
echo_graph_id = int(bool(len(final_res_combinations_inside) - 1))
for go_res, final_res_one in enumerate(final_res_combinations_inside):
this_graph = final_res_one["graph"]
this_k_cov = round(final_res_one["cov"], 3)
if read_len_for_log and kmer_for_log:
this_b_cov = round(this_k_cov * read_len_for_log / (read_len_for_log - kmer_for_log + 1), 3)
else:
this_b_cov = None
if log_handler:
if echo_graph_id:
log_handler.info("Graph " + str(go_res + 1))
for vertex_set in sorted(this_graph.vertex_clusters):
copies_in_a_set = {this_graph.vertex_to_copy[v_name] for v_name in vertex_set}
if copies_in_a_set != {1}:
for in_vertex_name in sorted(vertex_set):
log_handler.info("Vertex_" + in_vertex_name + " #copy = " +
str(this_graph.vertex_to_copy.get(in_vertex_name, 1)))
cov_str = " kmer-coverage" if universal_overlap else " coverage"
log_handler.info("Average " + mode + cov_str +
("(" + str(go_res + 1) + ")") * echo_graph_id + " = " + "%.1f" % this_k_cov)
if this_b_cov:
log_handler.info("Average " + mode + " base-coverage" +
("(" + str(go_res + 1) + ")") * echo_graph_id + " = " + "%.1f" % this_b_cov)
else:
if echo_graph_id:
sys.stdout.write("Graph " + str(go_res + 1) + "\n")
for vertex_set in sorted(this_graph.vertex_clusters):
copies_in_a_set = {this_graph.vertex_to_copy[v_name] for v_name in vertex_set}
if copies_in_a_set != {1}:
for in_vertex_name in sorted(vertex_set):
sys.stdout.write("Vertex_" + in_vertex_name + " #copy = " +
str(this_graph.vertex_to_copy.get(in_vertex_name, 1)) + "\n")
cov_str = " kmer-coverage" if universal_overlap else " coverage"
sys.stdout.write("Average " + mode + cov_str +
("(" + str(go_res + 1) + ")") * echo_graph_id + " = " + "%.1f" % this_k_cov + "\n")
if this_b_cov:
sys.stdout.write("Average " + mode + " base-coverage" + ("(" + str(go_res + 1) + ")") *
echo_graph_id + " = " + "%.1f" % this_b_cov + "\n")


def download_file_with_progress(remote_url, output_file, log_handler=None, allow_empty=False,
sha256_v=None, try_times=5, timeout=100000, alternative_url_list=None, verbose=False):
time_0 = time.time()
Expand Down
Loading