readHomer: A function to read a HOMER-formatted peak file into a GRanges...

Description Usage Arguments Value See Also Examples

Description

A function to read a HOMER formatted peak/position file into a GRanges object. HOMER is a popular DNA motif analysis and general NGS program suite. Peak/position files have a commented header and are formatted as: PeakID, chr, start, end, strand ...

Usage

1
2
readHomer(file, header.regex = "^#PeakID", meta.cols = NULL,
  keep.all.metadata = FALSE, remove.unusual = FALSE)

Arguments

file

an absolute or relative path to a HOMER-formatted peak file

header.regex

an optional regular expression to identify the header line (Default:"^#PeakID").

meta.cols

named list that maps column numbers to meta data columns. e.g. list(name=5, score=10), which means 5th column will be named "name", and 10th column will be named "score" and their contents will be a part of the returned GRanges object.

keep.all.metadata

logical determining if the extra columns ( the ones that are not designated by chr,start,end,strand and meta.cols arguments ) should be kept or not. (Default:FALSE)

remove.unusual

if TRUE(default) remove the chromosomes with unsual names, such as chrX_random. (Default:FALSE)

Value

Granges object.

See Also

readGeneric

Examples

1
2
# peaks <- readHomer("peaks.txt", keep.all.metadata=TRUE)
# head(peaks)

Resara/ross documentation built on May 9, 2019, 9:46 a.m.