get_readgr: Read and filter a bam file of RPFs

get_readgrR Documentation

Read and filter a bam file of RPFs

Description

Read and filter a bam file of RPFs

Usage

get_readgr(
  ribobam,
  anno,
  offsets_df = NULL,
  startstop = FALSE,
  strip_seqnames = TRUE
)

Arguments

ribobam

GRanges; A bam file with RPFs

anno

An annotation object

offsets_df
  • a data frame with numeric columns readlen,phase,offset

startstop

option to select only reads that overlapt he start/stop for offset determination,Defaults to FALSE

strip_seqnames

whether the function should remove all text after the first '|', useful if aligning to gencode fastas Defaults to TRUE

Details

This function reads in a bam file containing ribosomal footprints. It uses only reads without splice sites and reads which align to the positive strand, as it's designed to work on transcriptomic alignments.

Value

This function returns a granges object with the read names in the names slot and a metadata column denoting readlength.

Author(s)

Dermot Harnett, dermot.p.harnett@gmail.com

See Also

get_cds_reads, get_readlens

Examples

data(chr22_anno)
testbam <- system.file("extdata", "chr22.bam", package = "Ribostan", mustWork = TRUE)
rpfs <- get_readgr(testbam, chr22_anno)

zslastman/RiboStan documentation built on June 12, 2024, 1:59 a.m.