compute_collection_table: Get collection table normalized in wide format

View source: R/collection_helpers.R

compute_collection_tableR Documentation

Get collection table normalized in wide format

Description

Get collection table normalized in wide format

Usage

compute_collection_table(
  path,
  lib_sizes,
  df,
  metadata_field,
  normalization,
  kmer,
  metadata,
  min_count = 0,
  format = "wide",
  value.var = "logscore",
  as_list = FALSE,
  subset = NULL,
  group_on_tx_tpm = NULL,
  split_by_frame = FALSE,
  ratio_interval = NULL
)

Arguments

path

the path to gene counts

lib_sizes

named integer vector, default NULL. If given will do a pre tpm normalization for full library sizes

df

the ORFik experiment to load the precomputed collection from. It must also have defined runIDs() for all samples.

metadata_field

the column name in metadata, to select to group on.

normalization

a character string, which mode, for options see RiboCrypt:::normalizations

kmer

integer, default 1L (off), if > 1 will smooth out signal with sliding window size kmer.

metadata

a data.table of metadata, must contain the Run column to select libraries.

min_count

integer, default 0. Minimum counts of coverage over transcript to be included.

format

character, default "wide", alternative "long". The format of the table output.

value.var

which column to use as scores, default "logscore"

as_list

logical, default FALSE. Return as list of size 2, count data.table and metadata data.table Set to TRUE if you need metadata subset (needed if you subset the table, to get correct matching)

split_by_frame

logical, default FALSE For kmer sliding window, should it split by frame

Value

a data.table in long or wide (default) format, if as list, it is a list of size 2 (see argument as_list)


Miswi/RiboCrypt documentation built on Nov. 9, 2024, 2:16 p.m.