Created
August 23, 2020 05:35
-
-
Save kozo2/1e8e5432630d4f2b4a9d1b919326da9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addAllostericEdges <- function(allostericEdges, networkSUID, | |
64 | |
64 | |
targetlayer = "kegg_global"){ | |
65 | |
allostericTable = read.table(allostericEdges) | |
66 | |
65 | |
67 | |
nodeTable <- RCy3::getTableColumns(table = "node", network = networkSUID) | |
66 | |
68 | |
edgeTable <- RCy3::getTableColumns(table = "edge", network = networkSUID) | |
69 | |
70 | |
for (i in 1:nrow(allostericTable)) { | |
71 | |
sourceCpd = allostericTable[i, "V2"] | |
72 | |
sourceLayer = allostericTable[i, "V1"] | |
73 | |
layerNodeTable = dplyr::filter(nodeTable, LAYER_INDEX==sourceLayer) | |
74 | |
sourceNodeTable = dplyr::filter(layerNodeTable, | |
75 | |
KEGG_NODE_LABEL==allostericTable[i, "V2"]) | |
76 | |
sourceNodeSuids = sourceNodeTable$SUID | |
77 | |
78 | |
79 | |
} | |
80 | |
# layerTable = dplyr::filter(edgeTable, V3=="") | |
67 | |
81 | |
# networkTable <- RCy3::getTableColumns(table = "network", | |
68 | |
82 | |
# network = networkSUID) | |
69 | |
83 | |
70 | |
84 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment