% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/network_utils.R
\name{removeDrugs}
\alias{removeDrugs}
\title{Remove Drug Nodes from a Network Matrix}
\usage{
removeDrugs(network_table)
}
\arguments{
\item{network_table}{A two- or three-column matrix representing the network
(edge list), typically as returned by \code{buildKeggNetwork()} or related
functions.}
}
\value{
A matrix of the same format as the input, with all drug nodes
(prefix \code{"dr:"}) and their incident edges removed.
}
\description{
Removes all edges from a network where either endpoint is annotated as a
KEGG drug (prefix \code{"dr:"}).
}
\details{
The function scans the first two columns (source and target) for node IDs
containing the \code{"dr:"} prefix. All rows involving such nodes are
removed. If no drug nodes are found, the original matrix is returned and
a message is printed.
}
\examples{
## 1) Prepare an example network containing KEGG drug nodes
data(MetaPathNet_example_network)

net_hsa <- rbind(
  MetaPathNet_example_network,
  c("dr:D00001", "K00463", "drug_example"),
  c("K00463", "dr:D00002", "drug_example")
)

## 2) Remove all KEGG drug nodes (dr:...) from the network
net_hsa_nodrug <- removeDrugs(net_hsa)

## 3) Compare dimensions before and after drug removal
dim(net_hsa)         # Original network dimensions
dim(net_hsa_nodrug)  # Network dimensions after drug removal
nrow(net_hsa) - nrow(net_hsa_nodrug)  # Number of drug-related edges removed

}
