combineAlignGals {RIPSeeker} | R Documentation

## Combine alignment files into a single GAlignments object

### Description

Import and process individual BAM/SAM/BED alignment files using `getAlignGal` and combine them into a single GAlignments.

### Usage

    combineAlignGals(bamFiles, ...)

### Arguments

`bamFiles` | A list of paths to the alignment files.
`...` | Arguments passed to `getAlignGal`.

### Details

If there is only one BAM file, then simply return the output from `getAlignGal`; otherwise, all processed alignments are pooled to form a single GAlignments object.

### Value

`combinedGal` | GAlignments object containning the (combined) processed alignments with the `values` slot saved for the "uniqueHits" binary flag defined in `getAlignGal` and `metadata` saved as a list containing argument setting for `reverseComplement, returnDuplicate, flagMultiHits, returnOnlyUniqueHits` defined in `getAlignGal`

.

### Note

User are recommanded to pool technical replicates but keep biological replicate separate for confirmation.

### Author(s)

Yue Li

### See Also

`getAlignGal, readGAlignments, readGAlignmentPairs, import`

### Examples

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

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

    bamFiles <- grep("PRC2", bamFiles, value=TRUE)

    # combine the alignments for technical replicates
    alignGal <-
    combineAlignGals(bamFiles=grep(pattern="SRR039214",
                      bamFiles, value=TRUE, invert=TRUE),
                      reverseComplement=TRUE, genomeBuild="mm9")

[Package RIPSeeker version 1.22.0 Index]