readsToStartOrEnd {RiboProfiling} | R Documentation

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

### Description

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

### Usage

    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

    #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")

[Package RiboProfiling version 1.22.0 Index]