shiftGAlignments: shift 5' ends for single end reads

Description Usage Arguments Value Author(s) Examples

View source: R/shiftGAlignments.R

Description

shift the GAlignmentsLists by 5' ends. All reads aligning to the positive strand will be offset by +4bp, and all reads aligning to the negative strand will be offset -5bp by default.

Usage

1
shiftGAlignments(gal, positive = 4L, negative = 5L, outbam)

Arguments

gal

An object of GAlignments.

positive

integer(1). the size to be shift for positive strand

negative

integer(1). the size to be shift for negative strand

outbam

file path to save shift reads. If missing, no file will be write.

Value

An object of GAlignments with 5' end shifted reads.

Author(s)

Jianhong Ou

Examples

1
2
3
4
5
6
7
8
9
bamfile <- system.file("extdata", "GL1.bam", package="ATACseqQC")
tags <- c("AS", "XN", "XM", "XO", "XG", "NM", "MD", "YS", "YT")
library(BSgenome.Hsapiens.UCSC.hg19)
which <- as(seqinfo(Hsapiens)["chr1"], "GRanges")
gal <- readBamFile(bamfile, tag=tags, 
                   what=c("qname", "flag", "mapq", "seq", "qual"),
                   which=which, asMates=FALSE, bigFile=TRUE)
objs <- shiftGAlignments(gal)
export(objs, "shift.bam")

ATACseqQC documentation built on Nov. 8, 2020, 11 p.m.