load_genbed: Load a data file in GENBED format

Description Usage Arguments

View source: R/main.R

Description

This function loads a genbed file, which is simply a BED-like tsv file, with a header line (optional) containing column names, and the types of the first three columns are guaranteed to be "cii"

Usage

1
2
3
4
5
6
7
8
9
load_genbed(
  file_path,
  region = NULL,
  col_names = NULL,
  na = c("", "NA"),
  col_types = NULL,
  is_bedgraph = FALSE,
  ...
)

Arguments

file_path

Path or URL to the data file. Can be a local path, file://, http://, https://, ftp:// and sftp://

col_names

can be NULL (infer from file), or a character vector (user-provided column names). In the infer-from-file scenario, if there is a column header, we will have the column names. However, if the column header is missing, then we will have the following column names: chrom, start, end, X4, X5, ...

na

Character vector of strings to interpret as missing values.

col_types

A character string represents column names. Refer to col_type in readr. If NULL, then the types for the first three columns are character, integer, integer, and the rest are guessed from the data.

is_bedgraph

A logic value indicating whether the input is BED or BEDGRAPH. The difference between these two is that, the 4th column is character for BED, and numeric for BEDGRAPH


haizi-zh/bioessentials documentation built on April 10, 2021, 2:34 p.m.