dot-categorize_diff_genes: Categorize diff genes in to 'up' and 'down' based on log2FC,...

.categorize_diff_genesR Documentation

Categorize diff genes in to up and down based on log2FC, p-value and p-adj values.

Description

Usually fold change 1.5 (log2FC ~0.6) and statistical significance defined by p and/or p.adj values are considered to mark gene as differential expressed. However, these cutoffs change based on data quality. This function allows changing these cutoffs and mark genes differently expressed. While using this package, most of the time user do not need to call this function explicitly as it is internally called by run_deseq_analysis().

Usage

.categorize_diff_genes(
  dsr_tibble,
  log2fc_cutoff = 1,
  pval_cutoff = 0.05,
  padj_cutoff = 0.01,
  add_column_regul = TRUE,
  regul_based_upon = 1
)

Arguments

dsr_tibble

a dataframe obtained from DESeqResult object or an object of DESeqResult.

log2fc_cutoff, pval_cutoff, padj_cutoff

a numeric value, default ⁠(log2fc_cutoff = 1, pval_cutoff = 0.05, padj_cutoff = 0.01)⁠ denoting cutoffs. These criteria will be used to decide significance ⁠(NS, p-value, log2FC, p-value&log2FC)⁠ and type of regulation ⁠(Up, Down & other)⁠ of diff genes. See details.

add_column_regul

logical, default TRUE, indicating whether to add column add_column_regul or not. Added column will contain the values Up', 'Down' or 'other'.

regul_based_upon

one of the numeric choices 1, 2, or 3.

if 1 ...

  • Up : log2fc >= log2fc_cutoff & pvalue <= pvalue_cutoff

  • Down : log2fc <= (-1) * log2fc_cutoff & pvalue <= pvalue_cutoff

  • Other : remaining genes

if 2 ...

  • Up : log2fc >= log2fc_cutoff & padj <= padj_cutoff

  • Down : log2fc <= (-1) * log2fc_cutoff & padj <= padj_cutoff

  • Other : remaining genes

if 3 ...

  • Up : log2fc >= log2fc_cutoff & pvalue <= pvalue_cutoff & padj <= padj_cutoff

  • Down : log2fc <= (-1) * log2fc_cutoff pvalue <= pvalue_cutoff & padj <= padj_cutoff

  • Other : remaining genes

Details

// TO DO. –> explain columns 'signif' and 'type' in the returned data frame.

Value

a data frame


cparsania/parcutils documentation built on Oct. 27, 2024, 4:55 a.m.