man/predictPathCluster.Rd
2aadfaf5
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/pathCluster.R
96e22bfc
 \name{predictPathCluster}
 \alias{predictPathCluster}
 \title{Predicts new paths given a pathCluster model}
 \usage{
 predictPathCluster(pfit, newdata)
 }
 \arguments{
a6b3c979
 \item{pfit}{The pathway cluster model trained by \code{\link{pathCluster}} or \code{\link{pathClassifier}}.}
96e22bfc
 
a6b3c979
 \item{newdata}{The binary pathway dataset to be assigned a cluster label.}
96e22bfc
 }
 \value{
a6b3c979
 A list with the following elements:
 \tabular{ll}{
 \code{labels} \tab a vector indicating the 3M cluster membership. \cr
 \code{posterior.probs} \tab a matrix of posterior probabilities for each path belonging to each cluster.
 }
96e22bfc
 }
 \description{
 Predicts new paths given a pathCluster model.
 }
 \examples{
2aadfaf5
 	## Prepare a weighted reaction network.
96e22bfc
 	## Conver a metabolic network to a reaction network.
  data(ex_sbml) # bipartite metabolic network of Carbohydrate metabolism.
  rgraph <- makeReactionNetwork(ex_sbml, simplify=TRUE)
 
 	## Assign edge weights based on Affymetrix attributes and microarray dataset.
  # Calculate Pearson's correlation.
 	data(ex_microarray)	# Part of ALL dataset.
 	rgraph <- assignEdgeWeights(microarray = ex_microarray, graph = rgraph,
 		weight.method = "cor", use.attr="miriam.uniprot", bootstrap = FALSE)
 
 	## Get ranked paths using probabilistic shortest paths.
087265c8
  ranked.p <- pathRanker(rgraph, method="prob.shortest.path",
572c4aad
 					K=20, minPathSize=8)
087265c8
 
 	## Convert paths to binary matrix.
96e22bfc
 	ybinpaths <- pathsToBinary(ranked.p)
572c4aad
 	p.cluster <- pathCluster(ybinpaths, M=2)
96e22bfc
 
 	## just an example of how to predict cluster membership.
 	pclust.pred <- predictPathCluster(p.cluster,ybinpaths$paths)
 
 }
 \seealso{
2aadfaf5
 Other Path clustering & classification methods: \code{\link{pathClassifier}},
   \code{\link{pathCluster}}, \code{\link{pathsToBinary}},
   \code{\link{plotClassifierROC}},
a6b3c979
   \code{\link{plotClusterMatrix}},
2aadfaf5
   \code{\link{plotPathClassifier}},
   \code{\link{plotPathCluster}},
a6b3c979
   \code{\link{predictPathClassifier}}
96e22bfc
 }
087265c8
 \author{
 Ichigaku Takigawa
96e22bfc
 
087265c8
 Timothy Hancock
 }
 \concept{Path clustering & classification methods}