read_regions: Read regions from a data.frame, a file or a connection.

Description Usage Arguments Value Author(s) Examples

View source: R/ngscopy.R

Description

Read regions from a data.frame, a file or a connection.

Usage

1

Arguments

x

data.frame or character, the regions in study. A data.frame with three columns (chr/start/end), a file path or a connection with three columns (chr/start/end) without column names. Return an empty data.frame if "", "NULL" or NULL.

Value

data.frame of three columns (chr/start/end)

Author(s)

Xiaobei Zhao

Examples

1
2
3
4
5
6
7
8
read_regions("
chr1 0 249250621
chr2 0 243199373
chr3 0 198022430
chr4 0 191154276
chr5 0 180915260
chr6 0 171115067
")

Example output

   chr start       end
1 chr1     0 249250621
2 chr2     0 243199373
3 chr3     0 198022430
4 chr4     0 191154276
5 chr5     0 180915260
6 chr6     0 171115067

NGScopy documentation built on May 6, 2019, 2:43 a.m.