peak2tss: Changes the peak center to the next TSS according to previous...

Description Usage Arguments Details Value Author(s) Examples

View source: R/TransView_tools.R

Description

Sets the peak boundaries of an annotated GRanges object with peak locations to TSS centered ranges based on the transcript_id column.

Usage

1
peak2tss(peaks, gtf, peak_len=500)

Arguments

peaks

An annotated GRanges object with a meta data column ‘transcript_id’ and ‘exon_id’ like e.g. from gtf2gr.

gtf

A GRanges object with a meta data column ‘transcript_id’ like e.g. from annotatePeaks.

peak_len

The desired total size of the region with the TSS located in the middle.

Details

Convenience function to change the peak centers to TSS for e.g. plotting with plotTV.

Value

A GRanges object

Author(s)

Julius Muller ju-mu@alumni.ethz.ch

Examples

1
2
3
4
5
6
7
8
9
exgtf<-dir(system.file("extdata", package="TransView"),full=TRUE,patt="gtf.gz$")[2]
fn.macs<-dir(system.file("extdata", package="TransView"),full=TRUE,patt="xls$")

GTF<-gtf2gr(exgtf)
peaks<-macs2gr(fn.macs,psize=500)

peaks.anno<-annotatePeaks(peaks=peaks,gtf=GTF)

peak2tss(peaks.anno, GTF, peak_len=500)

TransView documentation built on Nov. 8, 2020, 5:31 p.m.