getUnrolledTemplateSpan: Compute the Unrolled Template Span

Description Usage Arguments Details Value Examples

Description

'getUnrolledTemplateSpan' commputes the unrolled template span.

Usage

1
  getUnrolledTemplateSpan(cmpH5, idx = 1:nrow(cmpH5), unique = TRUE)

Arguments

cmpH5

An object of class PacBioCmpH5.

idx

The indices of the alignments to retrieve.

unique

Boolean statement whether the unrolled template span is unique.

Details

The getUnrolledTemplateSpan is based on the getMoleculeIndex function which returns a vector of length(idx) of type factor designating the molecule's ID. the vector is ordered as idx, therefore the default behavior of idx = 1:nrow(cmpH5) means that the vector is as the cmpH5 object – this is only distinct from other functions in that there are repeats in the vector, hence the unique = TRUE argument of getUnrolledTemplateSpan.

Value

'getUnrolledTemplateSpan' returns an array with molecule index and the unrolled span length.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  gc()
  require(pbh5)
  cmpH5 <- PacBioCmpH5(system.file("h5_files",  "aligned_reads.cmp.h5",
  package = "pbh5"))
  mi <- getMoleculeIndex(cmpH5)
  head(mi)
  uts <- getUnrolledTemplateSpan(cmpH5)
  head(uts)
  ylim = c(0, 0.0015)
  xlim = c(-1000, 5000)
  plot(density(uts), xlim = xlim, ylim = ylim, xlab = '', main = '', col
  = 'red', lwd = 2)
  par(new = TRUE)
  plot(density(getTemplateSpan(cmpH5)), xlim = xlim, ylim = ylim, xlab =
  '', main = '', lwd = 2)
  legend('topright',legend = c('unrolledTemplateSpan', 'templateSpan'),
  fill = c('red', 'black'))

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