\HeaderA{psimi25XML2Graph}{Convert a vector of PSI-MI 2.5 XML files into graph objects}{psimi25XML2Graph}
\keyword{models}{psimi25XML2Graph}
\begin{Description}\relax
The function \code{psimi25XML2Graph} take a vector of XML 2.5 files
from te same data source and generates a graph object based on the
type of the files.
\end{Description}
\begin{Usage}
\begin{verbatim}
psimi25XML2Graph(psimi25files, psimi25source, type = "interaction",
directed = TRUE, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{psimi25files}] Single file name or a vector of PSI-MI 2.5 XML file names or
URLs. In case of splitted data the latter form is preferred. Different datasets or datasets from different sources should
not be put into the same vector. 
\item[\code{psimi25source}] Source of the PSI-MI 2.5 XML file, see \code{\LinkA{psimi25Source-class}{psimi25Source.Rdash.class}} 
\item[\code{type}] A character string which is either "interaction" or
"complex". As the value suggests, use "interaction" if the XML
file contains experimental physical data, and "complex" if the file
contains curated protein complex membership data.
\item[\code{directed}] Logical, whehter the returned graph object should be
directed or undirected 
\item[\code{...}] Other parameters passed to
\code{\LinkA{parsePsimi25Interaction}{parsePsimi25Interaction}} 
\end{ldescription}
\end{Arguments}
\begin{Value}
If type is "interaction",  then a resulting psimi25Graph object is genertated on the
aggregation of the XML files. Otherwise if type is "complex,", a resulting psimi25HyperGraph
object is generated on the aggregate of the XML files.
\end{Value}
\begin{Author}\relax
Jitao David Zhang, Tony Chiang
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{psimi25Source-class}{psimi25Source.Rdash.class}},
\code{\LinkA{psimi25Graph-class}{psimi25Graph.Rdash.class}},
\code{\LinkA{psimi25Hypergraph-class}{psimi25Hypergraph.Rdash.class}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
xmlDir <- system.file("/extdata/psi25files",package="RpsiXML")

intactxml <- file.path(xmlDir, "intact_2008_test.xml")
intactGraph <- psimi25XML2Graph(intactxml, INTACT.PSIMI25, type="interaction")

intactComplexxml <- file.path(xmlDir,"intact_complexSample.xml")
intactComplexGraph <- psimi25XML2Graph(intactComplexxml, INTACT.PSIMI25, type="complex")
\end{ExampleCode}
\end{Examples}

