getAlignmentsWithFeatures: Get Alignments with Features

Description Usage Arguments Value Examples

Description

Retrieve alignments with attendant pulse features.

Usage

1
2
  getAlignmentsWithFeatures(cmpH5, idx = 1:nrow(cmpH5),
                            fxs = getIPD, collapse = FALSE)

Arguments

cmpH5

An object of class PacBioCmpH5.

fxs

A list with functions of the form f(cmpH5, idx) returning a list of length length(idx). Or just a single function.

idx

The indices of the alignments to return.

collapse

Whether a list of data.frames should be returned or a single data.frame with a column naming the alignment.

Value

Either a list of data.frames or a data.frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  require(pbh5)
  cmpH5 <- PacBioCmpH5(system.file("h5_files",  "aligned_reads.cmp.h5",
  package = "pbh5"))
  alnsPlusFeatures <- getAlignmentsWithFeatures(cmpH5,
        fxs = c("IPD" = getIPD,"PulseWidth"=getPulseWidth), idx = 1, collapse = TRUE)
  head(alnsPlusFeatures)
  boxplot(IPD ~ reference, data = alnsPlusFeatures, log = 'y',
           ylim = c(.05, 10), main = "Distribution of IPDs Conditioned on Base")
  plot(density(log(alnsPlusFeatures$PulseWidth), na.rm = TRUE), main =
 "Distribution of Global Pulsewidth")

PacificBiosciences/R-pbh5 documentation built on May 7, 2019, 11:54 p.m.