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

Try to stop outputting files if not displayed or built #352

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
13 changes: 12 additions & 1 deletion scripts/cluster_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,16 @@ def print_all_clus_alerts(key):
else:
print(f"Not found. Options are: {clusters.keys()}")

print("These clusters will be run: ", clus_to_run)
print("These clusters will be run: ", clus_to_run, "\n")

removed = False
for clus in clus_to_run:
if clusters[clus]["type"] == "do_not_display" and not clusters[clus]["nextstrain_build"]:
print(f"Remark: cluster {clus} has type 'do_not_display' and nextstrain_build=False -> Will be automatically removed from this run (maybe consider commenting out this cluster?)")
clus_to_run.remove(clus)
removed = True
if removed:
print("\nThese clusters will be run: ", clus_to_run, "\n")

# division: collect division info for USA and Switzerland
division = False
Expand Down Expand Up @@ -692,6 +701,8 @@ def print_all_clus_alerts(key):
print(f"No summary written out for cluster {clus} (no sequences assigned to this cluster).")
continue

nextstrain_run = clusters[clus]['nextstrain_build']
build_type = clusters[clus]['type']
clus_build_name = clus_data_all[clus]["build_name"]
table_file = f"{tables_path}{clus_build_name}_table.tsv"
ordered_country = pd.DataFrame.from_dict(clus_data_all[clus]["summary"], orient="index").sort_values(by=["first_seq", "last_seq"])
Expand Down