getTranscriptCoverage | R Documentation |
Gets transcripts coverage.
getTranscriptCoverage(chrom, gff, reads, strandMode = "both")
getRangesCoverage(chrom = NULL, ranges, reads, strandMode = "both")
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. |
Returns a list of transcript coverage.
getRangesCoverage
: Gets the range coverage.
Rehrauer, Hubert Schmid, Peter
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.