Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/GatherPPIData.R
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ GetGeneMANIA.edges <- function(gm.results.path,

network_lines <- all_lines[start_line[1]:(end_line[1] - 1)]

edgetable <- read.table(
edgetable <- utils::read.table(
text = network_lines,
header = TRUE,
stringsAsFactors = FALSE,
Expand Down Expand Up @@ -552,7 +552,7 @@ GetKinsub.edges <- function(kinasesubstrate.filename = "Kinase_Substrate_Dataset
symbol.map = NULL) {
nodes <- toupper(.map_nodes_with_symbol_map(gene.cccn.nodes, symbol.map))

kinasesubstrateraw <- read.table(
kinasesubstrateraw <- utils::read.table(
kinasesubstrate.filename,
header = TRUE,
skip = 3,
Expand Down
4 changes: 2 additions & 2 deletions R/MakeClusterList.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ MakeClusterList <- function(ptmtable, keeplength = 2, toolong = 3.5, tsne_perple
# 2. For each cluster, set all PTM–PTM pairs in the cluster to 1 (indicating co-membership).
# 3. The final matrix for a method has 1 for PTM pairs co-clustered in that method; 0 otherwise.

co_membership_matrix <- function(clusters, all_ptms) {
co_membership_matrix <- function(clusters) {
# 1. square matrix of all PTMs
mat <- matrix(0,
nrow = length(PTMnames), ncol = length(PTMnames),
Expand All @@ -155,7 +155,7 @@ MakeClusterList <- function(ptmtable, keeplength = 2, toolong = 3.5, tsne_perple
return(mat)
}

adjacency_matrices <- purrr::map(clusters.list, co_membership_matrix, all_ptms = all_ptms)
adjacency_matrices <- purrr::map(clusters.list, co_membership_matrix)

# Step 2: Sum the Co-Membership Matrices Across Methods
adj.sum <- Reduce("+", adjacency_matrices) # values: 0 (never), 1, 2, 3 (co-clustered in all 3 methods)
Expand Down
2 changes: 1 addition & 1 deletion R/MakeCorrelationNetwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ MakeCorrelationNetwork <- function(adj.consensus.matrix, ptm.correlation.matrix)

# Sum correlations in one dimension, then the other dimension
gene.cccn2 <- dplyr::summarise(
dplyr::group_by(gene.cccn, .data$Gene.Name),
dplyr::group_by(gene.cccn, Gene.Name),
dplyr::across(
tidyselect::where(is.numeric),
~ sum(.x, na.rm = TRUE)
Expand Down
Loading