Description Usage Arguments Details Value Author(s) Examples
View source: R/spliceSummary-method.R
Utilities used for summarizing isoforms
1 2 | isJunctionRead(cigar)
isMatchedWithModel(model, gr)
|
cigar |
A CIGAR string vector. |
model |
A GRanges object. |
gr |
A GRanges object. |
isJunctionRead
simply parsing the CIGAR string to see if there
is "N" in between and return a logical vector of the same length as
cigar parameters, indicate it's junction read or not.
isMatchedWithModel
mapping gr
to model
, and counting overlapped
cases for each row of model, If gr
contains all the read, this
will return a logical vector of the same length as gr
, and
indicate if each read is the support for this model. NOTICE: we only
assume it's a full model, so each model
here is simply one
isoform. So we only treat the gaped reads which only overlapped with two
consecutive exons in model
as one support for it.
Logical vectors.
Tengfei Yin
1 2 3 4 5 6 7 8 9 10 | library(GenomicAlignments)
bamfile <- system.file("extdata", "SRR027894subRBM17.bam",
package="biovizBase")
## get index of junction read
which(isJunctionRead(cigar(readGAlignments(bamfile))))
##
model <- GRanges("chr1", IRanges(c(10, 20, 30, 40), width = 5))
gr <- GRanges("chr1", IRanges(c(10, 10, 12, 22, 33), c(31, 40, 22, 32,
44)))
isMatchedWithModel(model, gr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.