combineAlignGals: Combine alignment files into a single GAlignments object

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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")

gorillayue/RIPSeeker documentation built on May 17, 2019, 7:59 a.m.