getTranscriptCoverage: Gets transcripts coverage

View source: R/featurePlots.R

getTranscriptCoverageR Documentation

Gets transcripts coverage

Description

Gets transcripts coverage.

Usage

  getTranscriptCoverage(chrom, gff, reads, strandMode = "both")
  getRangesCoverage(chrom = NULL, ranges, reads, strandMode = "both")

Arguments

chrom

a character vector containing chromosome names.

gff

an annotation data.frame in gtf or gff format.

reads

an object of the class GAlignments.

strandMode

a character specifying the mode of the strand.

ranges

an object of the class GRanges.

Value

Returns a list of transcript coverage.

Functions

  • getRangesCoverage: Gets the range coverage.

Author(s)

Rehrauer, Hubert Schmid, Peter

Examples

  ## Not run: 
    bamFn <- "/srv/gstore/projects/p2438/STAR_18564_2017-06-12--13-46-30/26EV_BL_A.bam"
    reads = ezReadGappedAlignments(bamFn)
    gff <- ezLoadFeatures(featureFile="/srv/GT/reference/Homo_sapiens/Ensembl/GRCh38.p10/Annotation/Genes/genes.gtf")
    gffExon = gff[gff$type == "exon", ]
    gffExon = gffExon[order(gffExon$start), ]
    exonRanges = gffToRanges(gffExon)
    exonRanges <- sort(exonRanges)
    exonsByTx <- GenomicRanges::split(exonRanges, names(exonRanges))
    exonCov <- getRangesCoverage(unlist(exonsByTx, use.names=FALSE),
                                 reads, strandMode="antisense")
    transcriptCov <- getTranscriptCoverage(chrom=NULL, gff, reads,
                                           strandMode="antisense")
  
## End(Not run)

uzh/ezRun documentation built on Sept. 16, 2024, 11:21 p.m.