getPsiteCoordinates: Get P site coordinates

Description Usage Arguments Value Examples

View source: R/getPsiteCoordinates.R

Description

Extract P site coordinates from a bam file to a GRanges object.

Usage

1
getPsiteCoordinates(bamfile, bestpsite, anchor = "5end")

Arguments

bamfile

A BamFile object.

bestpsite

P site postion. See estimatePsite

anchor

5end or 3end. Default is 5end.

Value

A GRanges object with qwidth metadata which indicates the width of reads.

Examples

1
2
3
4
5
6
library(Rsamtools)
bamfilename <- system.file("extdata", "RPF.WT.1.bam",
                           package="ribosomeProfilingQC")
yieldSize <- 10000000
bamfile <- BamFile(bamfilename, yieldSize = yieldSize)
pc <- getPsiteCoordinates(bamfile, bestpsite=13)

ribosomeProfilingQC documentation built on March 13, 2021, 2:01 a.m.