importPeaks: Import peaks

View source: R/importPeaks.R

importPeaksR Documentation

Import peaks

Description

Import peaks in narrowPeak, broadPeak or bed format

Usage

importPeaks(
  x,
  type = c("narrow", "broad", "bed"),
  blacklist,
  seqinfo,
  pruning.mode = c("coarse", "error"),
  sort = TRUE,
  setNames = TRUE,
  glueNames = "{basename(x)}",
  centre = FALSE,
  nameRanges = TRUE,
  ...
)

Arguments

x

One or more files to be imported. All files must be of the same type, i.e. narrow or broad

type

The type of peaks to be imported

blacklist

A set of ranges to be excluded

seqinfo

A seqinfo object to be applied to the GRanges objects

pruning.mode

How to handle conflicts if supplying a seqinfo object. Defaults to pruning.mode = "coarse". Only "coarse" and "error" are implemented. See seqinfo.

sort

logical. Should the ranges be sorted during import

setNames

logical Set basename(x) as the name for each element of the GRangesList

glueNames

glue syntax for naming list elements

centre

Add the estimated peak centre. Ignored unless type = "narrow"

nameRanges

Place any values in the name column as range names within each file.

...

passed to sort

Details

Peaks are imported from narrowPeak, broadPeak or bed format as GenomicRanges objects.

If importing bed files, only the default 3-6 columns will imported.

Value

A GRangesList

Examples

fl <- system.file(
    c("extdata/ER_1.narrowPeak", "extdata/ER_2.narrowPeak"),
    package = "extraChIPs"
)
peaks <- importPeaks(fl)
peaks


steveped/chipExtra documentation built on Aug. 1, 2024, 12:33 a.m.