splice.cigar: Get coverage as GRanges from BAM on custom set of GRanges

splice.cigarR Documentation

Get coverage as GRanges from BAM on custom set of GRanges

Description

Takes GRanges or GappedAlignments object "reads" and parses cigar fields to return GRanges or GRangesList corresponding to spliced alignments on the genome, which correspond to portions of the cigar

i.e. each outputted GRanges/GRangesList element contains the granges corresponding to all non-N portions of cigar string

If GRangesList provided as input (e.g. paired reads) then all of the spliced ranges resulting from each input GRangesList element will be put into the corresponding output GRangesList element

NOTE: does not update MD tag

If use.D = TRUE, then will treat "D" flags (deletion) in addition to "N" flags as indicative of deletion event.

Usage

splice.cigar(
  reads,
  verbose = TRUE,
  fast = TRUE,
  use.D = TRUE,
  rem.soft = TRUE,
  get.seq = FALSE,
  return.grl = TRUE
)

Arguments

reads

GenomicRanges or GappedAlignments or data.frame input reads

verbose

boolean verbose flag (default = TRUE)

fast

boolean Flag to use 'GenomicAlignments::cigarRangesAlongReferenceSpace()' to translate CIGAR to GRanges (default = TRUE)

use.D

boolean Treats "D" tags as deletions, along with "N" tags (default = TRUE)

rem.soft

boolean Pick up splice 'S', soft-clipped (default = TRUE)

get.seq

boolean Get InDels (default = TRUE)

return.grl

boolean Return as GRangesList (default = TRUE)


mskilab/bamUtils documentation built on Sept. 28, 2022, 3:45 p.m.