# 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, gap = 100)
# Find which tags overlap with an arbitrary set of coordinates.
getOverlaps(coordinates = GRanges(seqnames = c(">Chr1"),
IRanges(start = c(1,100,2000), end = c(40,3000,5000))),
segments = alignData@alignments, overlapType = "overlapping",
whichOverlaps = TRUE, cl = NULL)
Run the code above in your browser using DataLab