readsToStartOrEnd: Reads in GAlignments converted to either Read Start (5') or...

Description Usage Arguments Value Examples

View source: R/readsToStartOrEnd.R

Description

Reads in GAlignments converted to either Read Start (5') or End (3') Positions

Usage

1
readsToStartOrEnd(aln, what)

Arguments

aln

A GAlignments object of the BAM mapping file.

what

A character object. Either "start" (the default) or "end" for read start or read end.

Value

A GRanges object containing either the read start or end genomic positions.

Examples

1
2
3
4
5
6
7
#read the BAM file into a GAlignments object using
#GenomicAlignments::readGAlignments
#the GAlignments object should be similar to ctrlGAlignments object
data(ctrlGAlignments)
aln <- ctrlGAlignments
#transform the GAlignments object into a GRanges object (faster processing)
alnGRanges <- readsToStartOrEnd(aln, what = "end")

RiboProfiling documentation built on Nov. 8, 2020, 5:26 p.m.