disambiguateMultihits
). The final output is a GAlignments object.getAlignGal(alignFilePath, format, genomeBuild,
deleteGeneratedBAM = FALSE, reverseComplement = FALSE,
returnDuplicate = FALSE, flagMultiHits = TRUE,
returnOnlyUniqueHits = FALSE, paired = FALSE, ...)
genomeBuild
are "mm9" for mouse or "hg19" for human reference genomes. Note that an appropriate genome build that has been used in the alignment is important for desirable outcome. For instance, user should use "mm10" if the alignments are based on "mm10" rather than "mm9" genome build.reverseComplement
only applies to strand-specific sequencing in which case only the strand generated during second strand synthesis is sequenced. Thus, if reverseComplement=TRUE
, the strand signs of the alignments are switched (i.e. + to -, - to +, and * unchanged); otherwise (reverseComplement=FALSE
) retian the original the strand signs.scanBamFlag
.flagMultiHits=TRUE
by default) and in the later step assigned to a unique region by (disambiguateMultihits
).galp2gal
).values
slot saved for the "uniqueHits" binary flag (See flagMultiHits
above) and metadata
saved as a list containing argument setting for reverseComplement, returnDuplicate, flagMultiHits, returnOnlyUniqueHits
readGAlignments
for single-end or readGAlignmentPairs
for paired-end alignments. The SAM file is converted to BAM first and then imported as above. The BED file is first imported by import
as GRanges object and subsequently converted to GAlignments
via the constructor function GAlignments
.combineAlignGals, readGAlignments, readGAlignmentPairs, import
# 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)
alignGal <- getAlignGal(bamFiles[1], reverseComplement=TRUE, genomeBuild="mm9")
Run the code above in your browser using DataLab