cigarsToEvents: Transform extended CIGAR strings into GRanges.

View source: R/helpers_general.R

cigarsToEventsR Documentation

Transform extended CIGAR strings into GRanges.

Description

Transform extended CIGAR strings into GRanges representation with events of deletions, insertions and mismatches.

Usage

cigarsToEvents(
  cigars,
  aln_pos_start,
  query_seq,
  ref,
  read_id,
  mapq,
  seqnames,
  strands,
  counts
)

Arguments

cigars

(character) Extended CIGARS.

aln_pos_start

(integer) Pos of CIGARS.

query_seq

(character) Aligned query sequences.

ref

(character) Reference sequences used for alignment.

read_id

(numeric) Read id for assignment for each of the CIGARS.

mapq

(numeric) Maping scores.

seqnames

(character) Names of the sequences, potentially ids of the reference sequences.

strands

(character) Strands to assign.

counts

(integer) Vector of cigar counts, if data collapsed.

Value

(GRanges) Same as events.


valenlab/amplican documentation built on Jan. 28, 2024, 5:10 a.m.