bam.read: bam.read

View source: R/skidb.R

bam.readR Documentation

bam.read

Description

Loads entire bam or slice into data.table or dumps to csv via samtools call (instead of Rsamtools like read.bam)

Usage

bam.read(
  bam,
  out.file = NULL,
  region = NULL,
  fields = c("seq"),
  tags = c("MD", "BX"),
  nlines = NULL,
  estimate.lines = TRUE,
  skip = NULL,
  chunksize = 1e+05,
  mc.cores = 1,
  min.mapq = 0,
  samtools.flag = "",
  verbose = TRUE
)

Arguments

bam

bam file

out.file

file to dump csv to, if null returns data.table

tags

which tags to extract from bam file

nlines

number of lines in bam file if known, otherwise will be estimated

estimate.lines

flag whether to count lines or just estimate using bam.size if nlines is not provided (default = TRUE)

skip

how many lines to skip

mc.cores

how many threads to use for parsing

min.mapq

integer min mapping quality

samtools.flag

additoinal samtools flag to use

verbose

flag

Author(s)

Marcin Imielinski


mskilab/skidb documentation built on Feb. 6, 2023, 2:49 a.m.