readsToFragmentMidpoints: Compute the midpoints of a collection of read fragments

View source: R/granges_utils.R

readsToFragmentMidpointsR Documentation

Compute the midpoints of a collection of read fragments

Description

Compute the midpoints of a collection of read fragments

Usage

readsToFragmentMidpoints(reads, fraglen, extend_fragment_upstream = FALSE)

Arguments

reads

A GenomicAlignments::GAlignments, GenomicAlignments::GAlignmentPairs, or GenomicAlignments::GAlignmentsList object representing a set of reads or read pairs.

fraglen

The estimated fragment length. This is only required if reads contains any un-paired reads, since the far end of the fragment represented by a single-end read is unknown.

extend_fragment_upstream

If FALSE (the default), each single-end read is assumed to represent the 5-prime end of a fragment, so the fragment will be extended fraglen base pairs in the 3-prime direction starting from the 5-prime end of the read. If reads represent the 3-prime ends of fragments, set this argument to TRUE, and the reverse will happen: fragments will be extended fraglen base pairs in the 5-prime direction starting from the 3-prime end of the read.

This should really be an S4 method, but writing S4 methods is a pain.


DarwinAwardWinner/rctutils documentation built on July 22, 2022, 5:19 a.m.