Parse Salmon fragment length file

parse_salmon_flenfile(
  x,
  k = 7,
  do_plot = FALSE,
  retcolors = c("red", "gold", "dodgerblue", "grey"),
  probs = c(0.25, 0.75),
  ...
)

Arguments

x

character path to file usually named "flenDist.txt".

k

numeric used with caTools::runmean() to define the width for smoothing a running mean, helpful to de-noise the fragment length profile.

do_plot

logical indicating whether to plot the data and resulting values.

retcolors

character vector with three colors used when do_plot=TRUE: mean, median, mode.

...

additional arguments are passed to plot() when do_plot=TRUE.

Value

numeric vector with summary values:

  • mean: the weighted mean across the fragment length distribution

  • median: the position with 50% cumulative density at or below

  • mode: the position with the highest density

  • each value in probs representing percentiles

value representing the weighted mean across the fragment lengths reported, typically values from 1 to 1000.

See also

Other jam nextgen sequence functions: get_salmon_meta(), get_salmon_root(), save_salmon_qc_xlsx()