Learn R Programming

FSAtools (version 2.0.5)

filter.fsa: Applies filter() to a "fsa" object

Description

Replaces the requested column of values by the output of filter, possibly after masking values out of a specified index or bp range.

Usage

filter.fsa(x, channel, ..., from = NA, to = NA, units = "bp")

Value

Returns x, with updated content.

Arguments

x

An object of class fsa, as returned by read.fsa

channel

Single character value, the name of the channel used for size markers.

...

Further arguments to be passed to filter.

from

Single numeric value, the starting offset (integer index or numeric bp) to consider. No subsetting will be applied if NA.

to

Single numeric value, the last offset (integer index or numeric bp) to consider. No subsetting will be applied if NA.

units

Either "index" or "bp", defining the unit of from and to. Notice x must have been processed by align.fsa to use "bp".

Author

Sylvain Mareschal

See Also

read.fsa

Examples

Run this code
  # Example FSA file provided
  fsa <- read.fsa(system.file("extdata/fsa_GEP/A5918.fsa", package="FSAtools"))
  fsa <- align.fsa(fsa)
  
  # Profile before filtering
  plot(fsa)
  
  # Plot subset of the profile (base pairs)
  fsa <- filter.fsa(fsa, channel="ROX", filter=20, from=40, to=140, units="bp")
  
  # Profile after filtering
  plot(fsa)

Run the code above in your browser using DataLab