\HeaderA{CoHyperGResult-class}{Class "CoHyperGResult"}{CoHyperGResult.Rdash.class}
\aliasA{expectedCounts,CoHyperGResult-method}{CoHyperGResult-class}{expectedCounts,CoHyperGResult.Rdash.method}
\aliasA{geneCounts,CoHyperGResult-method}{CoHyperGResult-class}{geneCounts,CoHyperGResult.Rdash.method}
\aliasA{oddsRatios,CoHyperGResult-method}{CoHyperGResult-class}{oddsRatios,CoHyperGResult.Rdash.method}
\aliasA{pvalues,CoHyperGResult-method}{CoHyperGResult-class}{pvalues,CoHyperGResult.Rdash.method}
\aliasA{summary,CoHyperGResult-method}{CoHyperGResult-class}{summary,CoHyperGResult.Rdash.method}
\aliasA{universeCounts,CoHyperGResult-method}{CoHyperGResult-class}{universeCounts,CoHyperGResult.Rdash.method}
\keyword{classes}{CoHyperGResult-class}
\begin{Description}\relax
This class represents the results of a test for over-representation
of genes in a selected gene set based among protein complexes upon the  Hypergeometric distribution.
\end{Description}
\begin{Section}{Objects from the Class}
Objects is created by calls to the funtion hyperGTest.
\end{Section}
\begin{Section}{Slots}
\describe{
\item[\code{pvalues}:] \code{"numeric"} vector: the ordered
p-values for each category term tested.
\item[\code{geneCounts}:] \code{"integer"} vector: for each
category term tested, the number of genes from the gene set that
are annotated at the term.
\item[\code{universeCounts}:] \code{"integer"} vector: for
each category term tested, the number of genes from the gene
universe that are annotated at the term.
\item[\code{catToGeneId}:] Object of class \code{"list"}.  The
names of the list are category IDs.  Each element is a vector
of gene IDs annotated at the given category ID and in the
specified gene universe.
\item[\code{annotation}:] A string giving the name of the chip
annotation data package used.
\item[\code{geneIds}:] Object of class \code{"ANY"}: the input
vector of gene identifiers intersected with the universe of gene
identifiers used in the computation.  The class of this slot is
specified as \code{"ANY"} because gene IDs may be integer or
character vectors depending on the annotation package.
\item[\code{testName}:] A string identifying the testing method
used.
\item[\code{pvalueCutoff}:] Numeric value used a a p-value
cutoff.  Used by the \code{show} method to count number of
significant terms.

}
\end{Section}
\begin{Section}{Extends}
Class \code{"HyperGResultBase"}, directly.
\end{Section}
\begin{Section}{Methods}
\describe{
\item[geneCounts] \code{signature(r =
        "CoHyperGResult")}: return an \code{"numeric"}
vector: for each category term tested, the number of genes from
the gene set that are annotated at the term.

\item[pvalues] \code{signature(r =
          "HyperGResult")}: return a \code{"numeric"}
vector: the ordered p-values for each category term tested.

\item[oddsRatios] \code{signature(r =
          "HyperGResult")}: return a \code{"numeric"}
vector: the odds ratio for each category term tested.

\item[expectedCounts] \code{signature(r =
          "HyperGResult")}: return a \code{"numeric"}
vector: the expected number of genes for each GO term tested.

\item[universeCounts] \code{signature(r =
        "HyperGResult")}: return an \code{"numeric"}
vector: for each category term tested, the number of genes from
the gene universe that are annotated at the term.


\item[geneIdUniverse] \code{signature(r =
        "CoHyperGResult")}: return a list named by the
protein Complexes.  Each element of the list is a vector of gene
identifiers (from the gene universe) annotated at the
corresponding protein complex.

\item[summary] \code{signature(r = "CoHyperGResult")}:
Returns a \code{data.frame} summarizing the test result.
Optional arguments \code{pvalue} and \code{categorySize} allow
specification of minimum p-value and cateogyrSize, respectively.
Optional argument \code{htmlLinks} is a logical value indicating
whether to add HTML links (useful in conjunction with xtables
print method with \code{type} set to \code{"html"}).


}
\end{Section}
\begin{Author}\relax
S. Falcon and N. LeMeur
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{HyperGResultBase-class}{HyperGResultBase.Rdash.class}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(DudleyPhenoM)
data(ScISIC)

## Select genes sensitive to paraquat
DudleyPhenoL <- apply(DudleyPhenoM,2,function(x) names(which(x==1)))
paraquat <- DudleyPhenoL[["Paraq"]]

## Apply a hypergeometric test
params <- new("CoHyperGParams",
              geneIds=paraquat, 
              universeGeneIds=rownames(ScISIC),
              annotation="org.Sc.sgd.db",
              categoryName="ScISIC",
              pvalueCutoff=0.01,
              testDirection="over")

paraquat.complex <- hyperGTest(params)

## access the p-values
pvalues(paraquat.complex)[1:5]

## Display a summary of the results
summary(paraquat.complex)[,1:4]
\end{ExampleCode}
\end{Examples}

