isMatchedWithModel {biovizBase} | R Documentation

## Utils for Splicing Summary

### Description

Utilities used for summarizing isoforms

### Usage

    isJunctionRead(cigar)
    isMatchedWithModel(model, gr)

### Arguments

`cigar` | A CIGAR string vector.
`model` | A GRanges object.
`gr` | A GRanges object.

### Details

`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.

### Value

Logical vectors.

### Author(s)

Tengfei Yin

### Examples

    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)

[Package biovizBase version 1.28.2 Index]