getImproperAlignmentPairs: Extract all improperly paired reads from a bam file as a...

View source: R/alignment-utils.R

getImproperAlignmentPairsR Documentation

Extract all improperly paired reads from a bam file as a GAlignmentPairs object

Description

This function is a wrapper for readGAlignments. At the time this function was created, one could not create a GAlignmentPairs object of improperly paired reads using existing infrastructure in the GenomicAlignments package. This function may be deprecated in the future.

Usage

getImproperAlignmentPairs(bam.file, param = improperAlignmentParams(), build)

Arguments

bam.file

complete path to BAM file

param

a ScanBamParam object.

build

the reference genome buld that reads were aligned to. Currently supported builds include "hg19" and "hg18".

Value

a GAlignmentPairs object

See Also

See makeGAlignmentPairs for details regarding use.mcols argument. See improperAlignmentParams for creating a ScanBamParam object with the appropriate flags for extracting improper read pairs.

Examples

  library(svbams)
  path <- system.file("extdata", package="svbams")
  bam.file <- file.path(path, "cgov10t.bam")
  irp <- getImproperAlignmentPairs(bam.file, build="hg19")


cancer-genomics/trellis documentation built on Feb. 2, 2023, 7:04 p.m.