Learn R Programming

TEQC (version 3.12.0)

get.targets: Read capture target positions

Description

Reads a bedfile containing positions of the capture targets and creates a RangedData object.

Usage

get.targets(targetsfile, chrcol = 1, startcol = 2, endcol = 3, zerobased = TRUE, sep = "\t", skip = 1, header = FALSE, ...)

Arguments

targetsfile
name of bedfile giving the positions of each target region
chrcol
in which column in the targets bedfile there is the chromosome information (chromosome information in the file should be in string format, e.g. "chrX")
startcol
in which column there are the starting positions of the targeted regions
endcol
in which column there are the end positions of the targeted regions
zerobased
if TRUE, start coordinates in targetsfile are assumed to be 0-based and are then converted to 1-based system by adding 1. If FALSE, coordinates are not shifted. In this case they should already be 1-based in targetsfile.
sep
column separator character, defaults to tabs
skip
number of lines of the bedfile to skip before beginning to read data; defaults to 1
header
a logical value indicating whether the file contains the names of the variables as its first line; defaults to FALSE
...
further arguments passed to read.delim

Value

RangedData table holding the target region positions. Note that overlapping or adjacent regions are collapsed to one region.

See Also

get.reads

Examples

Run this code
exptPath <- system.file("extdata", package="TEQC")
targetsfile <- file.path(exptPath, "ExampleSet_Targets.bed")
targets <- get.targets(targetsfile, skip=0)

Run the code above in your browser using DataLab