subSampleBam: Subsample a bam file according to coverage

Description Usage Arguments Value

View source: R/samtools.R

Description

Subsample a bam file according to coverage

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
subSampleBam(
  bamfile,
  windowSize = NULL,
  sampleSize = 100,
  fragmentReads = FALSE,
  fragmentWidth = 1000,
  what = NULL,
  clusteredReads = NULL,
  paired = FALSE
)

Arguments

bamfile

The bamfile that will be subsampled

windowSize

The window size for subsampling. The number of reads precised by sampleSize argument will be sampled in this window.

sampleSize

The desired new coverage of the bamfile.

what

What to extract from the bam file to write to the new one. If NULL defaults to the complete output of scanBamWhat.

Value

A list containing the filename of the original bamfile, the name of the new bamfile, the reference length and the sampleSize


DKMS-LSL/dr2s documentation built on March 14, 2021, 2:46 p.m.