extract_regions: Extract regions from a scan

Description Usage Arguments Value Examples

View source: R/extract_regions.R

Description

Extract regions from a scan data frame.

Usage

1
extract_regions(scan, regions, right = TRUE)

Arguments

scan

A data frame with chromosomal positions like obtained by scan_hh, ihh2ihs, ines2rsb or ies2xpehh.

regions

A data frame with genomic regions like the output of calc_candidate_regions.

right

logical, indicating if the intervals should be closed on the right (and open on the left) or vice versa.

Value

A subset of data frame scan, retaining only positions belonging to the regions specified in data frame regions.

Examples

1
2
3
4
library(rehh.data)
data(wgscan.cgu)
regions <- data.frame(CHR = 12, START = 2.88e+7, END = 2.92e+7)
extract_regions(wgscan.cgu, regions)

rehh documentation built on Sept. 15, 2021, 5:06 p.m.