calculate_lfc: Calculate log fold changes.

View source: R/fold_changes.R

calculate_lfcR Documentation

Calculate log fold changes.

Description

Calculate log fold changes.

Usage

calculate_lfc(
  data = NULL,
  id_column = 1,
  gene_column = 2,
  control_indices = NULL,
  treatment_indices = NULL,
  pseudocount = 0.5
)

Arguments

data

sample count matrix.

id_column

the index of column containing unique sgRNA identifiers.

gene_column

the index of column containing gene symbols.

control_indices

vector indices of columns containing control sample counts.

treatment_indices

vector indices of columns containing treatment sample counts.

pseudocount

a pseudocount (Default: 0.5).

Details

Takes the per-guide mean of control samples, adds a pseduocount to all counts (including control mean) and calculates the log2 fold change. Requires column indices be defined:

  • id_column - column containing guide (sgRNA) identifiers (Default = 1).

  • gene_column - column containing gene symbols/identifiers (Default = 2).

  • control_indices - indices of columns containing control sample counts.

  • treatment_indices - indices of columns containing treatment sample counts.

Value

a data frame containing sample log fold changes.


cancerit/RCRISPR documentation built on April 26, 2023, 10:12 p.m.