presegment: Pre-segmentation of the time-series

presegmentR Documentation

Pre-segmentation of the time-series

Description

pre-segmentation of the time-series into chunks that can be handled by segmenTier.

Usage

presegment(
  ts,
  avg = 1000,
  minrd = 8,
  favg = 100,
  border = c("expand", "trim"),
  minds = 250,
  rmlen = 250,
  minsg = 5000,
  chrS,
  map2chrom = FALSE,
  seg.path,
  plot.borders = FALSE,
  fig.path,
  fig.type = "png",
  verb = 1
)

Arguments

ts

the time-series of readcounts for the complete chromosome, rows are chromosomal positions and columns are time-points; reverse strand rows at the bottom of the matrix. Option chrS can be used to handle chromosome ends and to optionally (map2chrom) map the resulting primary segment coordinates to chromosome coordinates.

avg

the broad moving average of read-count presence (number of time-points with >0 reads) for a first broad segmentation

minrd

the minimal number of time-points with reads in the broad moving average used as cutoff between segments

favg

as avg, but a narrower moving average used in end scanning that can result in fusing back segments w/o good separation

border

string indicating whether to "expand" or "trim" borders, using the finer moving average in favg

minds

minimum distance between two segments (will be fused if distance is smaller)

rmlen

minimum segment length for removal (shorter segments will be dropped)

minsg

minimum segment length for fusion with (shorter) neighbor

chrS

a chromosome index, indicating at wich positions chromosomes start; this is required for handling chromosome ends and forward and reverse strand values, but can be omitted.

map2chrom

if true, argument chrS is required to map the segment coordinates to chromosomal coordinates

seg.path

a directory path where individual segments' data will be written to as tab-delimited .csv files; no files will be written if seg.path is not provided.

plot.borders

logical indicating whether plots of the scanned borders should be generate (in directory at fig.path)

fig.path

a directory path for plots of the segment end scanning; no figures will be plotted if fig.path is not provided.

fig.type

image type, "png" or "pdf"

verb

integer level of verbosity, 0: no messages, 1: show messages


raim/segmenTools documentation built on March 20, 2024, 6:23 a.m.