combine_exons: Combine overlapping exons

Description Usage Arguments Value Examples

View source: R/combine_exons.R

Description

Combine overlapping exons into a single observation

Usage

1
combine_exons(exon_data)

Arguments

exon_data

data.frame. This data frame must include named variables: chrom, a chromosome identifer; exonStart, the first position of the exon in base pairs; and exonEnd, the last position of the exon in base pairs.

Value

A data frame of combined exon segments. This data frame includes the variables: chrom, a chromosome identifier; exonStart, the first position of the combined exon segment in base pairs; and exonEnd, the last position of the combined exon segment in base pairs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# create a data frame that contains the
# the variables: chrom, exonStart, and exonEnd
exDat <- data.frame(chrom     = c(1, 1, 1, 2, 2, 2),
                    exonStart = c(1, 2, 5, 1, 3, 3),
                    exonEnd   = c(3, 4, 7, 4, 5, 6))

exDat

# supply exDat to combine_exons to combine
# overlapping exon segments
combine_exons(exDat)

simrvprojects/SimRVSequences documentation built on Jan. 2, 2020, 4:26 p.m.