mismatch-plot: Mismatch plot from BAM files

Description Usage Arguments Value See Also Examples

Description

Create a mismatch plot from a list of BAM files directly.

Usage

1
  tallyPlot(file, region, ref, nCycles = 0, minQual = 0, minFreq = 0, ...)

Arguments

file

BAM file paths

region

GRanges with the position (width: 1) to tally, with one entry.

ref

Reference object, as 'BSgenome'.

nCycles

Number of sequencing cycles to remove from the beginning and end of each read when creating the base count table. This avoids low quality read positions [default: 0]. See 'tallyBamRegion'

minQual

Minimum base call quality for reads to be considered for the nucleotide count table [default: 0]. Reads with a lower quality are dropped. See 'tallyBamRegion'

minFreq

Currently not used

...

Additional arguments, passed to 'tallyBAM'.

Value

A 'ggplot2' or 'ggbio' object.

See Also

h5vc::mismatchPlot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  library(ggbio)
  library(GenomicRanges)
  library(BSgenome.Hsapiens.UCSC.hg19)

  region = GRanges("chr17", IRanges(7572100, width = 1))

  control_bam = system.file("extdata", "platinum", "control.bam", package =
  "Rariant", mustWork = TRUE)
  mix_bam = system.file("extdata", "platinum", "mix.bam", package = "Rariant",
  mustWork = TRUE)

  bam_files = c(control_bam, mix_bam)

  region = GRanges("chr17", IRanges(7572050, width = 100))

  control_bam = system.file("extdata", "platinum", "control.bam", package =
    "Rariant", mustWork = TRUE)
  test1_bam = system.file("extdata", "platinum", "test.bam", package =
    "Rariant", mustWork = TRUE)
  test2_bam = system.file("extdata", "platinum", "test2.bam", package =
    "Rariant", mustWork = TRUE)
  mix_bam = system.file("extdata", "platinum", "mix.bam", package =
    "Rariant", mustWork = TRUE)

  bam_files = c(control_bam, test1_bam, test2_bam, mix_bam)

  library(BSgenome.Hsapiens.UCSC.hg19)
  ref = BSgenome.Hsapiens.UCSC.hg19

  p = tracks(lapply(bam_files, tallyPlot, region, ref, minQual = 25))

  print(p)

julian-gehring/Rariant documentation built on May 20, 2019, 4:20 a.m.