% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{summary_plot_rwr_attributes}
\alias{summary_plot_rwr_attributes}
\title{Summary Plot RWR attributes}
\usage{
summary_plot_rwr_attributes(
X,
color = NULL,
seed.id = NULL,
seed.type = NULL,
plot = TRUE
)
}
\arguments{
\item{X}{a 'rwr.attributes' or 'list.rwr.attributes' object
from rwr_find_seeds_between_attributes()}
\item{color}{(optional) a named character vector or list,
list of color to apply to each type}
\item{seed.id}{(optional) a character vector, to filter the results and
filter on specific seeds IDs}
\item{seed.type}{(optional) a character vector, to filter the results and
filter on specific seeds types}
\item{plot}{logical, if TRUE then the plot is produced}
}
\value{
a 'ggplot' object
}
\description{
Based on the results of
\code{\link[netOmics]{rwr_find_seeds_between_attributes}} which identify the
closest k neighbors from a seed, this function returns a barplot of the node
types (layers) reached for each seed.
}
\examples{
graph1 <- igraph::graph_from_data_frame(
list(from = c("A", "B", "A", "D", "C", "A", "C"),
to = c("B", "C", "D", "E", "D", "F", "G")),
directed = FALSE)
graph1 <- igraph::set_vertex_attr(graph = graph1,
name = 'type',
index = c("A","B","C"),
value = "1")
graph1 <- igraph::set_vertex_attr(graph = graph1,
name = 'type',
index = c("D","E"),
value = "2")
graph1 <- igraph::set_vertex_attr(graph = graph1,
name = 'type',
index = c("F", "G"),
value = "3")
rwr_res <- random_walk_restart(X = graph1,
seed = c("A", "B", "C", "D", "E"))
rwr_res_type <- rwr_find_seeds_between_attributes(X = rwr_res,
attribute = "type",
k = 3)
summary_plot_rwr_attributes(rwr_res_type)
}
\seealso{
\code{\link[netOmics]{random_walk_restart}},
\code{\link[netOmics]{rwr_find_seeds_between_attributes}}
}