Handle igraph attribute parameter list, internal function for jam_igraph()
Usage
handle_igraph_param_list(
x,
attr,
factor_l,
i_values = NULL,
attr_type = c("node", "vertex", "edge"),
verbose = FALSE,
...
)Arguments
- x
igraphobject- attr
charactername of the attribute to update inx.- factor_l
listornumericvector orfunction:listofnumericvectors wherenames(factor_l)correspond to attribute names, and the names of numeric vectors are attribute values The attribute names and attribute values are used to match relevant entities of typeattr_type. For matching entities, attribute values are used as defined by attribute nameattr, and are multiplied by the matching numeric value infactor_l.numericvector which is directly multiplied byi_valuesto produce an adjusted output vectori_values.functionwhich is used to modifyi_valuesby callingfactor_l(i_values)to produce adjusted outputi_values.
- i_values
vectorof attribute values that represent the current attribute values inxfor the attributeattr.- attr_type
characterstring indicating the type of entity being adjusted inx:"node"or"vertex"refers toigraph::vertex_attr()"edge"refers toigraph::edge_attr()
- ...
additional arguments are ignored.
Details
This mechanism is intended to help update igraph attributes
in bulk operations by the attribute values associated with
nodes or edges. Most commonly, the argument factor_l is
multiplied by numeric attributes to scale attribute values,
for example label font size, or node size.
For example:
handle_igraph_param_list(x,
attr="size",
factor_l=list(nodeType=c(Gene=1, Set=2)),
i_values=rep(1, igraph::vcount(x)),
attr_type="node")This function call will match node attribute nodeType,
the size of nodes with attribute value
nodeType="Set" are multiplied size * 2,
nodeType="Gene" are multiplied size * 1.
See also
Other jam utility functions:
ashape(),
avg_angles(),
avg_colors_by_list(),
bulk_cnet_adjustments(),
call_fn_ellipsis_deprecated(),
cell_fun_bivariate(),
collapse_mem_clusters(),
colorRamp2D(),
deconcat_df2(),
display_colorRamp2D(),
enrichList2geneHitList(),
filter_mem_genes(),
filter_mem_sets(),
find_colname(),
find_enrich_colnames(),
get_hull_data(),
get_igraph_layout(),
gsubs_remove(),
isColorBlank(),
make_legend_bivariate(),
make_point_hull(),
mem_find_overlap(),
order_colors(),
rank_mem_clusters(),
rotate_coordinates(),
subgraph_jam(),
subset_mem(),
summarize_node_spacing(),
xyAngle()