bam2GRanges: Import BAM file into GRanges

View source: R/bam2GRanges.R

bam2GRangesR Documentation

Import BAM file into GRanges

Description

Import aligned reads from a BAM file into a GRanges object.

Usage

bam2GRanges(
  bamfile,
  bamindex = bamfile,
  region = NULL,
  pairedEndReads = FALSE,
  remove.duplicate.reads = TRUE,
  min.mapq = 10,
  filterAltAlign = TRUE
)

Arguments

bamfile

Bamfile with aligned reads.

bamindex

Bam-index file with or without the .bai ending. If this file does not exist it will be created and a warning is issued.

region

If only a subset of the genomic regions should be loaded.

pairedEndReads

Set to TRUE if you have paired-end reads in your file.

remove.duplicate.reads

A logical indicating whether or not duplicate reads should be kept.

min.mapq

Minimum mapping quality when importing from BAM files.

filterAltAlign

Set to TRUE if you want to filter out reads with alternative mapping location.

Author(s)

David Porubsky


daewoooo/primatR documentation built on Oct. 22, 2024, 9:41 p.m.