getAssociationWithTSS {genomation} | R Documentation

## Get distance to nearest TSS and gene id from AnnotationByGeneParts

### Description

This accessor function gets the nearest TSS, its distance to target feature, strand and name of TSS/gene from AnnotationByGeneParts object

### Usage

    getAssociationWithTSS(x)

    ## S4 method for signature 'AnnotationByGeneParts'
    getAssociationWithTSS(x)

### Arguments

`x` | a `AnnotationByGeneParts` object

### Value

RETURNS a data.frame containing row number of the target features, distance of target to nearest TSS, TSS/Gene name, TSS strand

### Examples

    data(cage)
    bed.file = system.file("extdata/chr21.refseq.hg19.bed", package = "genomation")
    gene.parts = readTranscriptFeatures(bed.file)
    cage.annot = annotateWithGeneParts(cage, gene.parts, intersect.chr=TRUE)
    head(getAssociationWithTSS(cage.annot))

[Package genomation version 1.12.0 Index]