# Define the chromosome lengths for the genome of interest.
chrlens <- c(2e6, 1e6)
# Define the files containing sample information.
datadir <- system.file("extdata", package = "segmentSeq")
libfiles <- c("SL9.txt", "SL10.txt", "SL26.txt", "SL32.txt")
# Establish the library names and replicate structure.
libnames <- c("SL9", "SL10", "SL26", "SL32")
replicates <- c(1,1,2,2)
# Process the files to produce an `alignmentData' object.
alignData <- readGeneric(file = libfiles, dir = datadir, replicates =
replicates, libnames = libnames, chrs = c(">Chr1", ">Chr2"), chrlens =
chrlens)
# Process the alignmentData object to produce a `segData' object.
sD <- processAD(alignData, gap = 100, cl = NULL)
# Use the segData object to produce a segmentation of the genome, but
# without evaluating posterior likelihoods.
segD <- heuristicSeg(sD = sD, aD = alignData,
subRegion = data.frame(chr= ">Chr1", start = 1, end = 1e5),
getLikes = FALSE, cl = NULL)
# Use the lociData function to evaluate the posterior likelihoods directly.
lociData <- lociLikelihoods(segD, aD = alignData, bootStraps = 5,
inferNulls = TRUE, cl = NULL)
Run the code above in your browser using DataLab