% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/string_db.R
\name{buildStringNetwork}
\alias{buildStringNetwork}
\title{Build gene network from peptide ids}
\usage{
buildStringNetwork(string.tbl, use.names = "protein")
}
\arguments{
\item{string.tbl}{matrix with colnames and rownames as ensembl peptide id
(same order)}

\item{use.names}{default is to use protein names ('protein'), other options
are 'ensembl' for ensembl
gene id or 'external' for external gene names}
}
\value{
a new matrix with gene ids instead of peptide ids. The size of matrix
 can be different as
there may not be a mapping or a peptide mapping can have multiple genes.
}
\description{
This can reduce the dimension of the original network, as there may not be a
mapping
between peptide and gene id
}
\examples{
\donttest{
  all.interactions.700 <- stringDBhomoSapiens(score_threshold = 700)
  string.network       <- buildStringNetwork(all.interactions.700,
                                              use.names = 'external')
  # number of edges
  sum(string.network != 0)
}
}
\seealso{
stringDBhomoSapiens
}
