mergeGenes: Merge overlapping "genes" into gene clusters

Description Usage Arguments Value Examples

View source: R/helper.R

Description

This function looks for overlapping exons in ebg. The overlapping "genes" are used to form a graph. Any connected components in the graph (sets of "genes" which can be reached from each other through overlap relations) are connected into a new gene cluster, which is given the suffix "_mrg" and using one of the original gene names.

Usage

1
mergeGenes(ebg, txdf, ignore.strand = TRUE)

Arguments

ebg

an exons-by-genes GRangesList, created with exonsBy

txdf

a data.frame created by running select on a TxDb object. Must have a column GENEID.

ignore.strand

Default is TRUE.

Value

a manipulated txdf.

Examples

1
2
3
4
5
6
7
8
library(GenomicRanges)
txdf <- data.frame(GENEID=c("101","102","103","104"))
ebg <- GRangesList(GRanges("1",IRanges(c(100,200),width=50)),
                   GRanges("1",IRanges(c(200,300),width=50)),
                   GRanges("1",IRanges(c(300,400),width=50)),
                   GRanges("1",IRanges(c(500,600),width=50)))
names(ebg) <- c("101","102","103","104")
mergeGenes(ebg, txdf)

alpine documentation built on Nov. 8, 2020, 7:25 p.m.