Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
berntpopp committed May 14, 2024
2 parents 1ac546c + 52a16c8 commit dc871f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ max_groups_full <- read.csv("results/disease_group_STRING_cluster_indices_min_ge

# example plot of kidney disease group distribution within subcluster
ex1 <- plot_disease_group_distribution(subcluster="3-1", max_groups_full)
ex1
############################################


Expand Down Expand Up @@ -198,11 +199,11 @@ ial_plot3 <- plot_network_by_level(index_genes = c("9606.ENSP00000363973", "9606
max_level = 1)

# TODO: correct Error if edgelist is empty, e.g.:
# ia_plot2 <- plot_network_of_index_gene(index_gene = "9606.ENSP00000239891",
# string_db = string_db_full,
# min_comb_score = 890,
# STRING_id_vec = STRING_id_vec,
# disease_group_df = max_groups_full)
ia_plot_error <- plot_network_of_index_gene(index_gene = "9606.ENSP00000239891",
string_db = string_db_full,
min_comb_score = 810, #810 works, 820 error, 890 different error
STRING_id_vec = STRING_id_vec,
disease_group_df = max_groups_full)


############################################
Expand Down
4 changes: 2 additions & 2 deletions analyses/functions/protein_interaction_analysis-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ create_edgelist <- function(connection_df, all_contacts, min_comb_score, symbol_

# function to plot the interaction network given by an edgelist. The index gene symbols have a square marker
plot_interaction_network <- function(edgelist, disease_group_df, index_gene_symbols){
print(edgelist)
# create a network from the edgelist
netw <- network(edgelist, directed = F)

Expand Down Expand Up @@ -348,7 +347,8 @@ plot_network_of_index_gene <- function(index_gene, string_db, min_comb_score, ST

# plot interaction network of index gene
interaction_plot <- plot_interaction_network(edgelist = edgelist,
disease_group_df = disease_group_df)
disease_group_df = disease_group_df,
index_gene_symbols = c(index_gene))

return(interaction_plot)
}
Expand Down

0 comments on commit dc871f7

Please sign in to comment.