iddn.visualize_multi ==================== .. py:module:: iddn.visualize_multi .. autoapi-nested-parse:: Visualization of networks for multi-omics data Functions --------- .. autoapisummary:: iddn.visualize_multi.draw_multi_layer_network Module Contents --------------- .. py:function:: draw_multi_layer_network(cen_lst, rad_lst, mol_name, mol_grp=None, mol_label=None, mol_color=None, mol_size=None, mol_font_alpha=None, mol_font_color=None, edge_mol0=None, edge_mol1=None, edge_color=None, edge_weight=None, edge_style=None, fig_size=np.array((4, 2)), fig_scale=5, font_size_scale=1.5, out_name='') Draw networks in multiple components For multi-omics data, it is often needed to use one component of an omics type. Sometimes it is also beneficial to further divide one omics type to more than one component for better view. This function provide the flexibility for these tasks. Each component can be an ellipse or line segment. Each node can have its own size and color. Each edge can have different color, weight, and style. Several examples can be found in the visualization tutorial (Tutorial 3) of iDDN package. We define `C` as the number of components. `M` is the number of nodes to show, `E` is the number of edges. :param cen_lst: Each row is the x-y coordinate of the position of the center of each component. For details and more explanation, see Tutorial 3. :type cen_lst: (C,2) array_like :param rad_lst: Each row is the axes lengths of each component. For details, see tutorial 3. :type rad_lst: (C,2) array_like :param mol_name: The list of node names in the network. This is the internal name of each node. The edges must be described according to these names. :type mol_name: (M) array_like :param mol_label: The list of node labels to draw. This could be different from `node_name`. If not provided, we will display `mol_name` on the figure. :type mol_label: (M) array_like, optional :param mol_grp: The component (grouping) membership of each node. The index of component is the same as in `cen_lst` and `rad_lst`. :type mol_grp: (M) array_like, optional :param mol_color: The color of each node. For eample, each element can be the name of color, like `black`. :type mol_color: (M) array_like, optional :param mol_size: The size of each node. The value is relative to the standard size, which is automatically determined according to the canvas size and node number. Set to 1 will be the same as standard size, to 1.5 to get larger nodes, etc. :type mol_size: (M) array_like, optional :param mol_font_alpha: The transparency of the text label of each node :type mol_font_alpha: (M) array_like, optional :param mol_font_color: The color of the text label of each node :type mol_font_color: (M) array_like, optional :param edge_mol0: For each edge, list the name of the first node :type edge_mol0: (E) array_like :param edge_mol1: For each edge, list the name of the second node :type edge_mol1: (E) array_like :param edge_color: The color of each edge :type edge_color: (E) array_like, optional :param edge_weight: The weight of each edge, relative to the automatically determined standard value. :type edge_weight: (E) array_like, optional :param edge_style: The style of each edge, each element can be `solid` or `dashed` :type edge_style: (E) array_like, optional :param fig_size: The size of the canvas. All distance related parameters appeared above should be based on this canvas size. See ``Tutorial 3`` for details. :type fig_size: (2) array_like, optional :param fig_scale: The global scaling of the figure when printing or showing. :type fig_scale: float or int :param font_size_scale: The font size relative to the automatically determined standard font size. For example, use 1.5 to get a larger font. :type font_size_scale: float or int :param out_name: The name of the output file. Need to specify the file extension as well, like `pdf` or `png`. :type out_name: str, optional :rtype: None