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

2024 refactoring rf2 #165

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion html/network.html
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ <h4 class="modal-title">Listing nodes in cluster X</h4>
} else {
d3.select("#app-error").style("display", "none");
hivtrace.histogramDistances(graph, histogram_tag, histogram_label);
hivtrace.graphSummary(graph, graph_summary_tag);
hivtrace.graphSummary(user_graph, graph_summary_tag);

[
"#main-tab",
Expand Down
2 changes: 1 addition & 1 deletion html/plain.html
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ <h4 class="modal-title">Listing nodes in cluster X</h4>
} else {
d3.select("#app-error").style("display", "none");
hivtrace.histogramDistances(graph, histogram_tag, histogram_label);
hivtrace.graphSummary(graph, graph_summary_tag);
hivtrace.graphSummary(user_graph, graph_summary_tag);

[
"#main-tab",
Expand Down
2 changes: 1 addition & 1 deletion html/priority-sets-args.html
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ <h5 class="modal-desc">Select CoI from the list</h5>
} else {
d3.select("#app-error").style("display", "none");
hivtrace.histogramDistances(graph, histogram_tag, histogram_label);
hivtrace.graphSummary(user_graph.json, graph_summary_tag);
hivtrace.graphSummary(user_graph, graph_summary_tag);

[
"#main-tab",
Expand Down
5 changes: 2 additions & 3 deletions html/social.html
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ <h4 class="modal-title">Listing nodes in cluster X</h4>
} else {
d3.select("#app-error").style("display", "none");
hivtrace.histogramDistances(graph, histogram_tag, histogram_label);
hivtrace.graphSummary(graph, graph_summary_tag);
hivtrace.graphSummary(user_graph, graph_summary_tag);

[
"#main-tab",
Expand Down Expand Up @@ -927,8 +927,7 @@ <h4 class="modal-title">Listing nodes in cluster X</h4>

var initialize_cluster_network_graphs = function () {
//Initialize clusternetworkgraph with json url
url =
"../test/workshop/SocialDemoFiles/SocialNetwork.trace.json";
url = "../test/workshop/SocialDemoFiles/SocialNetwork.trace.json";
//url = "test/LA.json"

d3.json(url, function (error, results) {
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ <h4 class="modal-title">Listing nodes in cluster X</h4>
} else {
d3.select("#app-error").style("display", "none");
hivtrace.histogramDistances(graph, histogram_tag, histogram_label);
hivtrace.graphSummary(graph, graph_summary_tag);
hivtrace.graphSummary(user_graph, graph_summary_tag);

[
"#main-tab",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hivtrace-viz",
"version": "1.2.4-alpha.7",
"version": "1.2.5-alpha.1",
"description": "Visualization for the popular HIV-TRACE package",
"engines": {
"node": ">=18 || >20"
Expand Down
20 changes: 12 additions & 8 deletions src/clusternetwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -4482,7 +4482,13 @@ var hivtrace_cluster_network_graph = function (
container
.selectAll("path")
.attr("d", misc.symbol(symbol_type).size(node_size(node)))
.style("fill", (d) => node_color(d));
.style("fill", (d) => node_color(d))
.classed(
"multi_sequence",
(d) =>
_.isArray(d[kGlobals.network.AliasedSequencesID]) &&
d[kGlobals.network.AliasedSequencesID].length > 1
);

if (node.show_label) {
if (container.selectAll("text").empty()) {
Expand Down Expand Up @@ -4514,12 +4520,6 @@ var hivtrace_cluster_network_graph = function (
"selected_object",
(d) => d.match_filter && !self.hide_unselected
)
.classed(
"multi_sequence",
(d) =>
_.isArray(d[kGlobals.network.AliasedSequencesID]) &&
d[kGlobals.network.AliasedSequencesID].length > 1
)
.classed("injected_object", (d) => d.node_class === "injected")
.attr("transform", (d) => "translate(" + d.x + "," + d.y + ")")
.style("opacity", (d) => node_opacity(d))
Expand Down Expand Up @@ -5715,7 +5715,7 @@ var hivtrace_cluster_network_graph = function (
anything_changed = true;
}

if (n.match_filter) {
if (n.match_filter && n.parent) {
n.parent.match_filter += 1;
}
});
Expand Down Expand Up @@ -6318,6 +6318,10 @@ var hivtrace_cluster_network_graph = function (
null,
{ "no-filter": true }
);
} else {
self.draw_extended_node_table([], null, null, {
"no-filter": true,
});
}
});
}
Expand Down
6 changes: 3 additions & 3 deletions src/clustersOfInterest.js
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,9 @@ function open_editor(
}

_.each(nodes_to_add, (n) => {
if (!(n in existing_ids) && n in valid_ids) {
panel_object._append_node(valid_ids[n]);
existing_ids[n] = 1;
if (!(n.id in existing_ids) && n.id in valid_ids) {
panel_object._append_node(valid_ids[n.id]);
existing_ids[n.id] = 1;
need_update = true;
} else {
console.log("***", n);
Expand Down
Loading
Loading