Skip to content

Commit

Permalink
Removed deprecated function.
Browse files Browse the repository at this point in the history
  • Loading branch information
melomcr committed Feb 23, 2023
1 parent 48b0427 commit 7bf8c87
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions src/dynetan/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,43 +159,6 @@ def viewPath(nvView: Any,
lazy=True)


def showCommunity(nvView: Any,
commID: int,
window: int,
dnad: ds.DNAdata,
colorValDict: Any) -> None:
"""Creates NGLView representation of a specified community.
Renders a series of cylinders to represent all edges in the network that
connect nodes in the same community. Edges between nodes in different
communities are not rendered.
We expect the `nodeCommDF` data frame to contain community data for node IDs
in every analyzed simulation window.
Args:
nvView (obj) : NGLView object.
commID (float): Community ID for the community to be rendered.
window (int) : Window used for representation.
dnad (obj) : Dynamical Network Analysis data object.
colorValDict (obj) : Dictionary that standardizes community colors.
"""

# Gets the list of all connected pairs in the system
connectedPairs = np.asarray(np.where(dnad.corrMatAll[window, :, :] > 0)).T
nonzeroPairs = [(i, j) for i, j in connectedPairs if i < j]

for i, j in nonzeroPairs:
commI = dnad.nxGraphs[window].nodes[i]["modularity"]
commJ = dnad.nxGraphs[window].nodes[j]["modularity"]

# If the pair of nodes is in the same community, render the edge.
if commID == commI == commJ:
viewPath(nvView, [i, j], dnad.distsAll, dnad.maxDirectDist,
dnad.nodesAtmSel, win=window, opacity=1,
color=colorValDict[commID])


def showCommunityGlobal(nvView: Any,
nodeCommDF: pd.DataFrame,
commID: int,
Expand Down

0 comments on commit 7bf8c87

Please sign in to comment.