tabixChrApply: tabixChrApply

View source: R/tabixChrChunkApply.R

tabixChrApplyR Documentation

tabixChrApply

Description

Runs a function on reads/fragments from each chromosomes of a Tabix-indexed fragment file. This is especially used by other functions to avoid loading all alignments into memory, or to parallelize reads processing.

Usage

tabixChrApply(
  x,
  fn,
  keepSeqLvls = NULL,
  exclude = NULL,
  only = NULL,
  BPPARAM = SerialParam(),
  ...
)

Arguments

x

The path to a tabix-indexed bam file, or a TabixFile object.

fn

The function to be run, the first argument of which should be a 'GRanges'

keepSeqLvls

An optional vector of seqLevels to keep

only
BPPARAM

A 'BiocParallel' parameter object for multithreading. Note that if used, memory usage will be high; in this context we recommend a high 'nChunks'.

...

Passed to 'fn'

Value

A list of whatever 'fn' returns


ETHZ-INS/epiwraps documentation built on Oct. 27, 2024, 8:02 p.m.