\HeaderA{relNet2TGF}{Transform Relevance Network analysis in TGF output}{relNet2TGF}
\methaliasA{relNet2TGF.maigesRelNetB}{relNet2TGF}{relNet2TGF.maigesRelNetB}
\methaliasA{relNet2TGF.maigesRelNetM}{relNet2TGF}{relNet2TGF.maigesRelNetM}
\keyword{classes}{relNet2TGF}
\begin{Description}\relax
This function receive an object of class \code{\LinkA{maigesRelNetB}{maigesRelNetB}}
or \code{\LinkA{maigesRelNetM}{maigesRelNetM}} and write TGF files with the relevance
networks produced.
\end{Description}
\begin{Usage}
\begin{verbatim}

relNet2TGF(...)

## S3 method for class 'maigesRelNetB':
relNet2TGF(data, dir = "./",
  filename="group.tgf", corC=NULL, pValue=0.05, ...)

## S3 method for class 'maigesRelNetM':
relNet2TGF(data, dir = "./",
  filenames=c("group1.tgf", "group2.tgf", "difPvalue.tgf"),
  pValue=0.05, ...)

\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{data}] object of class \code{\LinkA{maigesRelNetB}{maigesRelNetB}} or \code{\LinkA{maigesRelNetM}{maigesRelNetM}}.
\item[\code{dir}] character string specifying the folder to save the TGF files.
\item[\code{filename}] character string specifying the file name, for objects
of class \code{\LinkA{maigesRelNetB}{maigesRelNetB}}.
\item[\code{filenames}] character vector of length 3 with the file names to
be saved, for objects of class \code{\LinkA{maigesRelNetM}{maigesRelNetM}}.
\item[\code{corC}] numeric in [0,1] specifying the cutoff for selecting
absolute correlation. May also be 'max' to select the maximum
correlation values in a permutation bootstrap strategy, as proposed
by Butte et al. (2000).
\item[\code{pValue}] numeric in [0,1] specifying the cutoff for selecting
correlation values by p-values.
\item[\code{...}] additional parameters.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function only picks the result of the \code{\LinkA{relNetworkB}{relNetworkB}}
or \code{\LinkA{relNetworkM}{relNetworkM}} and display write TGF files. This files
are interesting to be used with \emph{Yed} graph visualisation and
editing tool, wrote in Java (\url{http://www.yworks.com/en/products_yed_about.htm}).
\end{Details}
\begin{Value}
This function don't return any object.
\end{Value}
\begin{Author}\relax
Gustavo H. Esteves <\email{gesteves@vision.ime.usp.br}>
\end{Author}
\begin{References}\relax
Butte, A.J.; Tamayo, P.; Slonim, D.; Golub, T.R. and Kohane,
I.S. Discovering functional relationships between RNA expression and
chemotherapeutic susceptibility using relevance networks, \bold{PNAS},
97, 12182-12186, 2000 (\url{http://www.pnas.org/cgi/content/full/97/22/12182})
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{relNetworkB}{relNetworkB}}, \code{\LinkA{relNetworkM}{relNetworkM}},
\code{\LinkA{maigesRelNetB}{maigesRelNetB}}, \code{\LinkA{maigesRelNetM}{maigesRelNetM}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Loading the dataset
data(gastro)

## Constructing the relevance network for sample
## 'Tissue' comparing 'Neso' and 'Aeso' for the 1st gene group
## The same is also true for objects of class maigesRelNetB
gastro.net = relNetworkM(gastro.summ, sLabelID="Tissue", 
  samples = list(Neso="Neso", Aeso="Aeso"), geneGrp=11,
  type="Rpearson")

relNet2TGF(gastro.net)
\end{ExampleCode}
\end{Examples}

