Cosegregation

Cosegregation

Added citations to references

← Previous revision Revision as of 21:03, 20 April 2026
Line 202: Line 202:
plt.title("Network Graph from Adjacency Matrix")
plt.title("Network Graph from Adjacency Matrix")
plt.show()
plt.show()
https://networkx.org/documentation/stable/reference/introduction.html
Introduction. Introduction - NetworkX 3.6.1 documentation. (n.d.). https://networkx.org/documentation/stable/reference/introduction.html


This graph represents the interaction between two nodes, where each node, in this case, corresponds to a genomic window, and each edge indicates a cosegregation relationship. NetworkX also supports edge and node attributes. For instance, with nx.draw, you can change all the features within the draw, such as with_labels, node_color, etc., and NetworkX supports multiple layout types, such as random_layout, spring_layout, shell_layout, etc., allowing you to visualize your graph better and obtain more information. https://networkx.org/documentation/stable/reference/introduction.html
This graph represents the interaction between two nodes, where each node, in this case, corresponds to a genomic window, and each edge indicates a cosegregation relationship. NetworkX also supports edge and node attributes. For instance, with nx.draw, you can change all the features within the draw, such as with_labels, node_color, etc., and NetworkX supports multiple layout types, such as random_layout, spring_layout, shell_layout, etc., allowing you to visualize your graph better and obtain more information. Introduction. Introduction - NetworkX 3.6.1 documentation. (n.d.). https://networkx.org/documentation/stable/reference/introduction.html


==== Graph Layouts ====
==== Graph Layouts ====
Line 211: Line 211:
===== Spring Layout =====
===== Spring Layout =====
[[File:NetworkXSpringLayout.png|thumb|NetworkX Spring Layout]]
[[File:NetworkXSpringLayout.png|thumb|NetworkX Spring Layout]]
The spring layout is the default algorithm when visualizing network graphs. This layout positions nodes using the Fruchterman-Reingold force-directed algorithm, which treats edges as springs that hold connected nodes close together, while treating nodes as repelling objects. This will continue until the node positions reach a state of equilibrium. https://networkx.org/documentation/stable/reference/generated/networkx.drawing.layout.spring_layout.html This will produce organized diagrams that will reveal clusters.
The spring layout is the default algorithm when visualizing network graphs. This layout positions nodes using the Fruchterman-Reingold force-directed algorithm, which treats edges as springs that hold connected nodes close together, while treating nodes as repelling objects. This will continue until the node positions reach a state of equilibrium. SPRING_LAYOUT. spring_layout - NetworkX 3.6.1 documentation. (n.d.). https://networkx.org/documentation/stable/reference/generated/networkx.drawing.layout.spring_layout.html This will produce organized diagrams that will reveal clusters.




===== Shell Layout =====
===== Shell Layout =====
[[File:NetworkXShellLayout.png|thumb|NetworkX Shell Layout]]
[[File:NetworkXShellLayout.png|thumb|NetworkX Shell Layout]]
The shell layout positions nodes in concentric circles, https://networkx.org/documentation/stable/reference/generated/networkx.drawing.layout.shell_layout.html which helps for visualizing (in cosegregation) organized by functional categories, levels, or chromosomal positions. Nodes will be arranged on one or more concentric circles (shells), with each shell specified as a list of nodes. Nodes that are in the same shell have the same distance from the center. Edges will be drawn between nodes in adjacent/other shells.
The shell layout positions nodes in concentric circles, Shell_layout. shell_layout - NetworkX 3.6.1 documentation. (n.d.). https://networkx.org/documentation/stable/reference/generated/networkx.drawing.layout.shell_layout.html which helps for visualizing (in cosegregation) organized by functional categories, levels, or chromosomal positions. Nodes will be arranged on one or more concentric circles (shells), with each shell specified as a list of nodes. Nodes that are in the same shell have the same distance from the center. Edges will be drawn between nodes in adjacent/other shells.