adjust_abundance: Adjust transcript abundance for unwanted variation

adjust_abundanceR Documentation

Adjust transcript abundance for unwanted variation

Description

adjust_abundance() takes as imput a 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> | and returns a 'tbl' with an edditional adjusted abundance column..

Usage

adjust_abundance(
  .data,
  .formula,
  do.scale = F,
  do.center = F,
  verbose = T,
  action = "add",
  reference_samples = NULL,
  assay = counts@active.assay,
  ...
)

Arguments

.data

A 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> |

.formula

A formula with no response variable, representing the desired linear model where the first covariate is the factor of interest and the second covariate is the unwanted variation (of the kind ~ factor_of_intrest + batch)

action

A character string. Whether to join the new information to the input tbl (add), or just get the non-redundant tbl with the new information (get).

...

Further parameters passed to the function sva::ComBat

.sample

The name of the sample column

.transcript

The name of the transcript/gene column

.abundance

The name of the transcript/gene abundance column

log_transform

A boolean, whether the value should be log-transformed (e.g., TRUE for RNA sequencing data)

Details

\lifecycle

experimental

This function adjusts the abundance for (known) unwanted variation. At the moment just an unwanted covariated is allowed at a time.

Value

A 'tbl' with additional columns for the adjusted counts as '<COUNT COLUMN> adjusted'

Examples





adjust_abundance( ~ factor_of_interest + batch )




stemangiola/ttSc documentation built on Dec. 8, 2022, 2:37 a.m.