Learn R Programming

RIPSeeker (version 1.12.0)

galp2gal: Convert GAlignmentPairs to GAlignments

Description

Convert GAlignmentPairs to GAlignments using CIGAR to mark flanked portion of the pairs as 'N'.

Usage

galp2gal(galp)

Arguments

galp

Value

  • galGAlignments object containing for each paired alignments a single alignment record.

Details

Each proper read pairs is combined into a single alignment record making use of the CIGAR flag `N' to indicate the number of bases between the mate pairs (i.e., the difference between the start of the right mate pair and the end of the left mate pair). In other words, the paired-end alignments are treated as gapped alignments of long fragments. The function is used within getAlignGal but can be used as a stand-alone function as well.

References

P. Aboyoun, H. Pages and M. Lawrence. GenomicRanges: Representation and manipulation of genomic intervals. R package version 1.8.9.

See Also

getAlignGal, combineAlignGals, readGAlignments, readGAlignmentPairs, import

Examples

Run this code
library(Rsamtools)

extdata.dir <- system.file("extdata", package="RIPSeeker")

ex1_file <- list.files(extdata.dir, "ex1.bam", recursive=TRUE, full.names=TRUE)

galp <- readGAlignmentPairs(ex1_file, use.names=TRUE)

galp

gal <- galp2gal(galp)

gal

Run the code above in your browser using DataLab