galp2gal {RIPSeeker} | R Documentation

## 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` |

### 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.

### Value

`gal` | GAlignments object containing for each paired alignments a single alignment record.

### Author(s)

Yue Li

### 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

    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

[Package RIPSeeker version 1.22.0 Index]