peak2tss {TransView} | R Documentation

## Changes the peak center to the next TSS according to previous annotation

### Description

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

### Usage

    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

    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)

[Package TransView version 1.28.0 Index]