extract_regions {rehh}R Documentation

Extract regions from a scan

Description

Extract regions from a scan data frame.

Usage

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

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

[Package rehh version 3.2.2 Index]