ga2gr: Convert GAlignmentPairs to GRanges while maintaining read...

View source: R/alignment-utils.R

ga2grR Documentation

Convert GAlignmentPairs to GRanges while maintaining read pair information

Description

Melts GAlignmentPairs objects to GRanges objects.

Usage

ga2gr(ga, is.improper = FALSE, use.mcols = FALSE)

Arguments

ga

a GAlignments object

is.improper

a length-one logical vector. TRUE if the reads are improperly paired, FALSE otherwise.

use.mcols

logical for whether to keep the metadata columns of the GAlignment objects

Value

A GRanges object with metadata columns containing read pair information.

Examples

library(svbams)
path <- system.file("extdata", package="svbams")
bam.file <- file.path(path, "cgov10t.bam")
irp <- getImproperAlignmentPairs(bam.file, build="hg19")
igr <- ga2gr(irp, is.improper=TRUE)
prp <- getProperAlignmentPairs(bam.file, build="hg19")
pgr <- ga2gr(prp, is.improper=FALSE)


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