\HeaderA{Celegans}{Caenorhabditis elegans full genome (UCSC version ce2)}{Celegans}
\aliasA{BSgenome.Celegans.UCSC.ce2}{Celegans}{BSgenome.Celegans.UCSC.ce2}
\aliasA{BSgenome.Celegans.UCSC.ce2-package}{Celegans}{BSgenome.Celegans.UCSC.ce2.Rdash.package}
\keyword{package}{Celegans}
\keyword{data}{Celegans}
\begin{Description}\relax
Caenorhabditis elegans full genome as provided by UCSC (ce2, Mar. 2004) and stored in Biostrings objects.
\end{Description}
\begin{Note}\relax
This BSgenome data package was made from the following source data files:
\begin{alltt}
chromFa.zip
upstream1000.zip
upstream2000.zip
upstream5000.zip
from http://hgdownload.cse.ucsc.edu/goldenPath/ce2/bigZips/

\end{alltt}
See \code{?\LinkA{BSgenomeForge}{BSgenomeForge}} and the BSgenomeForge
vignette (\code{vignette("BSgenomeForge")}) in the BSgenome software
package for how to make a BSgenome data package.
\end{Note}
\begin{Author}\relax
H. Pages
\end{Author}
\begin{SeeAlso}\relax
\LinkA{BSgenome-class}{BSgenome.Rdash.class},
\LinkA{DNAString-class}{DNAString.Rdash.class},
\code{\LinkA{available.genomes}{available.genomes}},
\LinkA{BSgenomeForge}{BSgenomeForge}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
Celegans
seqlengths(Celegans)
Celegans$chrI  # same as Celegans[["chrI"]]

if ("AGAPS" %in% masknames(Celegans)) {

  ## Check that the assembly gaps contain only Ns:
  checkOnlyNsInGaps <- function(seq)
  {
    ## Replace all masks by the inverted AGAPS mask
    masks(seq) <- gaps(masks(seq)["AGAPS"])
    af <- alphabetFrequency(seq)
    found_letters <- names(af)[af != 0]
    if (any(found_letters != "N"))
        stop("assembly gaps contain more than just Ns")
  }

  ## A message will be printed each time a sequence is removed
  ## from the cache:
  options(verbose=TRUE)

  for (seqname in seqnames(Celegans)) {
    cat("Checking sequence", seqname, "... ")
    seq <- Celegans[[seqname]]
    checkOnlyNsInGaps(seq)
    cat("OK\n")
  }
}

## See the GenomeSearching vignette in the BSgenome software
## package for some examples of genome-wide motif searching using
## Biostrings and the BSgenome data packages:
if (interactive())
    vignette("GenomeSearching", package="BSgenome")
\end{ExampleCode}
\end{Examples}

