annPeak: annPeak

Description Usage Arguments Value

View source: R/annPeak.R

Description

Annotate peak by it's nearest transcript/gene. If peak overlaps any TSS, peak_to_feature will be 'overlap_tss'. If it overlaps multiple tss, random one will be selected. The rest of the peak region will be assigned to it's nearest gene (not nearest tss). If it overlaps a gene body, the distance will be 0.

Usage

1
annPeak(peak.gr, tx, tssup = 1000, tssdown = 1000)

Arguments

peak.gr

A peak GRanges. This can be get from Bed file of peak using bed2gr function in this package.

tx

A data frame of transcript/gene annotation, contains columns 'txid','seqnames', 'start', 'end', 'strand'.

tssup

Window size around TSS that will be defined as 'overlap_tss'. Default is 1000, means must overlap within 1 kb upstream of TSS.

tssdown

Window size around TSS that will be defined as 'overlap_tss'. Default is 1000, means must overlap within 1 kb downstream of TSS.

Value

A dataframe of annotated peaks with peak and it's nearest gene information.


xons/chipMap documentation built on May 4, 2019, 1:25 p.m.