makeTx2Tss: Make a GRanges linking transcripts to TSS within gene

View source: R/helper-allelic.R

makeTx2TssR Documentation

Make a GRanges linking transcripts to TSS within gene

Description

This helper function takes either a TxDb/EnsDb or GRanges object as input and outputs a GRanges object where transcripts are aggregated to the gene + TSS (transcription start site). For nearby TSS that should be grouped together, see maxgap.

Usage

makeTx2Tss(x, maxgap = 0)

Arguments

x

either TxDb/EnsDb or GRanges object. The GRanges object should have metadata columns tx_id and gene_id

maxgap

integer, number of basepairs to use determining whether to combine nearby TSS

Value

GRanges with columns tx_id, tss, and group_id

Examples

## Not run: 
library(EnsDb.Hsapiens.v86)
edb <- EnsDb.Hsapiens.v86
t2t <- makeTx2Tss(edb)

## End(Not run)


mikelove/fishpond documentation built on Aug. 29, 2023, 2:45 p.m.