Skip to content

Commit

Permalink
option to have kepp labels of the protein nodes in the plot in the or…
Browse files Browse the repository at this point in the history
…iginal order
  • Loading branch information
Karin Schork committed Dec 1, 2023
1 parent a1bcf85 commit c1278a9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/plotBipartiteGraph.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,18 @@ plotBipartiteGraph <- function(G, vertex.label.dist = 0, legend = TRUE,
pos_peptides <- Layout[,1][Layout[,2] == 0]

if (node_labels_proteins == "letters") {
#### TODO: was ist, wenn es mehr als 26 Proteine gibt?
names_G[Layout[,2] == 1] <- LETTERS[rank(pos_proteins)]
}
if (node_labels_proteins == "accessions") {
names_G[Layout[,2] == 1] <- limma::strsplit2(V(G)$name[Layout[,2] == 1], ";")[,1]
}
# nicht geordnete Zahlen
if (node_labels_proteins == "numbers_noord") {
names_G[Layout[,2] == 1] <- 1:length(pos_proteins)
}



if (node_labels_peptides == "numbers") {
names_peptides <- 1:sum(Layout[,2] == 0)
Expand Down

0 comments on commit c1278a9

Please sign in to comment.