-
-
-
-
-
-
-
-
-
-
-
- -
- new HIVTxNetwork(json, - button_bar_ui, cluster_attributes) -
-
- Represents an HIV transmission network with annotations
-
-
- Parameters:
- -Name | - -Type | - -Description | -
---|---|---|
json |
-
- - Object - | - -- A JSON object containing the network data. - | -
button_bar_ui |
-
- - HTMLElement - | - -- A UI element for interacting with the network. - | -
cluster_attributes |
-
- - Object - | - -- Attributes related to clusters within the network. - | -
Members
- --
-
-
-
- _calc_country_nodes -
-
- -
- - this is a function which calculates country node centers - for the (experimental) option of rendering networks with - topo maps -- -
-
-
-
-
- auto_expand_pg_handler -
-
- -
- - Grow a CoI defined in @pg based on its growth mode -- -
-
-
-
-
- charge_correction -
-
- -
- d3 layout option setting- -
-
-
-
-
- check_for_time_series -
-
- -
- - Generate a function callback for attribute time series - data -- -
-
-
-
-
- cluster_filtering_functions -
-
- -
- - filters which control which clusters get rendered -- -
-
-
-
-
- colorizer -
-
- -
- default node colorizer- -
-
-
-
-
- defined_priority_groups -
-
- -
- - the list of defined clusters of interest, format as - follows (SLKP, 20240715: may need updating) { 'name' : - 'unique name', 'nodes' : [ { 'node_id' : text, 'added' : - date, 'kind' : text }], 'created' : date, 'description' : - 'text', 'modified' : date, 'kind' : 'text' } -- -
-
-
-
-
- filter_by_size -
-
- -
-
-
-
- filter_if_added -
-
- -
-
-
-
- filter_singletons -
-
- -
-
-
-
- filter_time_period -
-
- -
-
-
-
- highlight_unsuppored_edges -
-
- -
- - if there is computed support for network edges, use it to - highlight possible spurious edges -- -
-
-
-
-
- node_label_drag -
-
- -
- - define a D3 behavior to make node labels draggable -- -
-
-
-
-
- node_shaper -
-
- -
- default node shaper- -
-
-
-
-
- priority_groups_all_events -
-
- -
- - generate a set of all unique temporal events (when new - data were added to ANY CoI) return a Set of date strings - formatted with timeDateUtil.DateViewFormatSlider -- -
-
-
-
-
- priority_groups_compute_overlap -
-
- -
- - compute the overlap between CoI -- -
-
-
-
-
- priority_groups_edit_set_description -
-
- -
- - A function that updates the "freehand" description of a - specific CoI -- -
-
-
-
-
- priority_groups_export -
-
- -
- - export CoI records for interactions with the external DB -- -
-
-
-
-
- priority_groups_export_nodes -
-
- -
- - Export nodes that are members of CoI -- -
-
-
-
-
- priority_groups_export_sets -
-
- -
- Export CoI summary info- -
-
-
-
-
- priority_groups_find_by_name -
-
- -
- - lookup a CoI by name; null if not found -- -
-
-
-
-
- priority_groups_is_new_node -
-
- -
- - returns true is the node was added by the system during - CoI definition/expansion -- -
-
-
-
-
- priority_groups_remove_set -
-
- -
- - Remove a CoI from the list of defined CoI -- -
-
-
-
-
- priority_groups_update_node_sets -
-
- -
- - interact with the remote DB to send updates of CoI - operations -- -
-
-
-
-
- using_time_filter -
-
- -
- - time filter element for various displays -- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Methods
- --
-
-
-
- annotate_cluster_changes() -
-
- -
- - annotate_cluster_changes If the network contains - information about cluster changes (new/moved/deleted - nodes, etc), this function will annotate cluster objects - (in place) with various attributes "delta" : change in the - size of the cluster "flag" : a status flag to be used in - the cluster display table if set to 2 then TBD if set to 3 - then TBD -- -
-
-
-
-
- attribute_node_value_by_id(d:, id:, number:) -
-
- -
- - Fetch the value of an attribute from the node -- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- - - - -d:
- - node object -- - - - -id:
- - - [string] the attribute whose value should be fetched - -- - - - -number:
- - - [bool] if true, only return numerical values - -
-
- -
-
- cluster_display_filter() -
-
- -
-
-
-
- define_attribute_COI_membership(network, data:) -
-
- -
- - define an attribute generator for subcluster membership - attribute -- -
Parameters:
- -- -
+- - - - -Name - -Type - -Description -- - - - -network
- - - : the network / cluster object to ise - -- - - + -data:
+ -- reference date to use - -Class: HIVTxNetwork
-Returns:
-attribute definition-
-
- -
-
- define_attribute_binned_vl(field:, title:) -
-
- -
- - define an attribute generator for binned viral loads -- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- - - - -field:
- - - the node attribute field to use - -- - - - -title:
- - - display this title for the attribute - -Returns:
-attribute definition dict-
+ -
-
- define_attribute_dx_years(relative:, label:) -
-
- -
- - define an attribute generator for dx year -- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- - - - -relative:
- - - if T, compute dx date relative to the network date - in years - -- - - - -label:
- - use this label -Returns:
- -attribute definition dict-
-
- -
-
- define_attribute_network_update() -
-
- -
- - define an attribute generator for new network - nodes/clusters -- -
Returns:
- -attribute definition dict-
-
- -
-
- define_attribute_vl_interpretaion() -
-
- -
- - define an attribute generator for Viral load result - interpretatio -- -
Returns:
- -attribute definition dict-
-
- -
-
- display_warning() -
-
- -
- display a warning string- -
-
-
-
-
- extract_single_cluster(nodes, filter, no_clone) -
-
- -
- - Extract the nodes and edges between them into a separate - object -- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- + - +nodes
+ + -HIVTxNetwork(json, button_bar_ui, cluster_attributes)
+ + ++ + + + -- [array] the list of nodes to extract - -- - - + +filter
new HIVTxNetwork(json, button_bar_ui, cluster_attributes)
+ -- - - [function, optional] (edge) -> bool filtering - function for deciding which edges will be used to - define clusters - -- - - - -no_clone
- - - [bool] if set to T, node objects are **not** shallow - cloned in the return object - -Returns:
- -- [dict] the object representing "Nodes" and "Edges" in the - extracted cluster --
-
- -
-
- filter_by_date(cutoff, - date_file, start_date, node, count_newly_add) -
-
- -
- - Check if the date attribute of a node falls within a - pre-specified range -- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- + - - -cutoff
- - - - + -date_file
- - + Represents an HIV transmission network with annotations ++ + + + + + + + + +Parameters:
+ + ++ +
+ + + + + + ++ + + + + + + +Name + + +Type + + + + + +Description ++ + + + + + + + +json
+ + +Object + + + + + + + + + +A JSON object containing the network data. ++ + + + + + + + +button_bar_ui
+ + +HTMLElement + + + + + + + + + +A UI element for interacting with the network. ++ + + + + + + + +cluster_attributes
+ + +Object + + + + + + + + + +Attributes related to clusters within the network. +-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + hiv_tx_network.js, line 14 +
+
+
+
+
+
+
+
+
- - - -start_date
- - - - - - -node
- - - - - - - -count_newly_add
- - - [bool]; if true, then a "new node" attribute - overrides date checks, so all new (compared to the - previous network) nodes pass the check - -
-
- -
-
- generateClusterOfInterestID() -
-
- -
- - generate the name for a cluster of interest -- -
-
-
-
-
- get_ui_element_selector_by_role(role:, nested:) -
-
- -
- - retrive the DOM ID for an element given its - data-hivtrace-ui-role -- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- - - - -role:
- - - data-hivtrace-ui-role - -- - - - -nested:
- - - true if this is being called from a secondary - network or element (dialog, cluster view etc), which - does not have primary button_ui elements - -
-
- -
-
- initialize_ui_ux_elements() -
-
- -
- initialize UI/UX elements- -
-
-
-
-
- inject_attribute_description() -
-
- -
- - add an attribute description Given an attribute definition - (see comments elsewhere), and a key to associate it with - do -- -
-
-
-
-
- load_priority_sets(url, is_writeable) -
-
- -
- - read and process JSON files defining COI -- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- - - - -url
- - - [string]: load the data from here - -- - - - -is_writeable
- - - [string]: if "writeable", changes to COI lists will - be pushed back to the server This needs to be called - AFTER the clusters/subclusters have been annotated - -
-
- -
-
- map_ids_to_objects() -
-
- -
- - create a map between node IDs and node objects -- -
-
-
-
-
- parse_dates(value) -
-
- -
- parse a date record- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- - - - -value
- - - (date object or string) - -Returns:
- -date object-
-
- -
-
- populate_predefined_attribute(computed, key) -
-
- -
- - populate_predefined_attribute Given an attribute - definition (see comments elsewhere), and a key to - associate it with do 0. Inject the definition of the - attribute into the network dictionary 1. Compute the value - of the attribute for all nodes 2. Compute unique values -- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- - - - -computed
- - - (dict) : attribute definition - -- - - - -key
- - - (string) : the key to associate with the attribute - -
-
- -
-
- priority_group_node_record(node_id, date, kind) -
-
- -
- Generate a CoI node record- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- - - - -node_id
- - - [string] : node name, - -- - - - -date
- - - (optional) : creation date - -- - - - -kind
- - - (optional) : node creation mode - -
-
- -
-
- priority_groups_automatic() -
-
- -
- - filter the list of CoI to return those which have been - created by the system -- -
-
-
-
-
- priority_groups_compute_node_membership() -
-
- -
- - Compute which CoI do various nodes belong to, and define - additional attributes for each node -- -
-
-
-
-
- priority_groups_expanded() -
-
- -
- - filter the list of CoI to return those which have been - automatically expanded -- -
-
-
-
-
- priority_groups_pending() -
-
- -
- - filter the list of CoI to return those which have not been - reviewed/validated -- -
-
-
-
-
- priority_groups_validate(groups, auto_extend) -
-
- -
- validate the list of CoI- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- - - - -groups
- array - - -- is a list of CoI name: unique string description: - string, nodes: { { 'id' : node id, 'added' : date, - 'kind' : _cdcPrioritySetNodeKind } }, created: date, - kind: kGlobals.CDCCOIKind, tracking: - kGlobals.CDCCOITrackingOptions createdBy : - kGlobals.CDCCOICreatedBySystem,kGlobals.CDCCOICreatedManually - -- - - - -auto_extend
- bool - - -- : if true, automatically expand existing CoI - -
-
- -
-
- <static> inject_attribute_node_value_by_id(node, id, value) -
-
- -
- - Add an attribute value to the node object -- -
Parameters:
- -- -
- -- - - - -Name - -Type - -Description -- - - - -node
- - [object] : node, -- - - - -id
- - - [string] : attribute id - -- - - - -value
- - : attribute value -
-
- -
-
- <static> is_edge_injected() -
-
- -
- - Is this node NOT genetic, i.e. added to the network via - social or other means -- -
-
-
-
-
- <static> is_new_node() -
-
- -
- - does the node have "new node" attribute -- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-