bed_coverage: Estimate coverage for BED file

View source: R/util.R

bed_coverageR Documentation

Estimate coverage for BED file

Description

This function estimates mean/per_base_coverage coverage for regions in bed file. This function is intended for estimating off target mean coverage in panel data, however it can be used as a standalone. It is highly recommended to use the sorted option and sort the BED and BAM files beforehand as it highly decreases RAM consumption and increases computation speed. The easiest way of doing this is using sort -k1,1 -k2,2n on the bed file. However, this may not work if the BED has been build based on different reference than the BAM. For example, hs37 vs hg19. For more information: https://bedtools.readthedocs.io/en/latest/content/tools/coverage.html

Usage

bed_coverage(
  bin_bedtools = build_default_tool_binary_list()$bin_bedtools,
  bam = "",
  bed = "",
  verbose = FALSE,
  batch_config = build_default_preprocess_config(),
  sorted = TRUE,
  mean = TRUE,
  fai = "",
  suffix = "",
  output_dir = ".",
  hist = FALSE
)

Arguments

bin_bedtools

Path to bwa executable. Default tools/bedtools2/bin/bedtools.

bam

Path to the input BAM file.

bed

Path to the input bed file.

verbose

Enables progress messages. Default False.

sorted

Are the input files sorted. Default TRUE

mean

Estimate mean coverage per region. Default TRUE. FALSE produces coverage per base per target.

fai

Indexed genome to which sequece has been aligned. Default none. Only require if there is an issue with chromosome naming.

output_dir

Output directory path. Default none.

hist

Enables progress messages. Default False.


TearsWillFall/ULPwgs documentation built on April 18, 2024, 3:45 p.m.