gdist.Rd
Compute "distance" between two gGraphs using node and edge features.
Distance computation involves (1) assigning a value to each node and edge via value / nvalue / evalue expression (default cn metadata field) (2) assigning a weight to each disjoint interval and edge in the union of the two graphs (log10(width) to intervals and 1 to edges) (3) for each disjoint interval computing a ndist = sum(weight*|value1-value2|)/sum(weight), where if the interval does not exist for one of the graphs we use the value "fill" in place (4) for each (ALT) edge present in one or both graphs compute edist = sum(weight*|value1-value2|)/sum(weight), filling in missing edges as above (5) combining node.coef*ndist + edge.coef*edist
Variations on these distances include defining alternate weight and value expressions for nodes and edges (based on their metadata), changing the padding to align ALT junctions that are not exactly identical.
If graphs are non-haploid (ie have two more intervals for a given reference region) then agg.fun (default min) is used to aggregate the several ndist that map to a that given reference region into a single ndist value for that coordinate.
first graph (or list of graphs)
second graph (or list of graphs)
expression on node and edge metadata to compute node and edge weights
expression on node and edge metadata compute node and edge value
expression on node metadata to compute node value
expression on edge metadata to compute edge value
expression on node metadata to compute node weight
expression on edge metadata to compute edge weight
0 value to fill value for missing nodes and edges
logical flag specifying whether to divide distance by sum(weight) (if TRUE) or not
logical flag specifying whether to remove NA when summing distance (should not be any NA's if value and weight are well specified