get.targets: Read capture target positions

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/get.targets.R

Description

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

Usage

1
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

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

Note

Since overlapping regions are collapsed, the input bedfile can also contain positions of the (in most cases overlapping) hybridization probes used for the target capture.

Author(s)

Manuela Hummel m.hummel@dkfz.de

See Also

get.reads

Examples

1
2
3
exptPath <- system.file("extdata", package="TEQC")
targetsfile <- file.path(exptPath, "ExampleSet_Targets.bed")
targets <- get.targets(targetsfile, skip=0)

Example output

Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: IRanges
Loading required package: S4Vectors
Loading required package: stats4

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: Rsamtools
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: Biostrings
Loading required package: XVector

Attaching package:BiostringsThe following object is masked frompackage:base:

    strsplit

Loading required package: hwriter
[1] "read 50 (non-overlapping) target regions"

TEQC documentation built on Nov. 8, 2020, 8:07 p.m.