mergeTranscripts {karyoploteR} | R Documentation

## mergeTranscripts

### Description

Merges the transcripts of each gene and creates one transcript per gene with all exons and UTR regions combined

### Usage

    mergeTranscripts(genes.data)

### Arguments

`genes.data` | (GenesData object) A valid genes.dat object like the ones obtained by `makeGenesDataFromTxDb`

### Details

This function takes a valid data object and merges all transcripts from each gene into a single transcript. This is useful to reduce the plot complexity while keeping partial information on transcript structure.#' In this transcript, any region that is a coding exon in any transcript, will be an exon, any region that is a non-coding exon in any transcript and is not an exon in any transcript, will be a non-coding exon. Anything between coding and non-coding exons will be introns.

### Value

The original GenesData object with a single transcript per gene `GenesData$genes$names`.

### See Also

`kpPlotGenes`, `makeGenesDataFromTxDb`

### Examples

    library(TxDb.Hsapiens.UCSC.hg19.knownGene)

    zoom <- toGRanges("chr17:29.4e6-29.8e6")
    kp <- plotKaryotype(genome="hg19", zoom=zoom)
    genes.data <- makeGenesDataFromTxDb(TxDb.Hsapiens.UCSC.hg19.knownGene, karyoplot=kp)
    genes.data <- addGeneNames(genes.data)
    kpPlotGenes(kp, data=genes.data, r1=0.5, plot.transcripts=TRUE, gene.name.position = "left")
    genes.data.merged <- mergeTranscripts(genes.data)
    kpPlotGenes(kp, data=genes.data.merged, r0=0.6, r1=0.8, plot.transcripts=TRUE, gene.name.position = "left")

[Package karyoploteR version 1.12.4 Index]