read_bamfile: Read a bam file Read a bam file from give path. Alignment and...

View source: R/read_bamfile.R

read_bamfileR Documentation

Read a bam file Read a bam file from give path. Alignment and sequencing read information will be binned into non-overlapping size

Description

Read a bam file Read a bam file from give path. Alignment and sequencing read information will be binned into non-overlapping size

Usage

read_bamfile(
  bamfile_path,
  binsize = 1000,
  blacklist_files = NULL,
  genome = "hg19",
  target_bedfile = NULL,
  min_mapq = 20,
  apply_blacklist = TRUE
)

Arguments

bamfile_path

Character; Path to sample bamfile

binsize

Int; Size of non-overlapping windows in KB. Only 100,500 and 1000 is available; Default 1000

blacklist_files

Character; Filepath to file containing blacklist regions

genome

Character; abbreviation of reference genome; available genome: hg19,hg38, mm10. default:hg19

target_bedfile

Character; Path to exon/target bedfile; Default NULL

min_mapq

Int; minimum read mapping quality; Default 20

apply_blacklist

Logical; To exclude read on the blacklist regions Default TRUE

Value

SampleBam Object; A list object containing read information from the BAM file.

Examples

fl <- system.file("extdata","ex.plasma.bam",package = "cfdnakit")
### read bam file with default params (hg19, 1000K binsize)
sample.bam <-read_bamfile(fl, apply_blacklist=FALSE)

Pitithat-pu/cfdnakit documentation built on April 5, 2024, 8:50 p.m.