readLengthTable: Make table of readlengths

View source: R/report_helpers.R

readLengthTableR Documentation

Make table of readlengths

Description

Summarizing all libraries in experiment, make a table of proportion of read lengths.

Usage

readLengthTable(
  df,
  output.dir = NULL,
  type = "ofst",
  force = TRUE,
  library.names = bamVarName(df),
  BPPARAM = bpparam()
)

Arguments

df

an ORFik experiment

output.dir

NULL or character path, default: NULL, plot not saved to disc. If defined saves plot to that directory with the name "./readLengths.csv".

type

character, default: "ofst". Type of library: either "default", usually bam format (the one you gave to experiment), "pshifted" pshifted reads, "ofst", "bed", "bedo" optimized bed, or "wig"

force

logical, default TRUE If TRUE, reload library files even if matching named variables are found in environment used by experiment (see envExp) A simple way to make sure correct libraries are always loaded. FALSE is faster if data is loaded correctly already.

library.names

character vector, names of libraries, default: name_decider(df, naming)

BPPARAM

a core param, default: single thread: BiocParallel::SerialParam(). Set to BiocParallel::bpparam() to use multicore. Be aware, this uses a lot of extra ram (40GB+) for larger human samples!

Value

a data.table object of the the read length data with columns: c("sample", "sample_id", "read length", "counts", "counts_per_sample", "perc_of_counts_per_sample")


Roleren/ORFik documentation built on Dec. 18, 2024, 11:39 p.m.