bedToGRangesList: Function to create a GRangesList object from functional...

Description Usage Arguments Value Examples

View source: R/bedToGRangesList.R

Description

Function to create a GRangesList object from functional genomic annotation data in the form of BED files

Usage

1
2
3
4
5
6
7
bedToGRangesList(
  filepath,
  bedList = NULL,
  bedNames = NULL,
  pattern = "*.bed",
  signal = 5
)

Arguments

filepath

Character describing the path to the folder containing the BED files of functional genomic annotations. This is ignored if bedList is specified.

bedList

A list object containing the bed data as data frames to be converted into a GRangesList. The data frames must include at least chromosome, start, and end coordinates as the first 3 columns. Default is NULL.

bedNames

A character vector to provide names to the GRangesList, should be in the order of bedList. Default is NULL.

pattern

Character describing the pattern of the files for the functional genomic annotations. Default is "*.bed".

signal

Numeric referring to the column in the BED files that denotes coverage strength. Must be the same for all files. Default is 5 (fifth column), as is the case with most BED files.

Value

A GRangesList object where each entry is a GRanges object specific to each BED file in the path provided

Examples

1
2
3
4
5
6
#set path
path <- system.file("extdata", package = "preciseTAD")
#contains 2 BED files representing YY1 and NFYA
#transcription factor binding sites for GM12878
tfbsList <- bedToGRangesList(filepath = path, bedList=NULL, bedNames=NULL,
pattern = "*.bed", signal=4)

preciseTAD documentation built on Nov. 8, 2020, 6:51 p.m.