\HeaderA{readBpmap}{Parses a Bpmap file}{readBpmap}
\aliasA{readBpmapHeader}{readBpmap}{readBpmapHeader}
\aliasA{readBpmapSeqinfo}{readBpmap}{readBpmapSeqinfo}
\keyword{file}{readBpmap}
\keyword{IO}{readBpmap}
\begin{Description}\relax
Parses (parts of) a Bpmap (binary probe mapping) file from Affymetrix.
\end{Description}
\begin{Usage}
\begin{verbatim}
readBpmap(filename, seqIndices = NULL, readProbeSeq = TRUE, readSeqInfo
= TRUE, readPMXY = TRUE, readMMXY = TRUE, readStartPos = TRUE,
readCenterPos = FALSE, readStrand = TRUE, readMatchScore = FALSE,
readProbeLength = FALSE, verbose = 0)

readBpmapHeader(filename)

readBpmapSeqinfo(filename, seqIndices = NULL, verbose = 0)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{filename}] The filename as a character.
\item[\code{seqIndices}] A vector of integers, detailing the indices of the
sequences being read. If \code{NULL}, the entire file is being read.
\item[\code{readProbeSeq}] 
\item[\code{readSeqInfo}] Do we read the sequence information (a list
containing information such as sequence name, number of hits etc.)
\item[\code{readPMXY}] Do we read the (x,y) coordinates of the PM-probes.
\item[\code{readMMXY}] Do we read the (x,y) coordinates of the MM-probes
(only relevant if the file has MM information)
\item[\code{readStartPos}] Do we read the start position of the probes.
\item[\code{readCenterPos}] Do we return the start position of the probes.
\item[\code{readStrand}] Do we return the strand of the hits.
\item[\code{readMatchScore}] Do we return the matchscore.
\item[\code{readProbeLength}] Doe we return the probelength.
\item[\code{verbose}] How verbose do we want to be.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{readBpmap} reads a BPMAP file, which is a binary file containing
information about a given probe's location in a sequence.
Here sequence means some kind of reference sequence, typically a
chromosome or a scaffold. \code{readBpmapHeader} reads the header of
the BPMAP file, and \code{readBpmapSeqinfo} reads the sequence info of
the sequences (so this function is merely a convinience function).
\end{Details}
\begin{Value}
For \code{readBpmap}: A list of lists, one list for every sequence
read. The components of 
the sequence lists, depends on the argument of the function call. For
\code{readBpmapheader} a list with two components \code{version} and
\code{numSequences}. For \code{readBpmapSeqinfo} a list of lists
containing the sequence info.
\end{Value}
\begin{Note}\relax
\end{Note}
\begin{Author}\relax
Kasper Daniel Hansen <khansen@stat.berkeley.edu>
\end{Author}
\begin{References}\relax
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{tpmap2bpmap}{tpmap2bpmap}} for information on how to write
Bpmap files.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
\end{ExampleCode}
\end{Examples}

