Learn R Programming

RIPSeeker (version 1.12.0)

combineAlignGals: 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.

Value

  • combinedGalGAlignments 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
  • .

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.

See Also

getAlignGal, readGAlignments, readGAlignmentPairs, import

Examples

Run this code
# 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")

Run the code above in your browser using DataLab