importBed: Importing a Bed File.

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

View source: R/importBed.R

Description

This function imports a standard bed file

Usage

1
importBed(file, header = FALSE, sep = "\t")

Arguments

file

Specifies the filename/path

header

Logical, is a header present

sep

Column separator

Details

This function imports a standard bed-file into a data.frame. It is basically a convenience wrapper around read.table. However, if no header lines is given, this function automatically assigns the column names, as they are given in the bed-specification on the Ensembl page here: https://www.ensembl.org/info/website/upload/bed.html

Value

A data.frame

Author(s)

Daniel Fischer

See Also

[exportBed], [read.table]

Examples

1
2
3
4
5
6
   
 # Define here the location on HDD for the example file
   fpath <- system.file("extdata","example.bed", package="GenomicTools.fileHandler")
 # Import the example bed file  
   bedFile <- importBed(file=fpath)
 

GenomicTools.fileHandler documentation built on March 26, 2020, 7:23 p.m.