getTemplatePosition: Get Position in Template for Aligned Reads

Description Usage Arguments Value Examples

Description

'getTemplatePosition' returns a vector of template positions for each alignment positions. Essentially, it provides a mapping between alignment position to template position. 'getBytemplatePosition' returns a data.frame with additional information on a position basis (default argument is 'getIPD.'

Usage

1
  getTemplatePosition(cmpH5, idx, withAlignments = FALSE, asDataFrame = FALSE)

Arguments

cmpH5

An object of class PacBioCmpH5.

idx

The indices of the alignments to retrieve.

withAlignments

Should the alignment also be returned.

asDataFrame

Whether to turn the results into a data.frame.

Value

A list of numeric vectors or a list of data.frames with the template position and alignment stored together.

Examples

1
2
3
4
5
6
7
  require(pbh5)
  cmpH5 <- PacBioCmpH5(system.file("h5_files",  "aligned_reads.cmp.h5",
  package = "pbh5"))
  tpos <- getTemplatePosition(cmpH5, 1, TRUE)
  tposIPD <- getByTemplatePosition(cmpH5, idx = 1)
  head(tposIPD)
  boxplot(elt ~ ref, ylim = c(0,5), data = tposIPD)

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