pairedReads: Filter paired or unpaired reads

Description Usage Arguments Details Value Examples

View source: R/samFilters.R

Description

Drop all paired or unpaired reads. Relies on the accuracy and disjoint nature of the FIRST_OF_PAIR and SECOND_OF_PAIR flags, and that each paired-end read has a unique id (qname). Maintains multiple alignments for any kept read ends.

Usage

1
pairedReads(sam, paired = TRUE)

Arguments

sam

The Sam object to filter.

paired

Set FALSE to keep only unpaired reads. Keeps only paired reads by default.

Details

This allows dropping unpaired reads after filtering that might only drop one read of a pair, such as filtering by quality.

Value

A sam object with only paired reads, or with only unpaired reads.

Examples

1
2
3
4
5
6
## Not run: 
sam <- Sam("someFile")
pairedOnly <- pairedReads(sam)
unpairedOnly <- pairedReads(sam, FALSE)

## End(Not run)

jefferys/SamSeq documentation built on Oct. 25, 2019, 8:11 a.m.