samReadMatch: Identify reads matching an applied filter.

Description Usage Arguments Value See Also Examples

View source: R/samFilters.R

Description

Apply a filter to a sam object, returning a logical vector specifying which reads match the filter, i.e. the result of the filter FUNC for each read. Uses adply to apply this filter to each read alignment. Many of the parameters are just pass-through parameters for adply. These all begin with a "." to distinguish them from potential parameters to the function as they come after the ... in the function definition. No attempt is made to keep or delete both ends of a paired end read if one end passes and one end fails the filter.

Usage

1
2
samReadMatch(sam, FUNC, ..., .progress = "none", .inform = FALSE,
  .parallel = FALSE, .paropts = NULL, .id = NA)

Arguments

sam

A Sam object

FUNC

A function whose first parameter is a single read and that returns a single TRUE if that read should be kept when filtering the sam object, or FALSE if not. Should never return NULL or NA.

...

Other parameters to pass to FUNC.

.progress

Progress bar; see adply.

.inform

Extra error handling; see adply.

.parallel

Use the parallel package; see adply.

.paropts

Options if using the parallel package; see adply.

.id

Id column; see adply.

Value

A logical vector with TRUE for each read that passed the filter FUNC and FALSE otherwise.

See Also

Sam, readIsChimeric,

Examples

1
2
3
4
5
## Not run: 
sam <- Sam("someFile")
hivIntegrationSelect <- samReadFilter( sam, "readIsOnRef", "^chrMT$" )

## End(Not run)

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