indelCounts: Count the number of reads containing an insertion or deletion

Description Usage Arguments Value Author(s) Examples

Description

Counts the number of reads containing a deletion or insertion (indel) of any size in a set of aligned reads. For countDeletions and countInsertions Reads may be filtered according to whether they contain more than one indel of the same or different types.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
countDeletions(alns, ...)

## S4 method for signature 'GAlignments'
countDeletions(alns, ..., multi.del = FALSE,
  del.and.ins = FALSE, del.ops = c("D"))

countInsertions(alns, ...)

## S4 method for signature 'GAlignments'
countInsertions(alns, ..., ins.and.del = FALSE,
  multi.ins = FALSE, del.ops = c("D"))

countIndels(alns)

## S4 method for signature 'GAlignments'
countIndels(alns)

indelPercent(alns)

## S4 method for signature 'GAlignments'
indelPercent(alns)

Arguments

alns

The aligned reads

...

extra arguments

multi.del

If TRUE, returns the exact number of deletions, i.e., if one read contains 2 deletions, it contributes 2 to the total count (default: FALSE)

del.and.ins

If TRUE, counts deletions regardless of whether reads also contain insertions. If FALSE, counts reads that contain deletions but not insertions (default: FALSE)

del.ops

Cigar operations counted as deletions. Default: c("D")

ins.and.del

If TRUE, counts insertions regardless of whether reads also contain deletions If FALSE, counts reads that contain insertions but not deletions (default: FALSE)

multi.ins

If TRUE, returns the exact number of insertions, i.e., if one read contains 2 insertions, it contributes 2 to the total count (default: FALSE)

Value

countDeletions: The number of reads containing a deletion (integer)

countInsertions: The number of reads containing an insertion (integer)

countIndels: The number of reads containing at least one insertion

indelPercent: The percentage of reads containing an insertion or deletion (numeric)

Author(s)

Helen Lindsay

Examples

1
2
3
4
5
6
7
bam_fname <- system.file("extdata", "gol_F1_clutch_2_embryo_4_s.bam",
                         package = "CrispRVariants")
bam <- GenomicAlignments::readGAlignments(bam_fname, use.names = TRUE)
countDeletions(bam)
countInsertions(bam)
countIndels(bam)
indelPercent(bam)

markrobinsonuzh/CrispRVariants documentation built on May 21, 2019, 12:23 p.m.