\HeaderA{sharedBy}{Find the gene pairs that share a domain.}{sharedBy}
\keyword{methods}{sharedBy}
\begin{Description}\relax
\code{sharedBy} finds whether the given domain is in each of the
elements of the domain list.
\end{Description}
\begin{Usage}
\begin{verbatim}sharedBy(domainL)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{domainL}] is a list, each element of the list is a vector of
domains. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{sharedBy} first remove all the elements with length 0 or have
value 'NA'.  Then apply the reverseSplit on the remaining list.
\end{Details}
\begin{Value}
A list with each element represent a domain, and the values of the
element are the pairs that share this domain.
\end{Value}
\begin{Author}\relax
Z. Jiang
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{reverseSplit}{reverseSplit}}, \code{\LinkA{domainDist}{domainDist}}, \code{\LinkA{getSharedDomains}{getSharedDomains}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Load PFAM and SMART domains shared between Tong's Synthetic lethal data
data(AtongFnDomain)
## Find pair that share identical domain
sharedBy(AtongFnDomain$SharedPfam[1:20])
\end{ExampleCode}
\end{Examples}

